Skip to content

Commit

Permalink
libretro: set an SDL hint to keep flycast SIGSEGV handler
Browse files Browse the repository at this point in the history
Thanks to mrfixit2001 for helping troubleshoot the issue.
  • Loading branch information
flyinghead committed Dec 21, 2024
1 parent 989d3b1 commit b72750c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions shell/libretro/libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -350,6 +352,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;

Expand Down

0 comments on commit b72750c

Please sign in to comment.