Skip to content

Commit

Permalink
Removed empty resize_lock struct and resize_monitor class
Browse files Browse the repository at this point in the history
Once again, SDL1.2 functionality that does nothing in SDL2.
  • Loading branch information
Vultraz committed Mar 13, 2016
1 parent e656751 commit 02993cb
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 34 deletions.
1 change: 0 additions & 1 deletion src/construct_dialog.cpp
Expand Up @@ -314,7 +314,6 @@ int dialog::show()
//create the event context, remember to instruct any passed-in widgets to join it
const events::event_context dialog_events_context;
const dialog_manager manager;
const resize_lock prevent_resizing;

get_frame().join();

Expand Down
3 changes: 1 addition & 2 deletions src/game_launcher.cpp
Expand Up @@ -56,7 +56,7 @@
#include "statistics.hpp"
#include "tstring.hpp" // for operator==, operator!=
#include "util.hpp" // for lexical_cast_default
#include "video.hpp" // for CVideo, resize_monitor
#include "video.hpp" // for CVideo
#include "wml_exception.hpp" // for twml_exception

#include <algorithm> // for copy, max, min, stable_sort
Expand Down Expand Up @@ -115,7 +115,6 @@ game_launcher::game_launcher(const commandline_options& cmdline_opts, const char
main_event_context_(),
hotkey_manager_(),
music_thinker_(),
resize_monitor_(new resize_monitor()),
test_scenario_("test"),
screenshot_map_(),
screenshot_filename_(),
Expand Down
3 changes: 0 additions & 3 deletions src/game_launcher.hpp
Expand Up @@ -34,7 +34,6 @@
class commandline_options;
class config;
class CVideo;
class resize_monitor;

struct jump_to_campaign_info
{
Expand Down Expand Up @@ -119,8 +118,6 @@ class game_launcher
const events::event_context main_event_context_;
const hotkey::manager hotkey_manager_;
sound::music_thinker music_thinker_;
//Never null.
boost::scoped_ptr<resize_monitor> resize_monitor_;

std::string test_scenario_;

Expand Down
1 change: 0 additions & 1 deletion src/generators/default_map_generator.cpp
Expand Up @@ -99,7 +99,6 @@ bool default_map_generator::allow_user_config() const { return true; }

void default_map_generator::user_config(CVideo& v)
{
const resize_lock prevent_resizing;
const events::event_context dialog_events_context;

CVideo& screen = v;
Expand Down
1 change: 0 additions & 1 deletion src/help/help.cpp
Expand Up @@ -163,7 +163,6 @@ void show_help(CVideo& video, const section &toplevel_sec,
{
const events::event_context dialog_events_context;
const gui::dialog_manager manager;
const resize_lock prevent_resizing;

CVideo& screen = video;
const surface& scr = screen.getSurface();
Expand Down
1 change: 0 additions & 1 deletion src/storyscreen/controller.cpp
Expand Up @@ -47,7 +47,6 @@ namespace storyscreen {
controller::controller(CVideo& video, const vconfig& data, const std::string& scenario_name,
int segment_index)
: video_(video)
, disp_resize_lock_()
, evt_context_()
, scenario_name_(scenario_name)
, segment_index_(segment_index)
Expand Down
1 change: 0 additions & 1 deletion src/storyscreen/controller.hpp
Expand Up @@ -59,7 +59,6 @@ class controller
void resolve_wml(const vconfig& cfg);

CVideo& video_;
const resize_lock disp_resize_lock_;
const events::event_context evt_context_;

std::string scenario_name_;
Expand Down
13 changes: 0 additions & 13 deletions src/video.cpp
Expand Up @@ -51,19 +51,6 @@ namespace {
#endif
}

void resize_monitor::process(events::pump_info &info) {
UNUSED(info);
}

resize_lock::resize_lock()
{

}

resize_lock::~resize_lock()
{
}

static unsigned int get_flags(unsigned int flags)
{
/* The wanted flags for the render need to be evaluated for SDL2. */
Expand Down
11 changes: 0 additions & 11 deletions src/video.hpp
Expand Up @@ -269,17 +269,6 @@ struct update_locker
bool unlock;
};

class resize_monitor : public events::pump_monitor {
void process(events::pump_info &info);
};

//an object which prevents resizing of the screen occurring during
//its lifetime.
struct resize_lock {
resize_lock();
~resize_lock();
};

namespace video2 {
class draw_layering: public events::sdl_handler {
protected:
Expand Down

0 comments on commit 02993cb

Please sign in to comment.