Double the default window size to 960x544
The PSP logical screen stays 480x272 for the RCO menu and VSMX scripts, but the initial window now opens at 2x so it is visible on high-DPI screens. Users can still resize freely.
This commit is contained in:
@@ -39,8 +39,10 @@ import java.nio.file.Path;
|
||||
/** JavaFX application entry point for the UMD player. */
|
||||
public final class PlayerApp extends Application {
|
||||
|
||||
private static final int WIDTH = 480;
|
||||
private static final int HEIGHT = 272;
|
||||
private static final int SCREEN_WIDTH = 480;
|
||||
private static final int SCREEN_HEIGHT = 272;
|
||||
private static final int WINDOW_WIDTH = SCREEN_WIDTH * 2;
|
||||
private static final int WINDOW_HEIGHT = SCREEN_HEIGHT * 2;
|
||||
|
||||
private Canvas menuCanvas;
|
||||
private Canvas videoCanvas;
|
||||
@@ -71,7 +73,7 @@ public final class PlayerApp extends Application {
|
||||
videoCanvas.widthProperty().bind(root.widthProperty());
|
||||
videoCanvas.heightProperty().bind(root.heightProperty());
|
||||
|
||||
Scene scene = new Scene(root, WIDTH, HEIGHT);
|
||||
Scene scene = new Scene(root, WINDOW_WIDTH, WINDOW_HEIGHT);
|
||||
scene.setFill(Color.BLACK);
|
||||
stage.setTitle("useless-umd-player");
|
||||
stage.setScene(scene);
|
||||
@@ -151,7 +153,7 @@ public final class PlayerApp extends Application {
|
||||
}
|
||||
};
|
||||
|
||||
VsmxNativeObject globals = GlobalVariables.create(interpreter, WIDTH, HEIGHT);
|
||||
VsmxNativeObject globals = GlobalVariables.create(interpreter, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
VsmxNativeObject controllerObject = Controller.create(interpreter, menuHost, "EN100000");
|
||||
VsmxNativeObject movieplayer = MoviePlayer.create(interpreter, menuHost, controllerObject);
|
||||
VsmxNativeObject resource = Resource.create(interpreter, renderer, controllerObject, rco);
|
||||
|
||||
Reference in New Issue
Block a user