mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 20:59:00 +00:00
EMI: Fix crash when restarting the game
ResidualVM's EMI patch installs a custom version of system_prefs.loadprefs which maps config reads to GetResidualVMPreference() calls. The original system_prefs.cfg is saved and used as source for default values. When the custom loadprefs function is called a second time (i.e. when using the New Game option in the main menu) any config read results in an endless recursion.
This commit is contained in:
parent
434cb0859a
commit
6bb31ac575
@ -38,6 +38,11 @@ end
|
||||
|
||||
--Overwrite stock loadprefs function
|
||||
system_prefs.loadprefs = function(table, filename)
|
||||
--avoid installing tag methods repeatedly when starting a new game
|
||||
if system_prefs.defaults_cfg ~= nil then
|
||||
return
|
||||
end
|
||||
|
||||
PrintDebug("Function system_prefs.loadprefs modified for ResidualVM loaded")
|
||||
|
||||
--save old cfg table as default values
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user