@@ -245,7 +245,7 @@ EglApp::EglApp(char const *title, ivec2 res, float fps) : | |||||
# endif | # endif | ||||
# if LOL_USE_SDL | # 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 | # endif | ||||
Video::Setup((ivec2)data->screen_size); | Video::Setup((ivec2)data->screen_size); | ||||
@@ -162,7 +162,7 @@ sdl::app::app(char const *title, ivec2 res, float fps) | |||||
new D3d9Input(); | new D3d9Input(); | ||||
#endif | #endif | ||||
new SdlInput(res.x, res.y, screen_size.x, screen_size.y); | |||||
new SdlInput(screen_size.x, screen_size.y); | |||||
#endif | #endif | ||||
} | } | ||||
@@ -43,9 +43,8 @@ namespace lol | |||||
* Public SdlInput class | * 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__ | #if _WIN32 || defined __APPLE__ | ||||
m_tick_in_draw_thread = true; | m_tick_in_draw_thread = true; | ||||
@@ -247,7 +246,7 @@ void SdlInput::tick(float seconds) | |||||
ivec2 window_size; | ivec2 window_size; | ||||
// FIXME: get actual window size | // FIXME: get actual window size | ||||
//SDL_GetWindowSize(m_window, &window_size.x, &window_size.y); | //SDL_GetWindowSize(m_window, &window_size.x, &window_size.y); | ||||
window_size = (ivec2)m_app; | |||||
window_size = Video::GetSize(); | |||||
ivec2 mouse_pos(-1, -1); | ivec2 mouse_pos(-1, -1); | ||||
SDL_GetMouseState(&mouse_pos.x, &mouse_pos.y); | SDL_GetMouseState(&mouse_pos.x, &mouse_pos.y); | ||||
@@ -36,7 +36,7 @@ class SdlInput : public entity | |||||
{ | { | ||||
public: | public: | ||||
/** passing the screen resolution (note: not the windowed app resolution!) allows to make the mouse axis resolution-independent */ | /** 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(); | virtual ~SdlInput(); | ||||
void SetScreenResolution(); | void SetScreenResolution(); | ||||