]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Re-enabled command line only non-rawinput keyboard and mouse support.
authorToni Wilen <twilen@winuae.net>
Mon, 8 Jan 2018 18:18:29 +0000 (20:18 +0200)
committerToni Wilen <twilen@winuae.net>
Mon, 8 Jan 2018 18:18:29 +0000 (20:18 +0200)
od-win32/dinput.cpp
od-win32/win32.cpp

index f344dd8653cf4cb9959ec36f352078b71e59cf05..bf21471e3da63236e67361ad6d09c96feaf3f69f 100644 (file)
@@ -2592,7 +2592,7 @@ static void handle_rawinput_2 (RAWINPUT *raw)
 
 bool is_hid_rawinput(void)
 {
-       if (no_rawinput)
+       if (no_rawinput & 4)
                return false;
        if (!rawinput_enabled_hid && !rawinput_enabled_hid_reset)
                return false;
@@ -2914,7 +2914,7 @@ static BOOL CALLBACK EnumObjectsCallback (const DIDEVICEOBJECTINSTANCE* pdidoi,
        }
 
        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) {
@@ -3196,8 +3196,10 @@ static int di_do_init (void)
                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) {
index e3170df9b8dc42512a98c24ee3c0555c6b389f5a..5eba68ab905a733867a06c57cf0944cee41f4fc6 100644 (file)
@@ -5795,8 +5795,20 @@ static int parseargs (const TCHAR *argx, const TCHAR *np, const TCHAR *np2)
                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"))) {