From ce7cb192ed821e4db7b1734ca69eb1f3d4e68437 Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 11 Feb 2009 05:21:40 +0000 Subject: [PATCH] win32: cleanup and fix bug where input is ignored during frameadvance --- desmume/src/windows/inputdx.cpp | 3 ++- desmume/src/windows/inputdx.h | 1 + desmume/src/windows/main.cpp | 7 +++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/desmume/src/windows/inputdx.cpp b/desmume/src/windows/inputdx.cpp index 44079567f..b83551138 100644 --- a/desmume/src/windows/inputdx.cpp +++ b/desmume/src/windows/inputdx.cpp @@ -2176,7 +2176,8 @@ void input_process() { S9xWinScanJoypads(); - if (paused) return; + //not appropriate right now in desmume + //if (paused) return; bool R = joypads[0] & RIGHT_MASK; bool L = joypads[0] & LEFT_MASK; diff --git a/desmume/src/windows/inputdx.h b/desmume/src/windows/inputdx.h index 9e70c2cb2..77738fc3f 100644 --- a/desmume/src/windows/inputdx.h +++ b/desmume/src/windows/inputdx.h @@ -110,6 +110,7 @@ extern SJoypad TurboToggleJoypadStorage[8]; void RunInputConfig(); void RunHotkeyConfig(); +void input_process(); #endif diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index a4211cbac..15e6581ee 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -802,6 +802,8 @@ DWORD WINAPI run() { while(execute) { + input_process(); + { Lock lock; cycles = NDS_exec((560190<<1)-cycles); @@ -821,10 +823,7 @@ DWORD WINAPI run() // if (!skipnextframe) // { - //input->process(); - //TODO INPUT - void input_process(); - input_process(); + if (FpsDisplay) osd->addFixed(0, 5, "%02d Fps", fps); osd->update();