libretro: set an SDL hint to keep flycast SIGSEGV handler

Thanks to mrfixit2001 for helping troubleshoot the issue.
This commit is contained in:
Flyinghead 2024-12-21 12:25:30 +01:00 committed by flyinghead
parent 2ca9187137
commit 0558c957e8
1 changed files with 7 additions and 0 deletions

View File

@ -27,6 +27,8 @@
#include <stdlib.h>
#include <string.h>
#include "nswitch.h"
#elif defined(__linux__) || defined(__FreeBSD__)
#include <stdlib.h>
#endif
#include <sys/stat.h>
@ -348,6 +350,11 @@ void retro_init()
if (!addrspace::reserve())
ERROR_LOG(VMEM, "Cannot reserve memory space");
#if defined(__linux__) || defined(__FreeBSD__)
// SDL evdev keyboard driver installs a SIGSEGV signal handler by default, which replaces flycast's one.
// Make sure to avoid this if SDL is initialized after the core (which happens).
setenv("SDL_NO_SIGNAL_HANDLERS", "1", 1);
#endif
os_InstallFaultHandler();
MapleConfigMap::UpdateVibration = updateVibration;