File fix-joystick.patch of Package postal

commit b7969c2a702b37f35edf098ec50bc61fe1f5c6ee
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date:   Mon Dec 15 07:32:23 2025 +0100

    Avoid bit overflow in joystick constants
    
     In file included from ./RSPiX/Inc/RSPiXUnix.h:48,
                      from ./RSPiX/Inc/RSPiX.h:35,
                      from InputSettings.cpp:108:
     ./RSPiX/Src/BLUE/unix/UnixBlue.h:257:41: error: narrowing conversion of ‘65536’ from ‘int’ to ‘int16_t’ {aka ‘short int’} [-Wnarrowing]
       257 | #define RSP_JOY_BUT_17                  0x00010000
           |                                         ^~~~~~~~~~
     InputSettings.cpp:194:193: note: in expansion of macro ‘RSP_JOY_BUT_17’
       194 |                 {       "Fire",                         "Fire",                         RSP_SK_CONTROL,         0,                                                                              RSP_JOY_BUT_17,                                         },
           |                                                                                                                                                                                                 ^~~~~~~~~~~~~~
     ./RSPiX/Src/BLUE/unix/UnixBlue.h:256:41: error: narrowing conversion of ‘32768’ from ‘int’ to ‘int16_t’ {aka ‘short int’} [-Wnarrowing]
       256 | #define RSP_JOY_BUT_16                  0x00008000
           |                                         ^~~~~~~~~~
     InputSettings.cpp:200:201: note: in expansion of macro ‘RSP_JOY_BUT_16’
       200 |                 {       "Duck",                         "Duck",                         RSP_SK_F,                       0,                                                                              RSP_JOY_BUT_16,                                         },
           |                                                                                                                                                                                                         ^~~~~~~~~~~~~~

diff --git a/InputSettings.h b/InputSettings.h
index ebfe595..bc9acdc 100644
--- a/InputSettings.h
+++ b/InputSettings.h
@@ -156,8 +156,8 @@ class CInputSettings : CSettings
 			char*	pszDescription;	// Description of key.
 			char*	pszSaveName;		// Name for INI.
 			U8		u8DefaultKey;		// Default rspScanKeys val (RSP_SK_*).
-			int16_t	sDefMouseButtons;	// Default rspGetMouse psButtons mask (MouseButtons).
-			int16_t	sDefJoyButtons;	// Default rspGetJoyState buttons mask (JoyButtons).
+			uint32_t	sDefMouseButtons;	// Default rspGetMouse psButtons mask (MouseButtons).
+			uint32_t	sDefJoyButtons;	// Default rspGetJoyState buttons mask (JoyButtons).
 			} InputInfo;
 
 
openSUSE Build Service is sponsored by