mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-20 23:54:48 +00:00
Add very simple rapid fire for Windows keyboard.
Mostly to speed up debugging.
This commit is contained in:
parent
b33c94ab93
commit
e8e9f7f9d8
@ -26,8 +26,12 @@ static const unsigned short analog_ctrl_map[] = {
|
||||
};
|
||||
|
||||
int KeyboardDevice::UpdateState() {
|
||||
bool alternate = GetAsyncKeyState(VK_SHIFT) != 0;
|
||||
static u32 alternator = 0;
|
||||
bool doAlternate = alternate && (alternator++ % 10) < 5;
|
||||
|
||||
for (int i = 0; i < sizeof(key_ctrl_map)/sizeof(key_ctrl_map[0]); i += 2) {
|
||||
if (!GetAsyncKeyState(key_ctrl_map[i]))
|
||||
if (!GetAsyncKeyState(key_ctrl_map[i]) || doAlternate)
|
||||
__CtrlButtonUp(key_ctrl_map[i+1]);
|
||||
else {
|
||||
__CtrlButtonDown(key_ctrl_map[i+1]);
|
||||
|
@ -773,6 +773,7 @@ namespace MainWindow
|
||||
"Analog Down\tK",
|
||||
"Analog Left\tJ",
|
||||
"Analog Right\tL",
|
||||
"Rapid Fire\tShift",
|
||||
};
|
||||
// Message handler for about box.
|
||||
LRESULT CALLBACK Controls(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
Loading…
x
Reference in New Issue
Block a user