]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Workaround for compiler bug(?).
authorToni Wilen <twilen@winuae.net>
Wed, 19 Jun 2024 15:12:09 +0000 (18:12 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 19 Jun 2024 15:12:09 +0000 (18:12 +0300)
inputdevice.cpp

index e158d0b6e78d031a617002f3da6477868fb18ae7..3720581e62fad3113ced988f3d29247f43b0e0ec 100644 (file)
@@ -9147,7 +9147,6 @@ static void swapjoydevice (struct uae_input_device *uid, const int **swaps)
 // swap gameports ports, remember to handle customized ports too
 void inputdevice_swap_compa_ports (struct uae_prefs *prefs, int portswap)
 {
-       struct jport tmp;
 #if 0
        if ((prefs->jports[portswap].id == JPORT_CUSTOM || prefs->jports[portswap + 1].id == JPORT_CUSTOM)) {
                const int *swaps[2];
@@ -9160,10 +9159,11 @@ void inputdevice_swap_compa_ports (struct uae_prefs *prefs, int portswap)
                }
        }
 #endif
+       struct jport tmp = { 0 };
        memcpy (&tmp, &prefs->jports[portswap], sizeof (struct jport));
        memcpy (&prefs->jports[portswap], &prefs->jports[portswap + 1], sizeof (struct jport));
        memcpy (&prefs->jports[portswap + 1], &tmp, sizeof (struct jport));
-       inputdevice_updateconfig (NULL, prefs);
+       inputdevice_updateconfig(NULL, prefs);
 }
 
 // swap device "devnum" ports 0<>1 and 2<>3