engine: platform: get rid of the mouse pos scaling hack, this is not how highdpi issues should get resolved

This commit is contained in:
Alibek Omarov
2025-11-27 19:34:51 +05:00
parent e32470280d
commit d5347a82cb
2 changed files with 2 additions and 28 deletions

View File

@@ -44,18 +44,6 @@ Platform_GetMousePos
void GAME_EXPORT Platform_GetMousePos( int *x, int *y )
{
SDL_GetMouseState( x, y );
if( x && window_width.value && window_width.value != refState.width )
{
float factor = refState.width / window_width.value;
*x = *x * factor;
}
if( y && window_height.value && window_height.value != refState.height )
{
float factor = refState.height / window_height.value;
*y = *y * factor;
}
}
/*

View File

@@ -98,24 +98,10 @@ void GAME_EXPORT Platform_GetMousePos( int *x, int *y )
SDL_GetMouseState( &m_x, &m_y );
if( x )
{
if( window_width.value && window_width.value != refState.width )
{
float factor = refState.width / window_width.value;
*x = m_x * factor;
}
else *x = m_x;
}
*x = m_x;
if( y )
{
if( window_height.value && window_height.value != refState.height )
{
float factor = refState.height / window_height.value;
*y = m_y * factor;
}
else *y = m_y;
}
*y = m_y;
}
void Platform_SetCursorType( VGUI_DefaultCursor type )