From 469a7bed9b4524af552f3b3c97d61cf8ce058e68 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 16 Jun 2011 17:19:57 +0000 Subject: [PATCH] win32: poll hotkeys while no rom is loaded --- src/drivers/win/input.cpp | 13 +++++++++---- src/drivers/win/input.h | 1 + src/drivers/win/main.cpp | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/drivers/win/input.cpp b/src/drivers/win/input.cpp index 9589430f..f5eaf2df 100644 --- a/src/drivers/win/input.cpp +++ b/src/drivers/win/input.cpp @@ -385,15 +385,20 @@ void HandleHotkeys() FCEUI_HandleEmuCommands(FCEUD_TestCommandState); } +void UpdateRawInputAndHotkeys() +{ + KeyboardUpdateState(); + UpdateJoysticks(); + + HandleHotkeys(); +} + void FCEUD_UpdateInput() { bool joy=false,mouse=false; EMOVIEMODE FCEUMOVState = FCEUMOV_Mode(); - KeyboardUpdateState(); - UpdateJoysticks(); - - HandleHotkeys(); + UpdateRawInputAndHotkeys(); { for(int x=0;x<2;x++) diff --git a/src/drivers/win/input.h b/src/drivers/win/input.h index e920ce75..015eec49 100644 --- a/src/drivers/win/input.h +++ b/src/drivers/win/input.h @@ -23,6 +23,7 @@ void InputScreenChanged(int fs); void SetAutoFireDesynch(int DesynchOn); int GetAutoFireDesynch(); uint32 GetGamepadPressedImmediate(); +void UpdateRawInputAndHotkeys(); extern LPDIRECTINPUT7 lpDI; diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index bce7a3a1..676e1199 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -822,6 +822,8 @@ doloopy: //xbsave = NULL; RedrawWindow(hAppWnd,0,0,RDW_ERASE|RDW_INVALIDATE); } + else + UpdateRawInputAndHotkeys(); Sleep(50); if(!exiting) goto doloopy;