mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Merge pull request #10459 from unknownbrackets/ui-resized
UI: Trigger view recreate on static sized screens
This commit is contained in:
commit
8ebbb82c0a
@ -165,7 +165,11 @@ bool DisplayLayoutScreen::touch(const TouchInput &touch) {
|
||||
picked_ = 0;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
void DisplayLayoutScreen::resized() {
|
||||
RecreateViews();
|
||||
}
|
||||
|
||||
void DisplayLayoutScreen::onFinish(DialogResult reason) {
|
||||
g_Config.Save();
|
||||
|
@ -31,6 +31,7 @@ public:
|
||||
virtual bool touch(const TouchInput &touch) override;
|
||||
virtual void dialogFinished(const Screen *dialog, DialogResult result) override;
|
||||
virtual void onFinish(DialogResult reason) override;
|
||||
virtual void resized() override;
|
||||
std::string tag() const override { return "display layout screen"; }
|
||||
|
||||
protected:
|
||||
|
@ -1099,10 +1099,6 @@ void NativeResized() {
|
||||
// NativeResized can come from any thread so we just set a flag, then process it later.
|
||||
if (g_graphicsInited) {
|
||||
resized = true;
|
||||
if (uiContext) {
|
||||
// Still have to update bounds to avoid problems in display layout and touch controls layout screens
|
||||
uiContext->SetBounds(Bounds(0, 0, dp_xres, dp_yres));
|
||||
}
|
||||
} else {
|
||||
ILOG("NativeResized ignored, not initialized");
|
||||
}
|
||||
|
@ -279,7 +279,11 @@ bool TouchControlLayoutScreen::touch(const TouchInput &touch) {
|
||||
pickedControl_ = 0;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
void TouchControlLayoutScreen::resized() {
|
||||
RecreateViews();
|
||||
}
|
||||
|
||||
void TouchControlLayoutScreen::onFinish(DialogResult reason) {
|
||||
g_Config.Save();
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
virtual bool touch(const TouchInput &touch) override;
|
||||
virtual void dialogFinished(const Screen *dialog, DialogResult result) override;
|
||||
virtual void onFinish(DialogResult reason) override;
|
||||
virtual void resized() override;
|
||||
|
||||
protected:
|
||||
virtual UI::EventReturn OnReset(UI::EventParams &e);
|
||||
|
@ -279,10 +279,6 @@ namespace MainWindow
|
||||
NativeMessageReceived("gpu_resized", "");
|
||||
}
|
||||
|
||||
if (screenManager) {
|
||||
screenManager->RecreateAllViews();
|
||||
}
|
||||
|
||||
// Don't save the window state if fullscreen.
|
||||
if (!g_Config.bFullScreen) {
|
||||
g_WindowState = newSizingType;
|
||||
|
@ -309,6 +309,10 @@ void PopupScreen::TriggerFinish(DialogResult result) {
|
||||
OnCompleted(result);
|
||||
}
|
||||
|
||||
void PopupScreen::resized() {
|
||||
RecreateViews();
|
||||
}
|
||||
|
||||
void PopupScreen::CreateViews() {
|
||||
using namespace UI;
|
||||
UIContext &dc = *screenManager()->getUIContext();
|
||||
|
@ -72,6 +72,7 @@ public:
|
||||
virtual bool isTransparent() const override { return true; }
|
||||
virtual bool touch(const TouchInput &touch) override;
|
||||
virtual bool key(const KeyInput &key) override;
|
||||
virtual void resized() override;
|
||||
|
||||
virtual void TriggerFinish(DialogResult result) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user