mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix dyncam mousesens
This commit is contained in:
parent
703f1bc99d
commit
043d718698
|
@ -61,7 +61,7 @@ void CInput::MouseRelative(float *x, float *y)
|
||||||
*y = ny;
|
*y = ny;
|
||||||
#else
|
#else
|
||||||
int nx = 0, ny = 0;
|
int nx = 0, ny = 0;
|
||||||
float Sens = (g_Config.m_ClDyncam ? g_Config.m_ClDyncamMousesens : g_Config.m_InpMousesens) / 100.0f;
|
float Sens = ((g_Config.m_ClDyncam && g_Config.m_ClDyncamMousesens) ? g_Config.m_ClDyncamMousesens : g_Config.m_InpMousesens) / 100.0f;
|
||||||
|
|
||||||
if(g_Config.m_InpGrab)
|
if(g_Config.m_InpGrab)
|
||||||
SDL_GetRelativeMouseState(&nx, &ny);
|
SDL_GetRelativeMouseState(&nx, &ny);
|
||||||
|
|
|
@ -64,7 +64,7 @@ void CUI::ConvertMouseMove(float *x, float *y)
|
||||||
//*x = *x * 500 / g_Config.m_GfxScreenWidth;
|
//*x = *x * 500 / g_Config.m_GfxScreenWidth;
|
||||||
//*y = *y * 500 / g_Config.m_GfxScreenHeight;
|
//*y = *y * 500 / g_Config.m_GfxScreenHeight;
|
||||||
#else
|
#else
|
||||||
float Mousesens = g_Config.m_ClDyncam ? g_Config.m_ClDyncamMousesens : g_Config.m_InpMousesens;
|
float Mousesens = (g_Config.m_ClDyncam && g_Config.m_ClDyncamMousesens) ? g_Config.m_ClDyncamMousesens : g_Config.m_InpMousesens;
|
||||||
float Fac = (float)(g_Config.m_UiMousesens)/Mousesens;
|
float Fac = (float)(g_Config.m_UiMousesens)/Mousesens;
|
||||||
*x = *x*Fac;
|
*x = *x*Fac;
|
||||||
*y = *y*Fac;
|
*y = *y*Fac;
|
||||||
|
|
Loading…
Reference in a new issue