mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 10:43:44 +01: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
@@ -413,13 +413,18 @@ void GameSettingsScreen::CreateGraphicsSettings(UI::ViewGroup *graphicsSettings)
|
||||
|
||||
if (deviceType != DEVICE_TYPE_VR) {
|
||||
#if !defined(MOBILE_DEVICE)
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bFullScreen, gr->T("FullScreen", "Full Screen")))->OnClick.Handle(this, &GameSettingsScreen::OnFullscreenChange);
|
||||
CheckBox *fullscreenCheckbox = graphicsSettings->Add(new CheckBox(&g_Config.bFullScreen, gr->T("FullScreen", "Full Screen")));
|
||||
fullscreenCheckbox->OnClick.Add([](UI::EventParams &e) {
|
||||
System_ApplyFullscreenState();
|
||||
});
|
||||
if (System_GetPropertyInt(SYSPROP_DISPLAY_COUNT) > 1) {
|
||||
CheckBox *fullscreenMulti = new CheckBox(&g_Config.bFullScreenMulti, gr->T("Use all displays"));
|
||||
CheckBox *fullscreenMulti = graphicsSettings->Add(new CheckBox(&g_Config.bFullScreenMulti, gr->T("Use all displays")));
|
||||
fullscreenMulti->SetEnabledFunc([] {
|
||||
return g_Config.bFullScreen;
|
||||
});
|
||||
graphicsSettings->Add(fullscreenMulti)->OnClick.Handle(this, &GameSettingsScreen::OnFullscreenMultiChange);
|
||||
fullscreenMulti->OnClick.Add([](UI::EventParams &e) {
|
||||
System_ApplyFullscreenState();
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1621,14 +1626,6 @@ void GameSettingsScreen::OnChangeBackground(UI::EventParams &e) {
|
||||
// Change to a browse or clear button.
|
||||
}
|
||||
|
||||
void GameSettingsScreen::OnFullscreenChange(UI::EventParams &e) {
|
||||
System_ToggleFullscreenState(g_Config.bFullScreen ? "1" : "0");
|
||||
}
|
||||
|
||||
void GameSettingsScreen::OnFullscreenMultiChange(UI::EventParams &e) {
|
||||
System_ToggleFullscreenState(g_Config.bFullScreen ? "1" : "0");
|
||||
}
|
||||
|
||||
void GameSettingsScreen::dialogFinished(const Screen *dialog, DialogResult result) {
|
||||
bool recreate = false;
|
||||
if (result == DialogResult::DR_OK) {
|
||||
|
||||
Reference in new issue
Block a user