bool is_hid_rawinput(void)
{
- if (no_rawinput)
+ if (no_rawinput & 4)
return false;
if (!rawinput_enabled_hid && !rawinput_enabled_hid_reset)
return false;
}
if (pdidoi->dwType & DIDFT_BUTTON) {
- if (did->buttons >= ID_BUTTON_TOTAL)
+ if (did->buttons >= ID_BUTTON_TOTAL && did->type != DID_KEYBOARD)
return DIENUM_CONTINUE;
TCHAR *bname = did->buttonname[did->buttons] = my_strdup (pdidoi->tszName);
if (did->type == DID_JOYSTICK) {
rawinput_enabled_hid = 0;
if (!rawinput_decided) {
- rawinput_enabled_keyboard = true;
- rawinput_enabled_mouse = true;
+ if (!(no_rawinput & 1))
+ rawinput_enabled_keyboard = true;
+ if (!(no_rawinput & 2))
+ rawinput_enabled_mouse = true;
rawinput_decided = true;
}
if (!rawhid_found) {
pngprint = 1;
return 1;
}
- if (!_tcscmp (arg, _T("norawinput"))) {
- no_rawinput = 1;
+ if (!_tcscmp(arg, _T("norawinput"))) {
+ no_rawinput |= 4;
+ return 1;
+ }
+ if (!_tcscmp(arg, _T("norawinput_all"))) {
+ no_rawinput = 7;
+ return 1;
+ }
+ if (!_tcscmp(arg, _T("norawinput_keyboard"))) {
+ no_rawinput |= 1;
+ return 1;
+ }
+ if (!_tcscmp(arg, _T("norawinput_mouse"))) {
+ no_rawinput |= 2;
return 1;
}
if (!_tcscmp (arg, _T("nodirectinput"))) {