Closed garbear closed 6 months ago
This PR splits CLibretroEnvironment::Initialize() into two functions:
The purpose is to move callback initialization after retro_init(). Setting callbacks before retro_init() causes Mesen to crash.
Upon inspection of RetroArch, their code sets callbacks after retro_init() also, so this should be a safe move.
Reported here: https://forum.kodi.tv/showthread.php?tid=173361&pid=3180238#pid3180238
Before: Mesen segfaults when setting callbacks
After: Mesen loads successfully
Confirmed working here: https://forum.kodi.tv/showthread.php?tid=173361&pid=3180858#pid3180858
I'll get this fix in to the latest Nexus and Omega releases.
Description
This PR splits CLibretroEnvironment::Initialize() into two functions:
The purpose is to move callback initialization after retro_init(). Setting callbacks before retro_init() causes Mesen to crash.
Upon inspection of RetroArch, their code sets callbacks after retro_init() also, so this should be a safe move.
Motivation and context
Reported here: https://forum.kodi.tv/showthread.php?tid=173361&pid=3180238#pid3180238
How has this been tested?
Before: Mesen segfaults when setting callbacks
After: Mesen loads successfully