Backport orbea commits - don't unload content if it was never loaded -

don't deinit core when they are not inited - sorry for the long delays
This commit is contained in:
twinaphex 2018-10-12 23:12:06 +02:00
parent 4a67dd8d02
commit 84948c9b8b

View File

@ -396,7 +396,9 @@ bool core_unload(void)
{
video_driver_set_cached_frame_ptr(NULL);
current_core.retro_deinit();
if (current_core.inited)
current_core.retro_deinit();
return true;
}
@ -407,9 +409,11 @@ bool core_unload_game(void)
video_driver_set_cached_frame_ptr(NULL);
current_core.retro_unload_game();
current_core.game_loaded = false;
if (current_core.game_loaded)
{
current_core.retro_unload_game();
current_core.game_loaded = false;
}
audio_driver_stop();