mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Add RETRO_ENVIRONMENT_SHUTDOWN.
This commit is contained in:
parent
5185fb7baa
commit
d2b55f38cd
@ -316,6 +316,10 @@ static bool environment_cb(unsigned cmd, void *data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case RETRO_ENVIRONMENT_SHUTDOWN:
|
||||||
|
g_extern.system.shutdown = true;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd);
|
RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd);
|
||||||
return false;
|
return false;
|
||||||
|
@ -315,6 +315,7 @@ struct global
|
|||||||
char *environment_split;
|
char *environment_split;
|
||||||
|
|
||||||
unsigned rotation;
|
unsigned rotation;
|
||||||
|
bool shutdown;
|
||||||
} system;
|
} system;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
|
@ -111,6 +111,10 @@ extern "C" {
|
|||||||
#define RETRO_ENVIRONMENT_SET_MESSAGE 6 // const struct retro_message * --
|
#define RETRO_ENVIRONMENT_SET_MESSAGE 6 // const struct retro_message * --
|
||||||
// Sets a message to be displayed in implementation-specific manner for a certain amount of 'frames'.
|
// Sets a message to be displayed in implementation-specific manner for a certain amount of 'frames'.
|
||||||
// Should not be used for trivial messages, which should simply be logged to stderr.
|
// Should not be used for trivial messages, which should simply be logged to stderr.
|
||||||
|
#define RETRO_ENVIRONMENT_SHUTDOWN 7 // N/A (NULL) --
|
||||||
|
// Requests the frontend to shutdown.
|
||||||
|
// Should only be used if game has a specific
|
||||||
|
// way to shutdown the game from a menu item or similar.
|
||||||
|
|
||||||
struct retro_message
|
struct retro_message
|
||||||
{
|
{
|
||||||
|
@ -2411,7 +2411,8 @@ bool rarch_main_iterate(void)
|
|||||||
|
|
||||||
// Time to drop?
|
// Time to drop?
|
||||||
if (input_key_pressed_func(RARCH_QUIT_KEY) ||
|
if (input_key_pressed_func(RARCH_QUIT_KEY) ||
|
||||||
!video_alive_func())
|
!video_alive_func() ||
|
||||||
|
g_extern.system.shutdown)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Checks for stuff like fullscreen, save states, etc.
|
// Checks for stuff like fullscreen, save states, etc.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user