Android: Rework UI insets handling (#21007)

* During game load, place the loading screen where the game will appear

* Android: Merge NativeActivity into PpssppActivity

* Rework window insets handling on Android

* Main screen: Display the path on its own line in portrait mode

* Make the "Fullscreen" setting on Android separate between portrait and landscape
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2025-11-16 10:43:58 +01:00
1 parent de3365e647
commit defd21cc90
16 files changed
+1776 -1845

No files matched your search

+9 -1
View File
@@ -1199,11 +1199,19 @@ public:
if (ginfo->Ready(GameInfoFlags::PIC1) && ginfo->pic1.texture) {
Draw::Texture *texture = ginfo->pic1.texture;
if (texture) {
const DisplayLayoutConfig &config = g_Config.GetDisplayLayoutConfig(g_display.GetDeviceOrientation());
// Similar to presentation, we want to put the game PIC1 in the same region of the screen.
FRect frame = GetScreenFrame(config.bIgnoreScreenInsets, g_display.pixel_xres, g_display.pixel_yres);
FRect rc;
CalculateDisplayOutputRect(config, &rc, texture->Width(), texture->Height(), frame, config.iInternalScreenRotation);
Bounds bounds(rc.x, rc.y, rc.w, rc.h);
dc.GetDrawContext()->BindTexture(0, texture);
double loadTime = ginfo->pic1.timeLoaded;
uint32_t color = alphaMul(color_, ease((time_now_d() - loadTime) * 3));
dc.Draw()->DrawTexRect(dc.GetBounds(), 0, 0, 1, 1, color);
dc.Draw()->DrawTexRect(bounds, 0, 0, 1, 1, color);
dc.Flush();
dc.RebindTexture();
}