mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-18 00:32:46 +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;
|
||||
}
|
||||
|
||||
case RETRO_ENVIRONMENT_SHUTDOWN:
|
||||
g_extern.system.shutdown = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd);
|
||||
return false;
|
||||
|
@ -315,6 +315,7 @@ struct global
|
||||
char *environment_split;
|
||||
|
||||
unsigned rotation;
|
||||
bool shutdown;
|
||||
} system;
|
||||
|
||||
struct
|
||||
|
@ -111,6 +111,10 @@ extern "C" {
|
||||
#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'.
|
||||
// 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
|
||||
{
|
||||
|
@ -2411,7 +2411,8 @@ bool rarch_main_iterate(void)
|
||||
|
||||
// Time to drop?
|
||||
if (input_key_pressed_func(RARCH_QUIT_KEY) ||
|
||||
!video_alive_func())
|
||||
!video_alive_func() ||
|
||||
g_extern.system.shutdown)
|
||||
return false;
|
||||
|
||||
// Checks for stuff like fullscreen, save states, etc.
|
||||
|
Loading…
x
Reference in New Issue
Block a user