From ce9642aa275a6bbd70639d88a4fe3ba96b70b666 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 19 Jun 2024 18:12:09 +0300 Subject: [PATCH] Workaround for compiler bug(?). --- inputdevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inputdevice.cpp b/inputdevice.cpp index e158d0b6..3720581e 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -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 -- 2.47.3