From d749d6753e29b7264dcc9dd7da03a872a14a0b8b Mon Sep 17 00:00:00 2001 From: Mathieu Moran Date: Tue, 15 Sep 2026 23:23:51 -0400 Subject: [PATCH] Use PSP native 480x272 dimensions Window, menu canvas and video surface are now 480x272 (the PSP screen size). Video is stretched to fill the screen like the PSP player, rather than aspect-preserving letterboxing. --- ui/src/main/java/dev/quoije/umd/ui/PlayerApp.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ui/src/main/java/dev/quoije/umd/ui/PlayerApp.java b/ui/src/main/java/dev/quoije/umd/ui/PlayerApp.java index 8c80233..8dbf232 100644 --- a/ui/src/main/java/dev/quoije/umd/ui/PlayerApp.java +++ b/ui/src/main/java/dev/quoije/umd/ui/PlayerApp.java @@ -35,8 +35,8 @@ import java.nio.file.Path; /** JavaFX application entry point for the UMD player. */ public final class PlayerApp extends Application { - private static final int WIDTH = 854; - private static final int HEIGHT = 480; + private static final int WIDTH = 480; + private static final int HEIGHT = 272; private Canvas menuCanvas; private Canvas videoCanvas; @@ -198,12 +198,8 @@ public final class PlayerApp extends Application { g.setFill(Color.BLACK); g.fillRect(0, 0, canvasWidth, canvasHeight); - double scale = java.lang.Math.min(canvasWidth / image.getWidth(), canvasHeight / image.getHeight()); - double drawWidth = image.getWidth() * scale; - double drawHeight = image.getHeight() * scale; - double x = (canvasWidth - drawWidth) / 2; - double y = (canvasHeight - drawHeight) / 2; - g.drawImage(image, x, y, drawWidth, drawHeight); + // The PSP stretches the anamorphic 720x480 frame to fill 480x272. + g.drawImage(image, 0, 0, canvasWidth, canvasHeight); }); }