diff options
author | erorcun <erayorcunus@gmail.com> | 2020-01-12 00:11:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-12 00:11:09 +0100 |
commit | ea90290e07e21b132f7a50c42a97e30a6a2eb803 (patch) | |
tree | 184d9cc8481624d34156bfef3f6b44c5241b1e8b /src/core | |
parent | Merge pull request #289 from erorcun/erorcun (diff) | |
parent | Fixes 2 (diff) | |
download | re3-ea90290e07e21b132f7a50c42a97e30a6a2eb803.tar re3-ea90290e07e21b132f7a50c42a97e30a6a2eb803.tar.gz re3-ea90290e07e21b132f7a50c42a97e30a6a2eb803.tar.bz2 re3-ea90290e07e21b132f7a50c42a97e30a6a2eb803.tar.lz re3-ea90290e07e21b132f7a50c42a97e30a6a2eb803.tar.xz re3-ea90290e07e21b132f7a50c42a97e30a6a2eb803.tar.zst re3-ea90290e07e21b132f7a50c42a97e30a6a2eb803.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Frontend.cpp | 2 | ||||
-rw-r--r-- | src/core/Timer.cpp | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index 24cdad8e..38f6aff8 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -812,7 +812,7 @@ void CMenuManager::Draw() textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_PrefsDMA ? "FEM_ON" : "FEM_OFF"); break; case MENUACTION_MOUSESTEER: - textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_bDisableMouseSteering ? "FEM_ON" : "FEM_OFF"); + textToPrint[MENUCOLUMN_RIGHT] = TheText.Get(m_bDisableMouseSteering ? "FEM_OFF" : "FEM_ON"); break; } diff --git a/src/core/Timer.cpp b/src/core/Timer.cpp index 543f582b..8695f64b 100644 --- a/src/core/Timer.cpp +++ b/src/core/Timer.cpp @@ -75,7 +75,7 @@ void CTimer::Shutdown(void) ; } -#if 1 +#if 0 WRAPPER void CTimer::Update(void) { EAXJMP(0x4ACF70); } #else void CTimer::Update(void) @@ -87,22 +87,22 @@ void CTimer::Update(void) LARGE_INTEGER pc; QueryPerformanceCounter(&pc); - int32 updInCycles = (pc.LowPart - _oldPerfCounter.LowPart) & 0x7FFFFFFF; + int32 updInCycles = (pc.LowPart - _oldPerfCounter.LowPart); // & 0x7FFFFFFF; pointless _oldPerfCounter = pc; - double updInCyclesScaled = (double)updInCycles * ms_fTimeScale; + float updInCyclesScaled = updInCycles * ms_fTimeScale; double upd = updInCyclesScaled / (double)_nCyclesPerMS; - m_snTimeInMillisecondsPauseMode = (Int64)(m_snTimeInMillisecondsPauseMode + upd); + m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + upd; if ( GetIsPaused() ) ms_fTimeStep = 0.0f; else { - m_snTimeInMilliseconds = (Int64)(m_snTimeInMilliseconds + upd); - m_snTimeInMillisecondsNonClipped = (Int64)(m_snTimeInMillisecondsNonClipped + upd); + m_snTimeInMilliseconds = m_snTimeInMilliseconds + upd; + m_snTimeInMillisecondsNonClipped = m_snTimeInMillisecondsNonClipped + upd; ms_fTimeStep = updInCyclesScaled / (double)_nCyclesPerMS / 20.0; } } @@ -116,14 +116,14 @@ void CTimer::Update(void) oldPcTimer = timer; - m_snTimeInMillisecondsPauseMode = (Int64)(m_snTimeInMillisecondsPauseMode + upd); + m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + upd; if ( GetIsPaused() ) ms_fTimeStep = 0.0f; else { - m_snTimeInMilliseconds = (Int64)(m_snTimeInMilliseconds + upd); - m_snTimeInMillisecondsNonClipped = (Int64)(m_snTimeInMillisecondsNonClipped + upd); + m_snTimeInMilliseconds = m_snTimeInMilliseconds + upd; + m_snTimeInMillisecondsNonClipped = m_snTimeInMillisecondsNonClipped + upd; ms_fTimeStep = upd / 1000.0f * 50.0f; } } @@ -192,7 +192,7 @@ uint32 CTimer::GetCurrentTimeInCycles(void) { LARGE_INTEGER pc; QueryPerformanceCounter(&pc); - return (pc.LowPart - _oldPerfCounter.LowPart) & 0x7FFFFFFF; + return (pc.LowPart - _oldPerfCounter.LowPart); // & 0x7FFFFFFF; pointless } else return RsTimer() - oldPcTimer; @@ -218,7 +218,7 @@ void CTimer::EndUserPause(void) m_UserPause = false; } -#if 0 +#if 1 STARTPATCHES InjectHook(0x4ACE60, CTimer::Initialise, PATCH_JUMP); InjectHook(0x4ACF60, CTimer::Shutdown, PATCH_JUMP); |