mirror of
https://github.com/libretro/RetroArch
synced 2025-02-15 18:39:55 +00:00
Add RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL.
This commit is contained in:
parent
b97644f52f
commit
b2387e06bc
@ -320,6 +320,10 @@ static bool environment_cb(unsigned cmd, void *data)
|
|||||||
g_extern.system.shutdown = true;
|
g_extern.system.shutdown = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL:
|
||||||
|
g_extern.system.performance_level = *(const unsigned*)data;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd);
|
RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd);
|
||||||
return false;
|
return false;
|
||||||
|
@ -329,6 +329,7 @@ struct global
|
|||||||
|
|
||||||
unsigned rotation;
|
unsigned rotation;
|
||||||
bool shutdown;
|
bool shutdown;
|
||||||
|
unsigned performance_level;
|
||||||
} system;
|
} system;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
|
20
libretro.h
20
libretro.h
@ -122,6 +122,26 @@ extern "C" {
|
|||||||
// Should only be used if game has a specific
|
// Should only be used if game has a specific
|
||||||
// way to shutdown the game from a menu item or similar.
|
// way to shutdown the game from a menu item or similar.
|
||||||
|
|
||||||
|
#define RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL 8
|
||||||
|
// const unsigned * --
|
||||||
|
// Gives a hint to the frontend how demanding this implementation
|
||||||
|
// is on a system. E.g. reporting a level of 2 means
|
||||||
|
// this implementation should run decently on all frontends
|
||||||
|
// of level 2 and up.
|
||||||
|
//
|
||||||
|
// It can be used by the frontend to potentially warn
|
||||||
|
// about too demanding implementations.
|
||||||
|
//
|
||||||
|
// The levels are "floating", but roughly defined as:
|
||||||
|
// 1: Low-powered devices such as Raspberry Pi, smart phones, tablets, etc.
|
||||||
|
// 2: Medium-spec consoles, such as PS3/360, with sub-par CPUs.
|
||||||
|
// 3: Modern desktop/laptops with reasonably powerful CPUs.
|
||||||
|
// 4: High-end desktops with very powerful CPUs.
|
||||||
|
//
|
||||||
|
// This function can be called on a per-game basis,
|
||||||
|
// as certain games an implementation can play might be
|
||||||
|
// particularily demanding.
|
||||||
|
|
||||||
struct retro_message
|
struct retro_message
|
||||||
{
|
{
|
||||||
const char *msg; // Message to be displayed.
|
const char *msg; // Message to be displayed.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user