mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-01 03:57:17 +01:00
Settings: Don't keep the draw and UI contexts in page callbacks
Android replaces both when it loses the surface (a recreate, which
changing the display resolution does, or switching away), but the
settings screen and its views live on. The external display setting's
enabled check, which runs on every draw, then called into the deleted
DrawContext ("Pure virtual function called!"). The UI scale and
"Reload UI atlas" handlers had the same problem with the UIContext.
Look them up through the screen manager when needed instead.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
aa9dfa85f6
commit
ac8440e35d
3 files changed
+10
-8
No files matched your search
@@ -403,9 +403,9 @@ static void BuildUIPage(SettingsPage *page) {
|
||||
using namespace UI;
|
||||
SettingsPageHost *host = page->Host();
|
||||
|
||||
UIContext *uiContext = host->PageScreenManager()->getUIContext();
|
||||
page->Choice("Reload UI atlas").OnClick([uiContext](UI::EventParams &) {
|
||||
uiContext->InvalidateAtlas();
|
||||
// Looked up when clicked, the UI context is recreated along with the graphics.
|
||||
page->Choice("Reload UI atlas").OnClick([host](UI::EventParams &) {
|
||||
host->PageScreenManager()->getUIContext()->InvalidateAtlas();
|
||||
});
|
||||
|
||||
// TODO: Move most of these strings out of the SysInfo category.
|
||||
|
||||
Reference in new issue
Block a user