Merge pull request #174 from funbars/lib1

fix libretro log interface
This commit is contained in:
Lior Halphon 2019-05-11 00:17:26 +03:00 committed by GitHub
commit 795823e372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -697,6 +697,11 @@ void retro_init(void)
snprintf(retro_save_directory, sizeof(retro_save_directory), "%s", dir);
else
snprintf(retro_save_directory, sizeof(retro_save_directory), "%s", ".");
if (environ_cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &logging))
log_cb = logging.log;
else
log_cb = fallback_log;
}
void retro_deinit(void)
@ -775,11 +780,6 @@ void retro_set_environment(retro_environment_t cb)
{
environ_cb = cb;
if (cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &logging))
log_cb = logging.log;
else
log_cb = fallback_log;
cb(RETRO_ENVIRONMENT_SET_SUBSYSTEM_INFO, (void*)subsystems);
}