diff --git a/desmume/ChangeLog b/desmume/ChangeLog index 2c8fd3a15..3a3d98b69 100644 --- a/desmume/ChangeLog +++ b/desmume/ChangeLog @@ -1,4 +1,4 @@ -0.9.5 -> 0.9.6 (r3075-r3153-r3xxx) +0.9.5 -> 0.9.6 (r3075-r3197-r3xxx) General/Core: bug: emulate keypad interrupt @@ -8,8 +8,10 @@ General/Core: bug: fix vectest bug: fix lid savestate desync bug: fix texcache memory GB explosion when games use tons of tiny 3d sprites + bug: fix huge rerecording movie file handle leak enh: support devkitpro argv enh: add gbaslot-rom commandline + enh: add EXXXXXXX cheat codes Graphics: bug: fix a mistakenly rendered OBJ window @@ -18,9 +20,11 @@ Windows: bug: fix 16bpp display bug: more fixes to multi-gamepads bug: cheat windows robustification + bug: fix that sticky pause state when resetting and loading roms + enh: dont screensave while using gamepad enh: add EPX and EPX1.5X resize filters enh: add a japanese translation which will soon be stale like the others - enh: add fancy printscreen with emulator info on it + enh: add fancy ctrl+printscreen with emulator info on it enh: add "lockdown" window mode to keep window safe from fast stylus action Linux/OSX: diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index e8ebb4c4a..3f3a1e4eb 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -28,7 +28,6 @@ #include #include #include -//#include #include #include @@ -83,6 +82,7 @@ #include "video.h" #include "aggdraw.h" #include "agg2d.h" +#include "winutil.h" //tools and dialogs #include "pathsettings.h" @@ -3013,10 +3013,6 @@ void WavRecordTo(int wavmode) NDS_UnPause(); } - - - - static BOOL OpenCore(const char* filename) { char LogicalName[1024], PhysicalName[1024]; @@ -3820,6 +3816,10 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM case WM_SYSKEYDOWN: case WM_CUSTKEYDOWN: { + //since the user has used a gamepad, + //send some fake input to keep the screensaver from running + PreventScreensaver(); + int modifiers = GetModifiers(wParam); wParam = PurgeModifiers(wParam); if(!HandleKeyMessage(wParam,lParam, modifiers)) diff --git a/desmume/src/windows/winutil.cpp b/desmume/src/windows/winutil.cpp index e907f9219..9693ff67e 100644 --- a/desmume/src/windows/winutil.cpp +++ b/desmume/src/windows/winutil.cpp @@ -53,6 +53,19 @@ void GetINIPath() } } +void PreventScreensaver() +{ + //a 0,0 mouse motion is indeed sufficient + //i have been unable to notice any ill effects + INPUT fakeMouse; + fakeMouse.type = INPUT_MOUSE; + fakeMouse.mi.dx = fakeMouse.mi.dy = 0; + fakeMouse.mi.dwFlags = MOUSEEVENTF_MOVE; + fakeMouse.mi.time = 0; + fakeMouse.mi.dwExtraInfo = 0; + SendInput(1,&fakeMouse,sizeof(INPUT)); +} + void WritePrivateProfileBool(char* appname, char* keyname, bool val, char* file) { char temp[256] = ""; diff --git a/desmume/src/windows/winutil.h b/desmume/src/windows/winutil.h index a248e68d0..93cb19eb5 100644 --- a/desmume/src/windows/winutil.h +++ b/desmume/src/windows/winutil.h @@ -28,5 +28,6 @@ extern char IniName[MAX_PATH]; void GetINIPath(); +void PreventScreensaver(); #endif