mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
Made it a fatalerror to registr save state callbacks at the wrong time
if the current driver claims to support save states.
This commit is contained in:
parent
6a7c3d1589
commit
ce011916b4
@ -249,6 +249,8 @@ void state_save_register_memory(const char *module, UINT32 instance, const char
|
||||
if (!ss_registration_allowed)
|
||||
{
|
||||
logerror("Attempt to register save state entry after state registration is closed! module %s name %s\n",module,name);
|
||||
if (Machine->gamedrv->flags & GAME_SUPPORTS_SAVE)
|
||||
fatalerror("Attempt to register save state entry after state registration is closed! module %s name %s\n",module,name);
|
||||
ss_illegal_regs++;
|
||||
return;
|
||||
}
|
||||
@ -315,6 +317,8 @@ static void register_func_void(ss_func **root, void (*func)(void))
|
||||
if (!ss_registration_allowed)
|
||||
{
|
||||
logerror("Attempt to register callback function after state registration is closed!");
|
||||
if (Machine->gamedrv->flags & GAME_SUPPORTS_SAVE)
|
||||
fatalerror("Attempt to register callback function after state registration is closed!");
|
||||
ss_illegal_regs++;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user