Request libretro frontend shutdown when the game exits

This commit is contained in:
刘皓 2025-06-26 22:41:54 -04:00
parent 2f5850bfc1
commit 96f39f3913
No known key found for this signature in database
GPG key ID: 7901753DB465B711

View file

@ -758,6 +758,7 @@ struct main : boost::asio::coroutine {
SANDBOX_AWAIT_S(0, rb_rescue2, func, SANDBOX_NIL, rescue, SANDBOX_NIL, sb()->rb_eException(), 0);
if (SANDBOX_VALUE_TO_BOOL(SANDBOX_SLOT(0))) {
log_printf(RETRO_LOG_INFO, "Game exited; terminating\n");
environment(RETRO_ENVIRONMENT_SHUTDOWN, nullptr);
} else {
log_printf(RETRO_LOG_ERROR, "Game threw an exception; terminating\n");
}