diff --git a/Common/System/Display.cpp b/Common/System/Display.cpp index 5cb0a4bee4f9..731ab1e3c056 100644 --- a/Common/System/Display.cpp +++ b/Common/System/Display.cpp @@ -56,22 +56,23 @@ DisplayProperties::DisplayProperties() { bool DisplayProperties::Recalculate(int new_pixel_xres, int new_pixel_yres, float new_scale, float customScale) { bool px_changed = false; - if (pixel_xres != new_pixel_xres) { + if (new_pixel_xres > 0 && pixel_xres != new_pixel_xres) { pixel_xres = new_pixel_xres; px_changed = true; } - if (pixel_yres != new_pixel_yres) { + if (new_pixel_yres > 0 && pixel_yres != new_pixel_yres) { pixel_yres = new_pixel_yres; px_changed = true; } - dpi_scale_real = new_scale; - dpi_scale = new_scale / customScale; + if (new_scale > 0) { + dpi_scale_real = new_scale; + } + dpi_scale = dpi_scale_real / customScale; pixel_in_dps = 1.0f / dpi_scale; - int new_dp_xres = (int)(new_pixel_xres * dpi_scale); - int new_dp_yres = (int)(new_pixel_yres * dpi_scale); - + int new_dp_xres = (int)(pixel_xres * dpi_scale); + int new_dp_yres = (int)(pixel_yres * dpi_scale); if (new_dp_xres != dp_xres || new_dp_yres != dp_yres || px_changed) { dp_xres = new_dp_xres; dp_yres = new_dp_yres; diff --git a/Common/System/Display.h b/Common/System/Display.h index 3c1bb436a621..658a44e2a1a3 100644 --- a/Common/System/Display.h +++ b/Common/System/Display.h @@ -41,6 +41,7 @@ struct DisplayProperties { void Print(); // Returns true if the dimensions changed. + // The first three parameters can take -1 to signify "unchanged". bool Recalculate(int new_pixel_xres, int new_pixel_yres, float new_scale, float customScale); }; diff --git a/Core/Config.cpp b/Core/Config.cpp index 64d8b2851970..11c108ad973f 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -341,6 +341,8 @@ static const ConfigSetting generalSettings[] = { ConfigSetting("RunBehindPauseMenu", &g_Config.bRunBehindPauseMenu, false, CfgFlag::DEFAULT), ConfigSetting("ShowGPOLEDs", &g_Config.bShowGPOLEDs, false, CfgFlag::PER_GAME), + + ConfigSetting("UIScaleFactor", &g_Config.iUIScaleFactor, false, CfgFlag::DEFAULT), }; static bool DefaultSasThread() { @@ -2151,3 +2153,7 @@ int MultiplierToVolume100(float multiplier) { } return (int)(powf(multiplier, 1.0f / 1.75f) * 100.f + 0.5f); } + +float UIScaleFactorToMultiplier(int factor) { + return powf(2.0f, (float)factor / 8.0f); +} diff --git a/Core/Config.h b/Core/Config.h index 01fbe5143fd3..686df1df715c 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -138,6 +138,7 @@ struct Config { int iMemStickSizeGB; bool bLoadPlugins; int iAskForExitConfirmationAfterSeconds; + int iUIScaleFactor; // In 8ths of powers of two. int iScreenRotation; // The rotation angle of the PPSSPP UI. Only supported on Android and possibly other mobile platforms. int iInternalScreenRotation; // The internal screen rotation angle. Useful for vertical SHMUPs and similar. diff --git a/Core/ConfigValues.h b/Core/ConfigValues.h index 1dd1fc88b4e2..5033606d89ac 100644 --- a/Core/ConfigValues.h +++ b/Core/ConfigValues.h @@ -43,6 +43,8 @@ float Volume100ToMultiplier(int volume); // Used for migration from the old settings. int MultiplierToVolume100(float multiplier); +float UIScaleFactorToMultiplier(int factor); + struct ConfigTouchPos { float x; float y; diff --git a/Qt/QtMain.cpp b/Qt/QtMain.cpp index 81d33c927ab4..5a391c76792b 100644 --- a/Qt/QtMain.cpp +++ b/Qt/QtMain.cpp @@ -549,7 +549,7 @@ QString MainUI::InputBoxGetQString(QString title, QString defaultValue) { } void MainUI::resizeGL(int w, int h) { - if (Native_UpdateScreenScale(w, h, 1.0f)) { + if (Native_UpdateScreenScale(w, h, UIScaleFactorToMultiplier(g_Config.iUIScaleFactor))) { System_PostUIMessage(UIMessage::GPU_RENDER_RESIZED); } xscale = w / this->width(); @@ -842,7 +842,7 @@ int main(int argc, char *argv[]) // We assume physicalDotsPerInchY is the same as PerInchX. float dpi_scale = screen->logicalDotsPerInchX() / screen->physicalDotsPerInchX(); - g_display.Recalculate(res.width(), res.height(), dpi_scale, 1.0f); + g_display.Recalculate(res.width(), res.height(), dpi_scale, UIScaleFactorToMultiplier(g_Config.iUIScaleFactor)); refreshRate = screen->refreshRate(); diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp index 2f585b7d0ee1..1dd710ac358a 100644 --- a/SDL/SDLMain.cpp +++ b/SDL/SDLMain.cpp @@ -780,7 +780,7 @@ static void ProcessSDLEvent(SDL_Window *window, const SDL_Event &event, InputSta bool fullscreen = (window_flags & SDL_WINDOW_FULLSCREEN); // This one calls NativeResized if the size changed. - Native_UpdateScreenScale(new_width_px, new_height_px, 1.0f); + Native_UpdateScreenScale(new_width_px, new_height_px, UIScaleFactorToMultiplier(g_Config.iUIScaleFactor)); // Set variable here in case fullscreen was toggled by hotkey if (g_Config.UseFullScreen() != fullscreen) { @@ -1437,7 +1437,7 @@ int main(int argc, char *argv[]) { float dpi_scale = 1.0f / (g_ForcedDPI == 0.0f ? g_DesktopDPI : g_ForcedDPI); - Native_UpdateScreenScale(w * g_DesktopDPI, h * g_DesktopDPI, 1.0f); + Native_UpdateScreenScale(w * g_DesktopDPI, h * g_DesktopDPI, UIScaleFactorToMultiplier(g_Config.iUIScaleFactor)); bool mainThreadIsRender = g_Config.iGPUBackend == (int)GPUBackend::OPENGL; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 9252c3c795ae..39141e936b34 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1128,6 +1128,14 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) { }); #endif + PopupSliderChoice *uiScale = systemSettings->Add(new PopupSliderChoice(&g_Config.iUIScaleFactor, -8, 8, 0, sy->T("UI size adjustment (DPI)"), screenManager())); + uiScale->SetZeroLabel(sy->T("Off")); + uiScale->OnChange.Add([](UI::EventParams &e) { + g_display.Recalculate(-1, -1, -1, UIScaleFactorToMultiplier(g_Config.iUIScaleFactor)); + NativeResized(); + return UI::EVENT_DONE; + }); + const Path bgPng = GetSysDirectory(DIRECTORY_SYSTEM) / "background.png"; const Path bgJpg = GetSysDirectory(DIRECTORY_SYSTEM) / "background.jpg"; if (File::Exists(bgPng) || File::Exists(bgJpg)) { diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 8dca52188117..4b6b32e5ee0c 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -1518,6 +1518,7 @@ static bool IsWindowSmall(int pixelWidth, int pixelHeight) { } bool Native_UpdateScreenScale(int pixel_width, int pixel_height, float customScale) { + _dbg_assert_(customScale > 0.1f); float g_logical_dpi = System_GetPropertyFloat(SYSPROP_DISPLAY_LOGICAL_DPI); float dpi = System_GetPropertyFloat(SYSPROP_DISPLAY_DPI); @@ -1531,6 +1532,8 @@ bool Native_UpdateScreenScale(int pixel_width, int pixel_height, float customSca bool smallWindow = IsWindowSmall(pixel_width, pixel_height); if (smallWindow) { customScale *= 0.5f; + } else { + customScale = UIScaleFactorToMultiplier(g_Config.iUIScaleFactor); } if (g_display.Recalculate(pixel_width, pixel_height, g_logical_dpi / dpi, customScale)) { diff --git a/UWP/App.cpp b/UWP/App.cpp index 67bafebe0a4d..74d36aaab4b2 100644 --- a/UWP/App.cpp +++ b/UWP/App.cpp @@ -330,7 +330,7 @@ void App::OnWindowSizeChanged(CoreWindow^ sender, WindowSizeChangedEventArgs^ ar PSP_CoreParameter().pixelWidth = (int)(width * scale); PSP_CoreParameter().pixelHeight = (int)(height * scale); - if (Native_UpdateScreenScale((int)width, (int)height, 1.0f)) { + if (Native_UpdateScreenScale((int)width, (int)height, UIScaleFactorToMultiplier(g_Config.iUIScaleFactor))) { System_PostUIMessage(UIMessage::GPU_DISPLAY_RESIZED); } } diff --git a/Windows/MainWindow.cpp b/Windows/MainWindow.cpp index f0dc681c5c0f..82ebcb33f008 100644 --- a/Windows/MainWindow.cpp +++ b/Windows/MainWindow.cpp @@ -298,7 +298,7 @@ namespace MainWindow DEBUG_LOG(Log::System, "Pixel width/height: %dx%d", PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight); - if (Native_UpdateScreenScale(width, height, 1.0f)) { + if (Native_UpdateScreenScale(width, height, UIScaleFactorToMultiplier(g_Config.iUIScaleFactor))) { System_PostUIMessage(UIMessage::GPU_DISPLAY_RESIZED); System_PostUIMessage(UIMessage::GPU_RENDER_RESIZED); } diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp index 5a00a86c9af3..dc132997e61c 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp @@ -1001,7 +1001,7 @@ extern "C" jboolean Java_org_ppsspp_ppsspp_NativeRenderer_displayInit(JNIEnv * e } static bool recalculateDpi(int pixel_xres, int pixel_yres) { - bool retval = g_display.Recalculate(pixel_xres, pixel_yres, 240.0f / (float)display_dpi, 1.0f); + bool retval = g_display.Recalculate(pixel_xres, pixel_yres, 240.0f / (float)display_dpi, UIScaleFactorToMultiplier(g_Config.iUIScaleFactor)); INFO_LOG(Log::G3D, "RecalcDPI: display_xres=%d display_yres=%d pixel_xres=%d pixel_yres=%d", display_xres, display_yres, g_display.pixel_xres, g_display.pixel_yres); INFO_LOG(Log::G3D, "RecalcDPI: g_dpi=%d g_dpi_scale=%f dp_xres=%d dp_yres=%d", display_dpi, g_display.dpi_scale, g_display.dp_xres, g_display.dp_yres); diff --git a/assets/lang/ar_AE.ini b/assets/lang/ar_AE.ini index 495db4dd149f..1e313ad9ccfb 100644 --- a/assets/lang/ar_AE.ini +++ b/assets/lang/ar_AE.ini @@ -1412,6 +1412,7 @@ Time Format = ‎صيغة الوقت Transparent UI background = Transparent UI background UI = اجهة UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = ‎إستخدم صيغة الفيديو الأقل تأثيراً (FFV1) diff --git a/assets/lang/az_AZ.ini b/assets/lang/az_AZ.ini index dda58a05757f..18e288a4c795 100644 --- a/assets/lang/az_AZ.ini +++ b/assets/lang/az_AZ.ini @@ -1404,6 +1404,7 @@ Time Format = Time format Transparent UI background = Transparent UI background UI = UI UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/bg_BG.ini b/assets/lang/bg_BG.ini index 315941bc0a1f..c95e0c31a6a7 100644 --- a/assets/lang/bg_BG.ini +++ b/assets/lang/bg_BG.ini @@ -1404,6 +1404,7 @@ Time Format = Час Transparent UI background = Transparent UI background UI = Потребителски интерфейс UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/ca_ES.ini b/assets/lang/ca_ES.ini index c1de3d5974f8..aac9700ecf86 100644 --- a/assets/lang/ca_ES.ini +++ b/assets/lang/ca_ES.ini @@ -1404,6 +1404,7 @@ Time Format = Time format Transparent UI background = Transparent UI background UI = UI UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/cz_CZ.ini b/assets/lang/cz_CZ.ini index ddb270a04755..0063ccd99338 100644 --- a/assets/lang/cz_CZ.ini +++ b/assets/lang/cz_CZ.ini @@ -1404,6 +1404,7 @@ Time Format = Formát času Transparent UI background = Transparent UI background UI = Uživatelské rozhraní UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/da_DK.ini b/assets/lang/da_DK.ini index d3b804b6f559..7c1e23a0c6e4 100644 --- a/assets/lang/da_DK.ini +++ b/assets/lang/da_DK.ini @@ -1404,6 +1404,7 @@ Time Format = Tidsformat Transparent UI background = Transparent UI background UI = UI UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Brug tabsfri Video Codec (FFV1) diff --git a/assets/lang/de_DE.ini b/assets/lang/de_DE.ini index b6e6123f73b5..df4dcdc00a09 100644 --- a/assets/lang/de_DE.ini +++ b/assets/lang/de_DE.ini @@ -1404,6 +1404,7 @@ Time Format = Zeitformat Transparent UI background = Menü Hintergrund transparent UI = Benutzeroberfläche UI background animation = Menü Hintergrundanimation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Benutze verlustfreien Videocodec (FFV1) diff --git a/assets/lang/dr_ID.ini b/assets/lang/dr_ID.ini index 87124e17c9ce..fdfbe2aae2a0 100644 --- a/assets/lang/dr_ID.ini +++ b/assets/lang/dr_ID.ini @@ -1404,6 +1404,7 @@ Time Format = Matumbai to wattu? Transparent UI background = Transparent UI background UI = UI UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/en_US.ini b/assets/lang/en_US.ini index d7d9e9478612..6d2bcefcb975 100644 --- a/assets/lang/en_US.ini +++ b/assets/lang/en_US.ini @@ -1416,6 +1416,7 @@ Time Format = Time format Transparent UI background = Transparent UI background UI = UI UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/es_ES.ini b/assets/lang/es_ES.ini index 11f93166a2d0..6fdcb5c86b80 100644 --- a/assets/lang/es_ES.ini +++ b/assets/lang/es_ES.ini @@ -1405,6 +1405,7 @@ Time Format = Formato de hora Transparent UI background = Fondo transparente UI = Interfaz de usuario UI background animation = Animación de fondo +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = Restaurar %c USB = USB Use Lossless Video Codec (FFV1) = Usar codec de vídeo sin pérdida (FFV1) diff --git a/assets/lang/es_LA.ini b/assets/lang/es_LA.ini index 27a366cf0ff9..f4addbc72bb3 100644 --- a/assets/lang/es_LA.ini +++ b/assets/lang/es_LA.ini @@ -1406,6 +1406,7 @@ Time Format = Formato de hora Transparent UI background = Transparent UI background UI = Interfaz de usuario UI background animation = Animación del fondo de UI +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = Restaurar %c USB = USB Use Lossless Video Codec (FFV1) = Usar codec de vídeo sin pérdida (FFV1) diff --git a/assets/lang/fa_IR.ini b/assets/lang/fa_IR.ini index 1807a3710ab5..1818d9d6d90a 100644 --- a/assets/lang/fa_IR.ini +++ b/assets/lang/fa_IR.ini @@ -1404,6 +1404,7 @@ Time Format = ‎فرمت زمان Transparent UI background = پس‌زمینه شفاف UI = ‎زبان برنامه UI background animation = پس‌زمینه زنده +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/fi_FI.ini b/assets/lang/fi_FI.ini index 7d6377f7a6cd..7cb33604a088 100644 --- a/assets/lang/fi_FI.ini +++ b/assets/lang/fi_FI.ini @@ -1404,6 +1404,7 @@ Time Format = Ajan muoto Transparent UI background = Läpinäkyvä käyttöliittymän tausta UI = Käyttöliittymä UI background animation = Käyttöliittymän taustan animaatio +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = peruuta %c USB = USB Use Lossless Video Codec (FFV1) = Käytä häviöttömän videon koodekkia (FFV1) diff --git a/assets/lang/fr_FR.ini b/assets/lang/fr_FR.ini index 1b15f3d821c4..2fabe18d3f0c 100644 --- a/assets/lang/fr_FR.ini +++ b/assets/lang/fr_FR.ini @@ -1395,6 +1395,7 @@ Time Format = Format de l'heure Transparent UI background = Transparent UI background UI = Interface utilisateur UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = secours %c USB = USB Use Lossless Video Codec (FFV1) = Utiliser un codec vidéo sans perte (FFV1) diff --git a/assets/lang/gl_ES.ini b/assets/lang/gl_ES.ini index 12139244900e..c48c9a1ea223 100644 --- a/assets/lang/gl_ES.ini +++ b/assets/lang/gl_ES.ini @@ -1404,6 +1404,7 @@ Time Format = Formato de hora Transparent UI background = Transparent UI background UI = Interfaz de usuario UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/gr_EL.ini b/assets/lang/gr_EL.ini index 624736654b8e..9b544884f768 100644 --- a/assets/lang/gr_EL.ini +++ b/assets/lang/gr_EL.ini @@ -1404,6 +1404,7 @@ Time Format = Μορφή Ώρας Transparent UI background = Transparent UI background UI = Διεπαφή χρήστη UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Χρήση μη απολεστικού κωδικοποιητή (FFV1) diff --git a/assets/lang/he_IL.ini b/assets/lang/he_IL.ini index 179add9e6396..dd4f87d88a0e 100644 --- a/assets/lang/he_IL.ini +++ b/assets/lang/he_IL.ini @@ -1404,6 +1404,7 @@ Time Format = תבנית זמן Transparent UI background = Transparent UI background UI = UI UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/he_IL_invert.ini b/assets/lang/he_IL_invert.ini index 61f62fd9f101..4b0ef8608d4c 100644 --- a/assets/lang/he_IL_invert.ini +++ b/assets/lang/he_IL_invert.ini @@ -1404,6 +1404,7 @@ Time Format = ןמז תינבת Transparent UI background = Transparent UI background UI = UI UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/hr_HR.ini b/assets/lang/hr_HR.ini index 9e1bc466b693..d3fdfba111e2 100644 --- a/assets/lang/hr_HR.ini +++ b/assets/lang/hr_HR.ini @@ -1404,6 +1404,7 @@ Time Format = Format vremena Transparent UI background = Transparent UI background UI = Felhasználói felület UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Koristi neizgubiv Video Codec (FFV1) diff --git a/assets/lang/hu_HU.ini b/assets/lang/hu_HU.ini index ab41e29c8ac3..3fbdc442d711 100644 --- a/assets/lang/hu_HU.ini +++ b/assets/lang/hu_HU.ini @@ -1404,6 +1404,7 @@ Time Format = Idő formátuma Transparent UI background = Áttetsző háttér UI = Felhasználói felület UI background animation = Háttér animáció +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = visszavon %c USB = USB Use Lossless Video Codec (FFV1) = Veszteségmentes videó codec használata (FFV1) diff --git a/assets/lang/id_ID.ini b/assets/lang/id_ID.ini index 2f02f143e3c4..121fca035db1 100644 --- a/assets/lang/id_ID.ini +++ b/assets/lang/id_ID.ini @@ -1404,6 +1404,7 @@ Time Format = Format waktu Transparent UI background = Latar belakang UI transparan UI = Antarmuka pengguna UI background animation = Animasi latar belakang UI +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = Cadangan %c USB = USB Use Lossless Video Codec (FFV1) = Gunakan kompresi video (FFV1) diff --git a/assets/lang/it_IT.ini b/assets/lang/it_IT.ini index 8a0e1507947c..38c5eeaa1695 100644 --- a/assets/lang/it_IT.ini +++ b/assets/lang/it_IT.ini @@ -1405,6 +1405,7 @@ Storage full = Spazio su disco pieno Sustained performance mode = Modalità prestazioni prolungate Time Format = Formato Data/Ora UI background animation = Animazione sfondo interfaccia +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = annulla %c USB = USB Use Lossless Video Codec (FFV1) = Usa Codec Video senza perdite (FFV1) diff --git a/assets/lang/ja_JP.ini b/assets/lang/ja_JP.ini index cc5b28d105f1..7edc2a10c492 100644 --- a/assets/lang/ja_JP.ini +++ b/assets/lang/ja_JP.ini @@ -1404,6 +1404,7 @@ Time Format = 時刻の形式 Transparent UI background = 透明なUI背景 UI = ユーザーインターフェース UI background animation = UIの背景アニメーション +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = ロスレスビデオコーデックを使う (FFV1) diff --git a/assets/lang/jv_ID.ini b/assets/lang/jv_ID.ini index e59b14b7d1d0..e4d54e172458 100644 --- a/assets/lang/jv_ID.ini +++ b/assets/lang/jv_ID.ini @@ -1404,6 +1404,7 @@ Time Format = Format wektu Transparent UI background = Transparent UI background UI = Antarmuka Panganggo UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/ko_KR.ini b/assets/lang/ko_KR.ini index 620de40cf2cf..e83bdc6136f6 100644 --- a/assets/lang/ko_KR.ini +++ b/assets/lang/ko_KR.ini @@ -1392,6 +1392,7 @@ Time Format = 시간 형식 Transparent UI background = 투명한 UI 배경 UI = UI UI background animation = UI 배경 애니메이션 +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = %c 백업 USB = USB Use Lossless Video Codec (FFV1) = 무손실 비디오 코덱 사용 (FFV1) diff --git a/assets/lang/ku_SO.ini b/assets/lang/ku_SO.ini index 0d5d8bf69768..b03358a9dfd7 100644 --- a/assets/lang/ku_SO.ini +++ b/assets/lang/ku_SO.ini @@ -1406,6 +1406,7 @@ Time Format = شێوازی کاتژمێر Transparent UI background = ڕوون(شەفاف) UI باکگراوندێکی UI = UI UI background animation = UI ئەنیمەیشنی باکگراوندی +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/lo_LA.ini b/assets/lang/lo_LA.ini index 8c30c4464a16..0fbe145e9b3e 100644 --- a/assets/lang/lo_LA.ini +++ b/assets/lang/lo_LA.ini @@ -1404,6 +1404,7 @@ Time Format = ຮູບແບບເວລາ Transparent UI background = Transparent UI background UI = ການໂຕ້ຕອບຜູ້ໃຊ້ UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use Lossless Video Codec (FFV1) diff --git a/assets/lang/lt-LT.ini b/assets/lang/lt-LT.ini index 3cf8cb31b900..397e593062f1 100644 --- a/assets/lang/lt-LT.ini +++ b/assets/lang/lt-LT.ini @@ -1404,6 +1404,7 @@ Time Format = Laiko formatas Transparent UI background = Transparent UI background UI = Vartotojo sąsaja UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/ms_MY.ini b/assets/lang/ms_MY.ini index 2e7b17f8f18e..7e4424cefdb7 100644 --- a/assets/lang/ms_MY.ini +++ b/assets/lang/ms_MY.ini @@ -1404,6 +1404,7 @@ Time Format = Format waktu Transparent UI background = Transparent UI background UI = UI UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/nl_NL.ini b/assets/lang/nl_NL.ini index 5fce153b95f3..c4893f4e8870 100644 --- a/assets/lang/nl_NL.ini +++ b/assets/lang/nl_NL.ini @@ -1404,6 +1404,7 @@ Time Format = Tijdweergave Transparent UI background = Transparent UI background UI = Gebruikersomgeving UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Lossless videocodec gebruiken (FFV1) diff --git a/assets/lang/no_NO.ini b/assets/lang/no_NO.ini index 5777b7132c01..a4baed339369 100644 --- a/assets/lang/no_NO.ini +++ b/assets/lang/no_NO.ini @@ -1404,6 +1404,7 @@ Time Format = Time format Transparent UI background = Transparent UI background UI = UI UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/pl_PL.ini b/assets/lang/pl_PL.ini index 196ededcac41..4960a82ed97e 100644 --- a/assets/lang/pl_PL.ini +++ b/assets/lang/pl_PL.ini @@ -1409,6 +1409,7 @@ Time Format = Format czasu Transparent UI background = Przezroczyste tło interfejsu użytkownika UI = Interfejs użytkownika UI background animation = Animacja tła +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = kopia zapasowa %c USB = USB Use Lossless Video Codec (FFV1) = Używaj stratnego kodeka wideo (FFV1) diff --git a/assets/lang/pt_BR.ini b/assets/lang/pt_BR.ini index 6a7113c18e76..80d2ed6bf149 100644 --- a/assets/lang/pt_BR.ini +++ b/assets/lang/pt_BR.ini @@ -1416,6 +1416,7 @@ Time Format = Formato da hora Transparent UI background = 2º plano transparente da interface do usuário UI = Interface do usuário UI background animation = Animação do cenário de fundo da interface do usuário +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = Backup %c USB = USB Use Lossless Video Codec (FFV1) = Usar codec de vídeo sem perdas (FFV1) diff --git a/assets/lang/pt_PT.ini b/assets/lang/pt_PT.ini index 9c91a24d3c62..245cc5e6575b 100644 --- a/assets/lang/pt_PT.ini +++ b/assets/lang/pt_PT.ini @@ -1418,6 +1418,7 @@ Time Format = Formato da hora Transparent UI background = Cenário de fundo da interface do usuário transparente UI = Interface do usuário UI background animation = Animação do cenário de fundo da interface do usuário +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = Backup %c USB = USB Use Lossless Video Codec (FFV1) = Usar codec de vídeo sem perdas (FFV1) diff --git a/assets/lang/ro_RO.ini b/assets/lang/ro_RO.ini index 505ca00493e9..3739ef7904d3 100644 --- a/assets/lang/ro_RO.ini +++ b/assets/lang/ro_RO.ini @@ -1405,6 +1405,7 @@ Time Format = Format timp Transparent UI background = Transparent UI background UI = Interfața cu utilizatorul UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Use lossless video codec (FFV1) diff --git a/assets/lang/ru_RU.ini b/assets/lang/ru_RU.ini index da3dcefb4e0d..808e1ec53ea6 100644 --- a/assets/lang/ru_RU.ini +++ b/assets/lang/ru_RU.ini @@ -1404,6 +1404,7 @@ Time Format = Формат времени Transparent UI background = Прозрачный фон интерфейса UI = Интерфейс UI background animation = Фоновая анимация интерфейса +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = резервная копия %c USB = USB Use Lossless Video Codec (FFV1) = Использовать видеокодек без потерь (FFV1) diff --git a/assets/lang/sv_SE.ini b/assets/lang/sv_SE.ini index 20035739db35..f80910684145 100644 --- a/assets/lang/sv_SE.ini +++ b/assets/lang/sv_SE.ini @@ -1405,6 +1405,7 @@ Time Format = Tidsformat Transparent UI background = Genomskinlig UI-bakground UI = Användargränssnitt UI background animation = Bakgrundsanimering +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = ångra %c USB = USB Use Lossless Video Codec (FFV1) = Använd förlust-fri video codec (FFV1) diff --git a/assets/lang/tg_PH.ini b/assets/lang/tg_PH.ini index e1eb515957c8..5398e10e2129 100644 --- a/assets/lang/tg_PH.ini +++ b/assets/lang/tg_PH.ini @@ -1407,6 +1407,7 @@ Time Format = Pormat ng oras Transparent UI background = Transparent na UI background UI = UI UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Gumamit ng 'lossless video codec' (o FFV1) diff --git a/assets/lang/th_TH.ini b/assets/lang/th_TH.ini index 1cdcfa8efdc4..1c2a8f25e08e 100644 --- a/assets/lang/th_TH.ini +++ b/assets/lang/th_TH.ini @@ -1442,6 +1442,7 @@ Time Format = รูปแบบเวลา Transparent UI background = พื้นหลังของอินเตอร์เฟซแบบโปร่งใส UI = หน้าจอผู้ใช้ UI background animation = อนิเมชั่นพื้นหลังของอินเตอร์เฟซ +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = สำรอง %c USB = USB Use Lossless Video Codec (FFV1) = ใช้โค้ด FFV1 บันทึกวีดีโอ เพื่อรักษาความคมชัด diff --git a/assets/lang/tr_TR.ini b/assets/lang/tr_TR.ini index 23e8d7487cd6..2320d9dc8221 100644 --- a/assets/lang/tr_TR.ini +++ b/assets/lang/tr_TR.ini @@ -1405,6 +1405,7 @@ Time Format = Zaman biçimi Transparent UI background = Şeffaf arayüz arkaplanı UI = Arayüz UI background animation = Arayüz arkaplan animasyonu +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = %c 'yi yedekle USB = USB Use Lossless Video Codec (FFV1) = Kayıpsız video codec'i kullan (FFV1) diff --git a/assets/lang/uk_UA.ini b/assets/lang/uk_UA.ini index e341f99c68d9..9d7b39020a31 100644 --- a/assets/lang/uk_UA.ini +++ b/assets/lang/uk_UA.ini @@ -1404,6 +1404,7 @@ Time Format = Формат часу Transparent UI background = Прозорий фон інтерфейсу користувача UI = Користувацький інтерфейс UI background animation = Фонова анімація інтерфейсу +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = резервна копія %c USB = флешка Use Lossless Video Codec (FFV1) = Використовувати відеокодек без втрат (FFV1) diff --git a/assets/lang/vi_VN.ini b/assets/lang/vi_VN.ini index 51a49e147b49..5310f232a13c 100644 --- a/assets/lang/vi_VN.ini +++ b/assets/lang/vi_VN.ini @@ -1404,6 +1404,7 @@ Time Format = Chỉnh định dạng thời gian (12/24) Transparent UI background = Transparent UI background UI = Giao diện người dùng UI background animation = UI background animation +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = backup %c USB = USB Use Lossless Video Codec (FFV1) = Sử dụng codec video lossless (FFV1) diff --git a/assets/lang/zh_CN.ini b/assets/lang/zh_CN.ini index 8e4fbac6dc81..c12d6ced073a 100644 --- a/assets/lang/zh_CN.ini +++ b/assets/lang/zh_CN.ini @@ -1396,6 +1396,7 @@ Time Format = 时间格式 Transparent UI background = 游戏中使用半透明UI UI = 用户界面 UI background animation = 壁纸动效 +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = 备份%c USB = USB路径 Use Lossless Video Codec (FFV1) = 使用无损视频编码器 (FFV1) diff --git a/assets/lang/zh_TW.ini b/assets/lang/zh_TW.ini index 155789321135..ab4f2beda206 100644 --- a/assets/lang/zh_TW.ini +++ b/assets/lang/zh_TW.ini @@ -1392,6 +1392,7 @@ Time Format = 時間格式 Transparent UI background = 透明 UI 背景 UI = UI UI background animation = UI 背景動畫 +UI size adjustment (DPI) = UI size adjustment (DPI) undo %c = 備份 %c USB = USB Use Lossless Video Codec (FFV1) = 使用不失真視訊轉碼器 (FFV1) diff --git a/ios/DisplayManager.mm b/ios/DisplayManager.mm index 2319d5c944f4..94ffd8837e3d 100644 --- a/ios/DisplayManager.mm +++ b/ios/DisplayManager.mm @@ -13,6 +13,9 @@ #include "Common/System/System.h" #include "Common/System/NativeApp.h" #include "Core/System.h" +#include "Core/Config.h" +#include "Core/ConfigValues.h" + #import #define IS_IPAD() ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) @@ -151,7 +154,7 @@ - (void)updateResolution:(UIScreen *)screen { } float dpi_scale = 240.0f / dpi; - g_display.Recalculate(size.width * scale, size.height * scale, dpi_scale, 1.0f); + g_display.Recalculate(size.width * scale, size.height * scale, dpi_scale, UIScaleFactorToMultiplier(g_Config.iUIScaleFactor)); [[sharedViewController getView] setContentScaleFactor:scale];