mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #1566 from CrazyMax/master
disable background input for Windows
This commit is contained in:
commit
b66ac96ecd
1 changed files with 2 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "input/input_state.h"
|
||||
#include "Windows/WndMainWindow.h"
|
||||
#include "KeyboardDevice.h"
|
||||
#include "../Common/CommonTypes.h"
|
||||
#include "../Core/HLE/sceCtrl.h"
|
||||
|
@ -28,6 +29,7 @@ unsigned short analog_ctrl_map[] = {
|
|||
};
|
||||
|
||||
int KeyboardDevice::UpdateState(InputState &input_state) {
|
||||
if (MainWindow::GetHWND() != GetForegroundWindow()) return -1;
|
||||
bool alternate = GetAsyncKeyState(VK_SHIFT) != 0;
|
||||
static u32 alternator = 0;
|
||||
bool doAlternate = alternate && (alternator++ % 10) < 5;
|
||||
|
|
Loading…
Add table
Reference in a new issue