Reset static device state on core unload to ensure input descriptors refresh
This commit is contained in:
parent
5c1249c55f
commit
8b35fb80b4
|
@ -311,6 +311,9 @@ static void retro_keyboard_event(bool down, unsigned keycode, uint32_t character
|
||||||
// Now comes the interesting stuff
|
// Now comes the interesting stuff
|
||||||
void retro_init()
|
void retro_init()
|
||||||
{
|
{
|
||||||
|
first_run = true;
|
||||||
|
memset(device_type, -1, sizeof(device_type));
|
||||||
|
|
||||||
static bool emuInited;
|
static bool emuInited;
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
|
@ -371,6 +374,7 @@ void retro_deinit()
|
||||||
{
|
{
|
||||||
INFO_LOG(COMMON, "retro_deinit");
|
INFO_LOG(COMMON, "retro_deinit");
|
||||||
first_run = true;
|
first_run = true;
|
||||||
|
memset(device_type, -1, sizeof(device_type));
|
||||||
|
|
||||||
//When auto-save states are enabled this is needed to prevent the core from shutting down before
|
//When auto-save states are enabled this is needed to prevent the core from shutting down before
|
||||||
//any save state actions are still running - which results in partial saves
|
//any save state actions are still running - which results in partial saves
|
||||||
|
|
Loading…
Reference in New Issue