From 7bae8745152dfd3b510a14408a12c272817f376c Mon Sep 17 00:00:00 2001 From: gocha Date: Thu, 1 Oct 2009 14:32:03 +0000 Subject: [PATCH] movie dialog: fixed subsecond calculation; added subsecond rounding code; expanded the width of frameCount/rerecordCount display. --- desmume/src/windows/replay.cpp | 4 ++-- desmume/src/windows/resources.rc | Bin 445796 -> 445796 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/windows/replay.cpp b/desmume/src/windows/replay.cpp index 200617c83..f1f4c96c1 100644 --- a/desmume/src/windows/replay.cpp +++ b/desmume/src/windows/replay.cpp @@ -125,9 +125,9 @@ void Describe(HWND hwndDlg) u32 num_frames = md.records.size(); - double tempCount = num_frames / (33513982.0/6/355/263); + double tempCount = (num_frames / (33513982.0/6/355/263)) + 0.005; // +0.005s for rounding int num_seconds = (int)tempCount; - int fraction = ((int)tempCount - num_seconds) * 100; + int fraction = (int)((tempCount - num_seconds) * 100); int seconds = num_seconds % 60; int minutes = (num_seconds / 60) % 60; int hours = (num_seconds / 60 / 60) % 60; diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index 5a572904299dca145f8bfe15eb8861b2839d5cc7..16a1e422dd06b1c92517d1b4d636fa2670f679c6 100644 GIT binary patch delta 70 zcmaDdOZv$y>4q(gSME)|l4CZV>ptTu5M%qR`-~EqU?BrbR+i~Do=iJHyml=wCLm@8 PViq7~-LB=uX4MP;eMTHI delta 70 zcmaDdOZv$y>4q(gSME)|&|o&5>ptTu5M%qR`-~EqU?BrbR+i~Do=iJHyml=wCLm@8 PViq7~-LB=uX4MP;ho&5I