all repos — mgba @ 9933c58eec36216f79469eaeff03e51914342896

mGBA Game Boy Advance Emulator

Qt: Fix integer overflow in frame -> seconds calculation
Jeffrey Pfau jeffrey@endrift.com
Thu, 01 Jan 2015 22:40:55 -0800
commit

9933c58eec36216f79469eaeff03e51914342896

parent

682ed7dcee94ba440850116f36047660d6d015d5

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/GameController.cppsrc/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; } };