diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 2ca18633f0..9a4836dc34 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -669,11 +669,6 @@ void TouchTestScreen::CreateViews() { root_->Add(new Button(di->T("Back")))->OnClick.Handle(this, &UIScreen::OnBack); } -#if PPSSPP_PLATFORM(ANDROID) -extern int display_xres; -extern int display_yres; -#endif - void TouchTestScreen::UpdateLogView() { while (keyEventLog_.size() > 8) { keyEventLog_.erase(keyEventLog_.begin()); @@ -756,7 +751,7 @@ void TouchTestScreen::render() { "g_dpi: %0.3f g_dpi_scale: %0.3fx%0.3f\n" "g_dpi_scale_real: %0.3fx%0.3f\n%s", #if PPSSPP_PLATFORM(ANDROID) - display_xres, display_yres, + System_GetPropertyInt(SYSPROP_DISPLAY_XRES), System_GetPropertyInt(SYSPROP_DISPLAY_YRES), #endif g_display.dp_xres, g_display.dp_yres, g_display.pixel_xres, g_display.pixel_yres, diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index ee9a39f8ab..47209edda0 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -616,12 +616,25 @@ void SystemInfoScreen::CreateTabs() { displayInfo->Add(new InfoItem(si->T("Native Resolution"), StringFromFormat("%dx%d", System_GetPropertyInt(SYSPROP_DISPLAY_XRES), System_GetPropertyInt(SYSPROP_DISPLAY_YRES)))); +#endif displayInfo->Add(new InfoItem(si->T("UI Resolution"), StringFromFormat("%dx%d (%s: %0.2f)", g_display.dp_xres, g_display.dp_yres, si->T("DPI"), g_display.dpi))); -#endif + displayInfo->Add(new InfoItem(si->T("Pixel Resolution"), StringFromFormat("%dx%d", + g_display.pixel_xres, + g_display.pixel_yres))); + + const float insets[4] = { + System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_LEFT), + System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_TOP), + System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_RIGHT), + System_GetPropertyFloat(SYSPROP_DISPLAY_SAFE_INSET_BOTTOM), + }; + if (insets[0] != 0.0f || insets[1] != 0.0f || insets[2] != 0.0f || insets[3] != 0.0f) { + displayInfo->Add(new InfoItem(si->T("Screen notch insets"), StringFromFormat("%0.1f %0.1f %0.1f %0.1f", insets[0], insets[1], insets[2], insets[3]))); + } // Don't show on Windows, since it's always treated as 60 there. displayInfo->Add(new InfoItem(si->T("Refresh rate"), StringFromFormat(si->T("%0.2f Hz"), (float)System_GetPropertyFloat(SYSPROP_DISPLAY_REFRESH_RATE)))); diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp index 9906b6fa8f..4dcaff2145 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp @@ -148,8 +148,8 @@ static int deviceType; // Should only be used for display detection during startup (for config defaults etc) // This is the ACTUAL display size, not the hardware scaled display size. // Exposed so it can be displayed on the touchscreen test. -int display_xres; -int display_yres; +static int display_xres; +static int display_yres; static int display_dpi_x; static int display_dpi_y; static int backbuffer_format; // Android PixelFormat enum