Qt: Fix integer overflow in frame -> seconds calculation
Jeffrey Pfau jeffrey@endrift.com
Thu, 01 Jan 2015 22:40:55 -0800
1 files changed,
1 insertions(+),
1 deletions(-)
M
src/platform/qt/GameController.cpp
→
src/platform/qt/GameController.cpp
@@ -75,7 +75,7 @@ return time(nullptr);
case GameControllerRTC::FIXED: return rtc->value; case GameControllerRTC::FAKE_EPOCH: - return rtc->value + rtc->p->m_threadContext.gba->video.frameCounter * VIDEO_TOTAL_LENGTH / GBA_ARM7TDMI_FREQUENCY; + return rtc->value + rtc->p->m_threadContext.gba->video.frameCounter * (int64_t) VIDEO_TOTAL_LENGTH / GBA_ARM7TDMI_FREQUENCY; } };