Make Graphics.transition a no-op in libretro builds when not frozen

This commit is contained in:
刘皓 2025-04-05 21:37:27 -04:00
parent 6b59b60fe7
commit b1f1fb7571
No known key found for this signature in database
GPG key ID: 7901753DB465B711
3 changed files with 9 additions and 0 deletions

View file

@ -63,6 +63,10 @@ namespace mkxp_sandbox {
duration = 8;
vague = 40;
if (!shState->graphics().frozen()) {
return SANDBOX_NIL;
}
if (argc >= 1) {
SANDBOX_AWAIT_AND_SET(duration, rb_num2int, ((VALUE *)(**sb() + argv))[0]);
if (argc >= 2) {

View file

@ -1321,6 +1321,10 @@ void Graphics::freeze() {
p->compositeToBuffer(p->frozenScene);
}
bool Graphics::frozen() {
return p->frozen;
}
void Graphics::transition(int duration, Bitmap *transMap, int vague, int start, int stop) {
p->checkSyncLock();

View file

@ -42,6 +42,7 @@ public:
void update(bool checkForShutdown = true);
void freeze();
bool frozen();
void transition(int duration = 8,
Bitmap *transMap = 0,
int vague = 40,