diff --git a/Engine/source/windowManager/sdl/sdlCursorController.cpp b/Engine/source/windowManager/sdl/sdlCursorController.cpp index 601df4e19..f4d8913c9 100644 --- a/Engine/source/windowManager/sdl/sdlCursorController.cpp +++ b/Engine/source/windowManager/sdl/sdlCursorController.cpp @@ -64,17 +64,12 @@ S32 PlatformCursorControllerSDL::getDoubleClickHeight() void PlatformCursorControllerSDL::setCursorPosition( S32 x, S32 y ) { - if( PlatformWindowManager::get() && PlatformWindowManager::get()->getFirstWindow() ) - { - AssertFatal( dynamic_cast( PlatformWindowManager::get()->getFirstWindow() ), ""); - PlatformWindowSDL *window = static_cast( PlatformWindowManager::get()->getFirstWindow() ); - SDL_WarpMouseInWindow(window->getSDLWindow(), x, y); - } + SDL_WarpMouseGlobal(x, y); } void PlatformCursorControllerSDL::getCursorPosition( Point2I &point ) { - SDL_GetMouseState( &point.x, &point.y ); + SDL_GetGlobalMouseState( &point.x, &point.y ); } void PlatformCursorControllerSDL::setCursorVisible( bool visible )