Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,12 @@ void EngineMainLoop(void)
}
#endif

// NOTE: If other platforms do V-Sync asynchronously, we may need to incorporate this wait.
#if PLATFORM_GBA
Copy link
Copy Markdown
Collaborator

@freshollie freshollie Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this, why not just remove DISPSTAT_VBLANK in your implementation after vblank?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified it a bit.
I just think it's better not to have an if in there that is always false, except for GBA (and maybe like DS if we ever port it to that).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But like, what I mean is all you have to do is REG_DISPSTAT &= ~DISPSTAT_VBLANK in your VBlankIntrWait implementation and then this check wouldn't cause issues?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it shouldn't have to happen in the first place.

Kept in, it'll just be an unnecessary check that happens every frame for literally no reason. 😅

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm looking at the code and I'm very confused how DISPSTAT_VBLANK is ever set on REG_DISPSTAT in the opengl backend?

I understand that his this is a possible solution to the issue, but it's not the root cause. I don't believe removing this check should be necessary since it works when software rendering

// Wait for vblank to finish
while (REG_DISPSTAT & DISPSTAT_VBLANK)
;
#endif
};
}

Expand Down
Loading