mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-19 15:28:25 +00:00
Add RETRO_ENVIRONMENT_GET_LIBRETRO_PATH.
Vital for cores which do not load a ROM, but still want to load assets somehow. Demos and the like ...
This commit is contained in:
parent
b9cbcd0b81
commit
b7fa652b1e
11
dynamic.c
11
dynamic.c
@ -700,6 +700,17 @@ static bool environment_cb(unsigned cmd, void *data)
|
||||
break;
|
||||
}
|
||||
|
||||
case RETRO_ENVIRONMENT_GET_LIBRETRO_PATH:
|
||||
{
|
||||
const char **path = (const char**)data;
|
||||
#ifdef HAVE_DYNAMIC
|
||||
*path = g_settings.libretro;
|
||||
#else
|
||||
*path = NULL;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd);
|
||||
return false;
|
||||
|
@ -480,6 +480,12 @@ enum retro_mod
|
||||
// If true, the libretro implementation supports calls to retro_load_game() with NULL as argument.
|
||||
// Used by cores which can run without particular game data.
|
||||
// This should be called within retro_set_environment() only.
|
||||
//
|
||||
#define RETRO_ENVIRONMENT_GET_LIBRETRO_PATH 19
|
||||
// const char ** --
|
||||
// Retrieves the absolute path from where this libretro implementation was loaded.
|
||||
// NULL is returned if the libretro was loaded statically (i.e. linked statically to frontend), or if the path cannot be determined.
|
||||
// Mostly useful in cooperation with SET_SUPPORT_NO_GAME as assets can be loaded without ugly hacks.
|
||||
|
||||
|
||||
// Pass this to retro_video_refresh_t if rendering to hardware.
|
||||
|
Loading…
x
Reference in New Issue
Block a user