diff --git a/engine/platform/sdl/in_sdl.c b/engine/platform/sdl/in_sdl.c index 24dabc0e..7231a626 100644 --- a/engine/platform/sdl/in_sdl.c +++ b/engine/platform/sdl/in_sdl.c @@ -43,7 +43,18 @@ Platform_GetMousePos */ void GAME_EXPORT Platform_GetMousePos( int *x, int *y ) { + float factorX; + float factorY; + { + int w1, w2, h1, h2; + SDL_GL_GetDrawableSize( host.hWnd, &w1, &h1 ); + SDL_GetWindowSize( host.hWnd, &w2, &h2 ); + factorX = (float)w1 / w2; + factorY = (float)h1 / h2; + } SDL_GetMouseState( x, y ); + *x = *x * factorX; + *y = *y * factorY; } /* diff --git a/engine/platform/sdl/vid_sdl.c b/engine/platform/sdl/vid_sdl.c index 1d097d42..737c1d6d 100644 --- a/engine/platform/sdl/vid_sdl.c +++ b/engine/platform/sdl/vid_sdl.c @@ -576,10 +576,8 @@ static qboolean VID_SetScreenResolution( int width, int height, window_mode_t wi SDL_DisplayMode got; Uint32 wndFlags = 0; -#if !XASH_APPLE if( vid_highdpi.value ) SetBits( wndFlags, SDL_WINDOW_ALLOW_HIGHDPI ); -#endif SDL_SetWindowBordered( host.hWnd, SDL_FALSE );