reset lag counter when reset rom, add reset lag counter hotkey
This commit is contained in:
parent
6016b74e94
commit
845917c43b
|
@ -882,7 +882,13 @@ void NDS_Reset()
|
|||
if(movieMode != MOVIEMODE_INACTIVE && !_HACK_DONT_STOPMOVIE)
|
||||
movie_reset_command = true;
|
||||
|
||||
if(movieMode == MOVIEMODE_INACTIVE) currFrameCounter = 0;
|
||||
if(movieMode == MOVIEMODE_INACTIVE) {
|
||||
currFrameCounter = 0;
|
||||
lagframecounter = 0;
|
||||
LagFrameFlag = 0;
|
||||
lastLag = 0;
|
||||
TotalLagFrames = 0;
|
||||
}
|
||||
|
||||
MMU_clearMem();
|
||||
MMU_new.backupDevice.reset();
|
||||
|
|
|
@ -184,6 +184,12 @@ void HK_ToggleFrame(int) {frameCounterDisplay ^= true;}
|
|||
void HK_ToggleFPS(int) {FpsDisplay ^= true;}
|
||||
void HK_ToggleInput(int) {ShowInputDisplay ^= true;}
|
||||
void HK_ToggleLag(int) {ShowLagFrameCounter ^= true;}
|
||||
void HK_ResetLagCounter(int) {
|
||||
lagframecounter=0;
|
||||
LagFrameFlag=0;
|
||||
lastLag=0;
|
||||
TotalLagFrames=0;
|
||||
}
|
||||
void HK_ToggleReadOnly(int) {
|
||||
movie_readonly ^= true;
|
||||
if(movie_readonly)
|
||||
|
@ -421,6 +427,12 @@ void InitCustomKeys (SCustomKeys *keys)
|
|||
keys->ToggleLag.page = HOTKEY_PAGE_MAIN;
|
||||
keys->ToggleLag.key = NULL;
|
||||
|
||||
keys->ResetLagCounter.handleKeyDown = HK_ResetLagCounter;
|
||||
keys->ResetLagCounter.code = "ResetLagCounter";
|
||||
keys->ResetLagCounter.name = L"Reset Lag Counter";
|
||||
keys->ResetLagCounter.page = HOTKEY_PAGE_MAIN;
|
||||
keys->ResetLagCounter.key = NULL;
|
||||
|
||||
keys->ToggleReadOnly.handleKeyDown = HK_ToggleReadOnly;
|
||||
keys->ToggleReadOnly.code = "ToggleReadOnly";
|
||||
keys->ToggleReadOnly.name = L"Toggle Read Only";
|
||||
|
|
|
@ -84,6 +84,7 @@ struct SCustomKeys
|
|||
SCustomKey ToggleFPS;
|
||||
SCustomKey ToggleInput;
|
||||
SCustomKey ToggleLag;
|
||||
SCustomKey ResetLagCounter;
|
||||
SCustomKey LastItem; // dummy, must be last
|
||||
|
||||
//--methods--
|
||||
|
|
|
@ -1145,6 +1145,8 @@ DWORD WINAPI run()
|
|||
else
|
||||
osd->addFixed(Hud.FrameCounter.x, Hud.FrameCounter.y, "%d (no movie)",currFrameCounter);
|
||||
}
|
||||
if (ShowLagFrameCounter) osd->addFixed(Hud.LagFrameCounter.x, Hud.LagFrameCounter.y, "%d",TotalLagFrames);
|
||||
if (ShowMicrophone) osd->addFixed(Hud.Microphone.x, Hud.Microphone.y, "%d",MicDisplay);
|
||||
|
||||
if(!AVI_IsRecording()) osd->update();
|
||||
Display();
|
||||
|
@ -1266,8 +1268,6 @@ DWORD WINAPI run()
|
|||
emu_halt();
|
||||
SPU_Pause(1);
|
||||
}
|
||||
if (ShowLagFrameCounter) osd->addFixed(Hud.LagFrameCounter.x, Hud.LagFrameCounter.y, "%d",TotalLagFrames);
|
||||
if (ShowMicrophone) osd->addFixed(Hud.Microphone.x, Hud.Microphone.y, "%d",MicDisplay);
|
||||
// DisplayMessage();
|
||||
CheckMessages();
|
||||
|
||||
|
|
Loading…
Reference in New Issue