windows: improve "background input" a bit
This commit is contained in:
parent
f969eedf7d
commit
6e40d456f9
|
@ -3664,10 +3664,10 @@ DEFINE_LUA_FUNCTION(input_getcurrentinputstatus, "")
|
||||||
#if defined(_WIN32) && !defined(WXPORT)
|
#if defined(_WIN32) && !defined(WXPORT)
|
||||||
// keyboard and mouse button status
|
// keyboard and mouse button status
|
||||||
{
|
{
|
||||||
int BackgroundInput = 0;//TODO
|
extern bool allowBackgroundInput;
|
||||||
|
|
||||||
unsigned char keys [256];
|
unsigned char keys [256];
|
||||||
if(!BackgroundInput)
|
if(!allowBackgroundInput)
|
||||||
{
|
{
|
||||||
if(GetKeyboardState(keys))
|
if(GetKeyboardState(keys))
|
||||||
{
|
{
|
||||||
|
|
|
@ -3863,6 +3863,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
DesEnableMenuItem(mainMenu, ID_RAM_WATCH, romloaded);
|
DesEnableMenuItem(mainMenu, ID_RAM_WATCH, romloaded);
|
||||||
DesEnableMenuItem(mainMenu, ID_RAM_SEARCH, romloaded);
|
DesEnableMenuItem(mainMenu, ID_RAM_SEARCH, romloaded);
|
||||||
|
|
||||||
|
DesEnableMenuItem(mainMenu, IDC_BACKGROUNDINPUT, !lostFocusPause);
|
||||||
|
|
||||||
//Update savestate slot items based on ROM loaded
|
//Update savestate slot items based on ROM loaded
|
||||||
for (int x = 0; x < 10; x++)
|
for (int x = 0; x < 10; x++)
|
||||||
{
|
{
|
||||||
|
@ -5132,7 +5134,9 @@ DOKEYDOWN:
|
||||||
|
|
||||||
case IDC_BACKGROUNDPAUSE:
|
case IDC_BACKGROUNDPAUSE:
|
||||||
lostFocusPause = !lostFocusPause;
|
lostFocusPause = !lostFocusPause;
|
||||||
|
allowBackgroundInput &= !lostFocusPause;
|
||||||
WritePrivateProfileInt("Focus", "BackgroundPause", (int)lostFocusPause, IniName);
|
WritePrivateProfileInt("Focus", "BackgroundPause", (int)lostFocusPause, IniName);
|
||||||
|
WritePrivateProfileInt("Controls", "AllowBackgroundInput", (int)allowBackgroundInput, IniName);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case IDC_BACKGROUNDINPUT:
|
case IDC_BACKGROUNDINPUT:
|
||||||
|
|
Loading…
Reference in New Issue