Yeah. RetroPie doesn't update very frequently, the current v4.8 (adding Pi4 support) hasn't been updated for 2 years. I'm using RetroPie v4.7.1, the latest version when I built the system. As it's quite time-consuming to configure everything and most retro games are working fine, usually I only upgrade emulator cores when necessary rather than upgrade the os.
Usually I use apt-get to manage the software packages on Pi. I'm not sure if it could cause any dependency issues to other components if I manually update sdl2. The other thing is, I also run Sx05RE/EmuELEC (https://github.com/EmuELEC/EmuELEC) on several Amlogic tvbox devices. These cheap devices perform better than Pi for retro games, but unlike Pi, their software components cannot be upgraded (for 32-bit images, SDL is locked at 2.0.9). Generally it requires cross compile to build anything for these Amlogic tvbox devices, which beyonds my skillset. But I find that the programs I build on Pi usually work just fine, though sometimes I need import the missing libraries. So the idea is, if I can make raine work on retropie, I also plan to migrate them to these Amlogic tvbox devices. However, if the program I build on Pi explicitly requires a higher version of sdl, I don't think it can work on Amlogic tvbox devices.
Therefore, if possible, I'd prefer to build raine without updating sdl version, but I fully understand that this may require too many code changes. If you evaluate that this is too troublesome and doesn't worth it, I fully understand.
Ok, so I comment the lines you mentioned. Now it fails with the following error:
Compiling source/sdl2/controllermap.c...
In file included from /usr/include/SDL2/SDL_main.h:25,
from /usr/include/SDL2/SDL.h:32,
from source/sdl2/controllermap.c:22:
/usr/include/SDL2/SDL_stdinc.h:313:20: error: size of array ‘SDL_compile_time_assert_s_arrBindingDisplay’ is negative
typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
^~~~~~~~~~~~~~~~~~~~~~~~
source/sdl2/controllermap.c:89:1: note: in expansion of macro ‘SDL_COMPILE_TIME_ASSERT’
SDL_COMPILE_TIME_ASSERT(s_arrBindingDisplay, SDL_arraysize(s_arrBindingDisplay) == BINDING_COUNT);
^~~~~~~~~~~~~~~~~~~~~~~
source/sdl2/controllermap.c:117:5: error: ‘SDL_CONTROLLER_BUTTON_MISC1’ undeclared here (not in a function); did you mean ‘SDL_CONTROLLER_BUTTON_MAX’?
SDL_CONTROLLER_BUTTON_MISC1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
SDL_CONTROLLER_BUTTON_MAX
source/sdl2/controllermap.c:118:5: error: ‘SDL_CONTROLLER_BUTTON_PADDLE1’ undeclared here (not in a function); did you mean ‘SDL_CONTROLLER_BUTTON_DPAD_LEFT’?
SDL_CONTROLLER_BUTTON_PADDLE1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SDL_CONTROLLER_BUTTON_DPAD_LEFT
source/sdl2/controllermap.c:119:5: error: ‘SDL_CONTROLLER_BUTTON_PADDLE2’ undeclared here (not in a function); did you mean ‘SDL_CONTROLLER_BUTTON_DPAD_LEFT’?
SDL_CONTROLLER_BUTTON_PADDLE2,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SDL_CONTROLLER_BUTTON_DPAD_LEFT
source/sdl2/controllermap.c:120:5: error: ‘SDL_CONTROLLER_BUTTON_PADDLE3’ undeclared here (not in a function); did you mean ‘SDL_CONTROLLER_BUTTON_DPAD_LEFT’?
SDL_CONTROLLER_BUTTON_PADDLE3,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SDL_CONTROLLER_BUTTON_DPAD_LEFT
source/sdl2/controllermap.c:121:5: error: ‘SDL_CONTROLLER_BUTTON_PADDLE4’ undeclared here (not in a function); did you mean ‘SDL_CONTROLLER_BUTTON_DPAD_LEFT’?
SDL_CONTROLLER_BUTTON_PADDLE4,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SDL_CONTROLLER_BUTTON_DPAD_LEFT
source/sdl2/controllermap.c:122:5: error: ‘SDL_CONTROLLER_BUTTON_TOUCHPAD’ undeclared here (not in a function); did you mean ‘SDL_CONTROLLER_BUTTON_MAX’?
SDL_CONTROLLER_BUTTON_TOUCHPAD,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SDL_CONTROLLER_BUTTON_MAX
In file included from /usr/include/SDL2/SDL_main.h:25,
from /usr/include/SDL2/SDL.h:32,
from source/sdl2/controllermap.c:22:
/usr/include/SDL2/SDL_stdinc.h:313:20: error: size of array ‘SDL_compile_time_assert_s_arrBindingOrder’ is negative
typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
^~~~~~~~~~~~~~~~~~~~~~~~
source/sdl2/controllermap.c:124:1: note: in expansion of macro ‘SDL_COMPILE_TIME_ASSERT’
SDL_COMPILE_TIME_ASSERT(s_arrBindingOrder, SDL_arraysize(s_arrBindingOrder) == BINDING_COUNT);
^~~~~~~~~~~~~~~~~~~~~~~
source/sdl2/controllermap.c: In function ‘WatchJoystick’:
source/sdl2/controllermap.c:570:17: error: ‘SDL_FALLTHROUGH’ undeclared (first use in this function); did you mean ‘SDL_HAT_RIGHT’?
SDL_FALLTHROUGH;
^~~~~~~~~~~~~~~
SDL_HAT_RIGHT
source/sdl2/controllermap.c:570:17: note: each undeclared identifier is reported only once for each function it appears in
make: *** [makefile:1515: linux-gnu-sdl2/object/sdl2/controllermap.o] Error 1
1. I have no idea about the SDL_compile_time_assert error.
2. SDL_CONTROLLER_BUTTON_MISC1/PADDLE1/PADDLE2/PADDLE3/PADDLE4/TOUCHPAD errors: They are not defined in SDL_gamecontroller.h in sdl 2.0.10. Not suse which version initially adds them.
3. SDL_FALLTHROUGH error: It's not defined in begin_code.h. Not suse which version initially adds it.
I remember I read somewhere that you mention the old raine code is not easy to compile on non-windows platforms. Do you think it would be easier or more difficult if I choose to build an old version before december 2021 (for example, 0.91.21)?