mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Make the old behavior that the UI shrinks if the window is small optional. New hidden setting [General]/ShrinkIfWindowSmall
This commit is contained in:
1 parent
cfe807baed
commit
9155de3358
3 files changed
+6
No files matched your search
@@ -331,6 +331,7 @@ static const ConfigSetting generalSettings[] = {
|
||||
ConfigSetting("WindowY", SETTING(g_Config, iWindowY), -1, CfgFlag::DEFAULT),
|
||||
ConfigSetting("WindowWidth", SETTING(g_Config, iWindowWidth), 0, CfgFlag::DEFAULT), // 0 will be automatically reset later (need to do the AdjustWindowRect dance).
|
||||
ConfigSetting("WindowHeight", SETTING(g_Config, iWindowHeight), 0, CfgFlag::DEFAULT),
|
||||
ConfigSetting("ShrinkIfWindowSmall", SETTING(g_Config, bShrinkIfWindowSmall), false, CfgFlag::DEFAULT),
|
||||
#endif
|
||||
|
||||
ConfigSetting("PauseWhenMinimized", SETTING(g_Config, bPauseWhenMinimized), false, CfgFlag::PER_GAME),
|
||||
|
||||
@@ -194,6 +194,7 @@ public:
|
||||
|
||||
bool bDisableHTTPS;
|
||||
|
||||
bool bShrinkIfWindowSmall;
|
||||
bool bSeparateSASThread;
|
||||
int iIOTimingMethod;
|
||||
int iLockedCPUSpeed;
|
||||
|
||||
@@ -1645,6 +1645,10 @@ bool Native_IsWindowHidden() {
|
||||
}
|
||||
|
||||
static bool IsWindowSmall(int pixelWidth, int pixelHeight) {
|
||||
if (!g_Config.bShrinkIfWindowSmall) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Can't take this from config as it will not be set if windows is maximized.
|
||||
int w = (int)(pixelWidth * g_display.dpi_scale_real_x);
|
||||
int h = (int)(pixelHeight * g_display.dpi_scale_real_y);
|
||||
|
||||
Reference in new issue
Block a user