mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2024-11-24 05:20:10 +01:00
Simplify configurable GetAsyncKeyState
Setting the VK code to zero effectively disables these anyway.
This commit is contained in:
parent
beeebf3946
commit
b799f9f446
@ -196,11 +196,11 @@ static HRESULT gpio_ioctl_get_psw(struct irp *irp)
|
|||||||
/* Bit 0 == SW1 == Alt. Test */
|
/* Bit 0 == SW1 == Alt. Test */
|
||||||
/* Bit 1 == SW2 == Alt. Service */
|
/* Bit 1 == SW2 == Alt. Service */
|
||||||
|
|
||||||
if (gpio_config.vk_sw1 && (GetAsyncKeyState(gpio_config.vk_sw1) & 0x8000)) {
|
if (GetAsyncKeyState(gpio_config.vk_sw1) & 0x8000) {
|
||||||
result |= 1 << 0;
|
result |= 1 << 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gpio_config.vk_sw2 && (GetAsyncKeyState(gpio_config.vk_sw2) & 0x8000)) {
|
if (GetAsyncKeyState(gpio_config.vk_sw2) & 0x8000) {
|
||||||
result |= 1 << 1;
|
result |= 1 << 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,13 +50,11 @@ void idz_io_jvs_read_buttons(uint8_t *opbtn_out, uint8_t *gamebtn_out)
|
|||||||
|
|
||||||
opbtn = 0;
|
opbtn = 0;
|
||||||
|
|
||||||
if ( idz_io_cfg.vk_test &&
|
if (GetAsyncKeyState(idz_io_cfg.vk_test) & 0x8000) {
|
||||||
(GetAsyncKeyState(idz_io_cfg.vk_test) & 0x8000)) {
|
|
||||||
opbtn |= IDZ_IO_OPBTN_TEST;
|
opbtn |= IDZ_IO_OPBTN_TEST;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( idz_io_cfg.vk_service &&
|
if (GetAsyncKeyState(idz_io_cfg.vk_service) & 0x8000) {
|
||||||
(GetAsyncKeyState(idz_io_cfg.vk_service) & 0x8000)) {
|
|
||||||
opbtn |= IDZ_IO_OPBTN_SERVICE;
|
opbtn |= IDZ_IO_OPBTN_SERVICE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user