mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-19 01:10:39 +02:00
Rework the internal API for applying the fullscreen state. Fixes.
This commit is contained in:
1 parent
d331af58ab
commit
ad4da764df
15 files changed
+85
-102
No files matched your search
+9
-11
@@ -1431,7 +1431,15 @@ void MainScreen::CreateViews() {
|
||||
ImageID icon(g_Config.bFullScreen ? "I_RESTORE" : "I_FULLSCREEN");
|
||||
fullscreenButton_ = logo->Add(new Button(gr->T("FullScreen", "Full Screen"), icon, new AnchorLayoutParams(48, 48, NONE, 0, 0, NONE, Centering::None)));
|
||||
fullscreenButton_->SetIgnoreText(true);
|
||||
fullscreenButton_->OnClick.Handle(this, &MainScreen::OnFullScreenToggle);
|
||||
fullscreenButton_->OnClick.Add([this](UI::EventParams &e) {
|
||||
if (fullscreenButton_) {
|
||||
fullscreenButton_->SetImageID(ImageID(!g_Config.bFullScreen ? "I_RESTORE" : "I_FULLSCREEN"));
|
||||
}
|
||||
#if !defined(MOBILE_DEVICE)
|
||||
g_Config.bFullScreen = !g_Config.bFullScreen;
|
||||
System_ApplyFullscreenState();
|
||||
#endif
|
||||
});
|
||||
#endif
|
||||
rightColumnItems->Add(logo);
|
||||
|
||||
@@ -1510,16 +1518,6 @@ void MainScreen::OnLoadFile(UI::EventParams &e) {
|
||||
}
|
||||
}
|
||||
|
||||
void MainScreen::OnFullScreenToggle(UI::EventParams &e) {
|
||||
if (fullscreenButton_) {
|
||||
fullscreenButton_->SetImageID(ImageID(!g_Config.bFullScreen ? "I_RESTORE" : "I_FULLSCREEN"));
|
||||
}
|
||||
#if !defined(MOBILE_DEVICE)
|
||||
g_Config.bFullScreen = !g_Config.bFullScreen;
|
||||
System_ToggleFullscreenState("");
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainScreen::DrawBackground(UIContext &dc) {
|
||||
if (highlightedGamePath_.empty() && prevHighlightedGamePath_.empty()) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user