mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 18:23:43 +01:00
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:
1 parent
de3365e647
commit
defd21cc90
16 files changed
+1776
-1845
No files matched your search
+9
-1
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user