Revert "Add some more private libretro environs"

This reverts commit f4fc179cae.
This commit is contained in:
twinaphex 2015-12-07 14:26:21 +01:00
parent f4fc179cae
commit 76b3079bc8
2 changed files with 6 additions and 16 deletions

View File

@ -67,6 +67,7 @@ static dylib_t lib_handle;
#endif
struct retro_core_t core;
static bool ignore_environment_cb;
#ifdef HAVE_DYNAMIC
static bool *load_no_content_hook;
@ -114,9 +115,9 @@ void libretro_get_environment_info(void (*func)(retro_environment_t),
/* It's possible that we just set get_system_info callback to the currently running core.
* Make sure we reset it to the actual environment callback.
* Ignore any environment callbacks here in case we're running on the non-current core. */
rarch_environment_cb(RETRO_ENVIRONMENT_SET_IGNORE_ENVIRON_CB, NULL);
ignore_environment_cb = true;
func(rarch_environment_cb);
rarch_environment_cb(RETRO_ENVIRONMENT_UNSET_IGNORE_ENVIRON_CB, NULL);
ignore_environment_cb = false;
}
static dylib_t libretro_get_system_info_lib(const char *path,
@ -603,10 +604,9 @@ static void rarch_log_libretro(enum retro_log_level level,
bool rarch_environment_cb(unsigned cmd, void *data)
{
unsigned p;
static bool ignore_environment_cb = false;
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
rarch_system_info_t *system = rarch_system_info_get_ptr();
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
rarch_system_info_t *system = rarch_system_info_get_ptr();
if (ignore_environment_cb)
return false;
@ -1232,12 +1232,6 @@ bool rarch_environment_cb(unsigned cmd, void *data)
RARCH_LOG("Environ (Private) EXEC.\n");
}
break;
case RETRO_ENVIRONMENT_SET_IGNORE_ENVIRON_CB:
ignore_environment_cb = true;
break;
case RETRO_ENVIRONMENT_UNSET_IGNORE_ENVIRON_CB:
ignore_environment_cb = false;
break;
default:
RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd);

View File

@ -60,10 +60,6 @@
* _EXEC. NULL means no game.
*/
#define RETRO_ENVIRONMENT_SET_IGNORE_ENVIRON_CB (RETRO_ENVIRONMENT_PRIVATE | 3)
#define RETRO_ENVIRONMENT_UNSET_IGNORE_ENVIRON_CB (RETRO_ENVIRONMENT_PRIVATE | 4)
#endif