Skip to content

Fix framebuffer when loading states/branches with OpenGL-supporting cores #4333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SuuperW
Copy link
Contributor

@SuuperW SuuperW commented May 26, 2025

We used to load the framebuffer of savestates that had screenshots (including TAStudio branches) by copying (and potentially resizing) the image into the core's framebuffer. This does not work with the newer way for cores to provide video output (via OpenGL textures). This resulted in users seeing incorrect images after loading savestates on those cores.

This has been solved by creating a new, temporary IVideoProvider when loading states and using that instead of the core's IVideoProvider until the next frame advance.

Let me know if there are any potential issues with doing things this way. In particular, MainForm's new LoadStateCommon method does more things than TAStudio's branch loading did. I am not sure, but they seems like things that should happen. My Lua script that I regularly use appears to work correctly with this update, but I imagine there could be others that rely on the old behavior.

Check if completed:

SuuperW added 2 commits May 26, 2025 01:41
…at should never happen since we moved to bmp states a very long time ago.
…ta belonging to the core, this ignores the other way that cores can provide video output, OpenGL. Instead, create a video provider for the state and use that.
@SuuperW SuuperW force-pushed the state_framebuffer branch from 6cad612 to d5b3de8 Compare May 26, 2025 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant