diff --git a/src/application/egl-app.cpp b/src/application/egl-app.cpp index efc6a4a1..b5ddda18 100644 --- a/src/application/egl-app.cpp +++ b/src/application/egl-app.cpp @@ -245,7 +245,7 @@ EglApp::EglApp(char const *title, ivec2 res, float fps) : # endif # if LOL_USE_SDL - new SdlInput(res.x, res.y, data->screen_size.x, data->screen_size.y); + new SdlInput(data->screen_size.x, data->screen_size.y); # endif Video::Setup((ivec2)data->screen_size); diff --git a/src/application/sdl-app.cpp b/src/application/sdl-app.cpp index 5330c1a8..722baacd 100644 --- a/src/application/sdl-app.cpp +++ b/src/application/sdl-app.cpp @@ -162,7 +162,7 @@ sdl::app::app(char const *title, ivec2 res, float fps) new D3d9Input(); #endif - new SdlInput(res.x, res.y, screen_size.x, screen_size.y); + new SdlInput(screen_size.x, screen_size.y); #endif } diff --git a/src/ui/sdl-input.cpp b/src/ui/sdl-input.cpp index 71fded7f..de7d8bc3 100644 --- a/src/ui/sdl-input.cpp +++ b/src/ui/sdl-input.cpp @@ -43,9 +43,8 @@ namespace lol * Public SdlInput class */ -SdlInput::SdlInput(int app_w, int app_h, int screen_w, int screen_h) - : m_app(vec2((float)app_w, (float)app_h)), - m_screen(vec2((float)screen_w, (float)screen_h)) +SdlInput::SdlInput(int screen_w, int screen_h) + : m_screen(vec2((float)screen_w, (float)screen_h)) { #if _WIN32 || defined __APPLE__ m_tick_in_draw_thread = true; @@ -247,7 +246,7 @@ void SdlInput::tick(float seconds) ivec2 window_size; // FIXME: get actual window size //SDL_GetWindowSize(m_window, &window_size.x, &window_size.y); - window_size = (ivec2)m_app; + window_size = Video::GetSize(); ivec2 mouse_pos(-1, -1); SDL_GetMouseState(&mouse_pos.x, &mouse_pos.y); diff --git a/src/ui/sdl-input.h b/src/ui/sdl-input.h index 0d366765..b4bdbf27 100644 --- a/src/ui/sdl-input.h +++ b/src/ui/sdl-input.h @@ -36,7 +36,7 @@ class SdlInput : public entity { public: /** passing the screen resolution (note: not the windowed app resolution!) allows to make the mouse axis resolution-independent */ - SdlInput(int app_w, int app_h, int screen_w, int screen_h); + SdlInput(int screen_w, int screen_h); virtual ~SdlInput(); void SetScreenResolution();