Fix default mouse invert setting, vert. mouse sensitivity, set aspect ratio auto as default

This commit is contained in:
erorcun 2020-12-27 05:59:51 +03:00
parent 36e64dbd22
commit 0b59eeb2bf

View File

@ -170,7 +170,12 @@ bool CMenuManager::m_PrefsAllowNastyGame = true;
bool CMenuManager::m_bStartUpFrontEndRequested; bool CMenuManager::m_bStartUpFrontEndRequested;
bool CMenuManager::m_bShutDownFrontEndRequested; bool CMenuManager::m_bShutDownFrontEndRequested;
#ifdef ASPECT_RATIO_SCALE
int8 CMenuManager::m_PrefsUseWideScreen = AR_AUTO;
#else
int8 CMenuManager::m_PrefsUseWideScreen; int8 CMenuManager::m_PrefsUseWideScreen;
#endif
int8 CMenuManager::m_PrefsRadioStation; int8 CMenuManager::m_PrefsRadioStation;
int32 CMenuManager::m_PrefsBrightness = 256; int32 CMenuManager::m_PrefsBrightness = 256;
float CMenuManager::m_PrefsLOD = CRenderer::ms_lodDistScale; float CMenuManager::m_PrefsLOD = CRenderer::ms_lodDistScale;
@ -917,7 +922,11 @@ CMenuManager::CheckSliderMovement(int value)
case MENUACTION_MOUSESENS: case MENUACTION_MOUSESENS:
TheCamera.m_fMouseAccelHorzntl += value * 1.0f/200.0f/15.0f; // ??? TheCamera.m_fMouseAccelHorzntl += value * 1.0f/200.0f/15.0f; // ???
TheCamera.m_fMouseAccelHorzntl = clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f/3200.0f, 1.0f/200.0f); TheCamera.m_fMouseAccelHorzntl = clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f/3200.0f, 1.0f/200.0f);
#ifdef FIX_BUGS
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl + 0.0005f;
#else
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl; TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl;
#endif
break; break;
default: default:
return; return;
@ -4466,13 +4475,21 @@ CMenuManager::ProcessButtonPresses(void)
case HOVEROPTION_INCREASE_MOUSESENS: case HOVEROPTION_INCREASE_MOUSESENS:
TheCamera.m_fMouseAccelHorzntl += (1.0f / 3000); TheCamera.m_fMouseAccelHorzntl += (1.0f / 3000);
TheCamera.m_fMouseAccelHorzntl = clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f / 3200, 1.0f / 200); TheCamera.m_fMouseAccelHorzntl = clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f / 3200, 1.0f / 200);
#ifdef FIX_BUGS
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl + 0.0005f;
#else
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl; TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl;
#endif
SaveSettings(); SaveSettings();
break; break;
case HOVEROPTION_DECREASE_MOUSESENS: case HOVEROPTION_DECREASE_MOUSESENS:
TheCamera.m_fMouseAccelHorzntl -= (1.0f / 3000); TheCamera.m_fMouseAccelHorzntl -= (1.0f / 3000);
TheCamera.m_fMouseAccelHorzntl = clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f / 3200, 1.0f / 200); TheCamera.m_fMouseAccelHorzntl = clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f / 3200, 1.0f / 200);
#ifdef FIX_BUGS
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl + 0.0005f;
#else
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl; TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl;
#endif
SaveSettings(); SaveSettings();
break; break;
} }
@ -4969,7 +4986,11 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsLOD = 1.2f; m_PrefsLOD = 1.2f;
m_PrefsVsync = true; m_PrefsVsync = true;
CRenderer::ms_lodDistScale = 1.2f; CRenderer::ms_lodDistScale = 1.2f;
#ifdef ASPECT_RATIO_SCALE
m_PrefsUseWideScreen = AR_AUTO;
#else
m_PrefsUseWideScreen = false; m_PrefsUseWideScreen = false;
#endif
m_PrefsShowSubtitles = true; m_PrefsShowSubtitles = true;
m_nDisplayVideoMode = m_nPrefsVideoMode; m_nDisplayVideoMode = m_nPrefsVideoMode;
#if GTA_VERSION >= GTA3_PC_11 #if GTA_VERSION >= GTA3_PC_11
@ -5010,7 +5031,12 @@ CMenuManager::ProcessButtonPresses(void)
} }
#endif #endif
m_ControlMethod = CONTROL_STANDARD; m_ControlMethod = CONTROL_STANDARD;
#ifdef FIX_BUGS
MousePointerStateHelper.bInvertVertically = true;
TheCamera.m_fMouseAccelVertical = 0.003f;
#else
MousePointerStateHelper.bInvertVertically = false; MousePointerStateHelper.bInvertVertically = false;
#endif
TheCamera.m_fMouseAccelHorzntl = 0.0025f; TheCamera.m_fMouseAccelHorzntl = 0.0025f;
CVehicle::m_bDisableMouseSteering = true; CVehicle::m_bDisableMouseSteering = true;
TheCamera.m_bHeadBob = false; TheCamera.m_bHeadBob = false;