Properly catch exceptions in Graphics.update in libretro builds

This commit is contained in:
刘皓 2025-08-18 11:02:54 -04:00
parent 583ddfb45d
commit 643a6bc14f
No known key found for this signature in database
GPG key ID: 7901753DB465B711

View file

@ -57,7 +57,9 @@ static VALUE update(VALUE self) {
struct coro : boost::asio::coroutine {
VALUE operator()(VALUE self) {
BOOST_ASIO_CORO_REENTER (this) {
if (shState->graphics().update(sb().e)) {
bool needs_yield;
SANDBOX_GUARD(needs_yield = shState->graphics().update(sb().e));
if (needs_yield) {
SANDBOX_YIELD;
}
}