diff --git a/src/actions/advancement.cpp b/src/actions/advancement.cpp index f200d5fb5c6..fc4f36a3f3e 100644 --- a/src/actions/advancement.cpp +++ b/src/actions/advancement.cpp @@ -142,7 +142,7 @@ namespace animator.start_animations(); animator.wait_for_end(); animator.set_all_standing(); - events::pump(); + events::run_event_loop(); } return true; diff --git a/src/controller_base.cpp b/src/controller_base.cpp index 3d1bb357c30..690beff2152 100644 --- a/src/controller_base.cpp +++ b/src/controller_base.cpp @@ -255,7 +255,7 @@ void controller_base::play_slice(bool is_delay_enabled) l->play_slice(); } - events::pump(); + events::run_event_loop(); events::raise_process_event(); // Update sound sources before scrolling diff --git a/src/display.cpp b/src/display.cpp index c3708400505..469e207aa99 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -1593,7 +1593,7 @@ void display::scroll_to_xy(int screenxpos, int screenypos, SCROLL_TYPE scroll_ty double velocity = 0.0; while (dist_moved < dist_total) { - events::pump(); + events::run_event_loop(); int t = SDL_GetTicks(); double dt = (t - t_prev) / 1000.0; diff --git a/src/events.cpp b/src/events.cpp index 0390f1a1e6e..87b560286e9 100644 --- a/src/events.cpp +++ b/src/events.cpp @@ -417,7 +417,7 @@ void finalize() // TODO: I'm uncertain if this is always safe to call at static init; maybe set in main() instead? static const boost::thread::id main_thread = boost::this_thread::get_id(); -void pump() +void run_event_loop() { if(boost::this_thread::get_id() != main_thread) { // Can only call this on the main thread! @@ -620,7 +620,7 @@ void pump() video.render_screen(); - // Inform the pump monitors that an events::pump() has occurred + // Inform the pump monitors that an events::run_event_loop() has occurred for(auto monitor : pump_monitors) { monitor->process(info); } diff --git a/src/events.hpp b/src/events.hpp index c6519df2c2c..52f391036ec 100644 --- a/src/events.hpp +++ b/src/events.hpp @@ -128,7 +128,7 @@ struct event_context }; //causes events to be dispatched to all handler objects. -void pump(); +void run_event_loop(); //look for resize events and update references to the screen area void peek_for_resize(); @@ -142,7 +142,7 @@ private: }; class pump_monitor { -//pump_monitors receive notification after an events::pump() occurs +//pump_monitors receive notification after an events::run_event_loop() occurs public: pump_monitor(); virtual ~pump_monitor(); diff --git a/src/gui/core/event/handler.cpp b/src/gui/core/event/handler.cpp index f53794bb642..2b3616441c2 100644 --- a/src/gui/core/event/handler.cpp +++ b/src/gui/core/event/handler.cpp @@ -70,7 +70,7 @@ static uint32_t timer_sdl_poll_events(uint32_t, void*) { try { - events::pump(); + events::run_event_loop(); } catch(CVideo::quit&) { diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 40a4914235e..e84267f5e2f 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -469,7 +469,7 @@ void window::show_non_modal(/*const unsigned auto_close_timeout*/) invalidate_layout(); suspend_drawing_ = false; - events::pump(); + events::run_event_loop(); } int window::show(const unsigned auto_close_timeout) @@ -518,7 +518,7 @@ int window::show(const unsigned auto_close_timeout) for(status_ = SHOWING; status_ != CLOSED;) { // process installed callback if valid, to allow e.g. network // polling - events::pump(); + events::run_event_loop(); if(!mouse_button_state_initialized) { /* diff --git a/src/units/udisplay.cpp b/src/units/udisplay.cpp index 9611be84d74..8ed66da27ee 100644 --- a/src/units/udisplay.cpp +++ b/src/units/udisplay.cpp @@ -94,7 +94,7 @@ static void teleport_unit_between(const map_location& a, const map_location& b, temp_unit.anim_comp().set_standing(); disp.draw_debugging_aids(); - events::pump(); + events::run_event_loop(); } /** diff --git a/src/video.hpp b/src/video.hpp index 07ca7cb35aa..c7b4ed74fd9 100644 --- a/src/video.hpp +++ b/src/video.hpp @@ -167,8 +167,8 @@ private: /** Renders the screen. */ void render_screen(); - /** events::pump() is the only place that should call render_screen(). */ - friend void events::pump(); + /** events::run_event_loop() is the only place that should call render_screen(). */ + friend void events::run_event_loop(); public: void render_copy(const texture& txt, diff --git a/src/wesnoth.cpp b/src/wesnoth.cpp index 20f36c23a57..e6839740d26 100644 --- a/src/wesnoth.cpp +++ b/src/wesnoth.cpp @@ -677,7 +677,7 @@ static int do_gameloop(const std::vector& args) } events::initialise(); - events::pump(); + events::run_event_loop(); res = image::update_from_preferences(); if(res == false) { @@ -685,7 +685,7 @@ static int do_gameloop(const std::vector& args) return 1; } - events::pump(); + events::run_event_loop(); if(preferences::joystick_support_enabled()) { res = game->init_joystick(); @@ -698,7 +698,7 @@ static int do_gameloop(const std::vector& args) const cursor::manager cursor_manager; cursor::set(cursor::WAIT); - events::pump(); + events::run_event_loop(); #if(defined(_X11) && !defined(__APPLE__)) || defined(_WIN32) SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);