From f0c15067c968e3172e1829f6c81678154a03fc3a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 31 Mar 2026 20:34:57 -0700
Subject: [PATCH] Added the '--zoom' command line option
This enables zoomed in gameplay on any platform
---
game/Maelstrom_Globals.h | 1 +
game/game.cpp | 2 +-
game/main.cpp | 4 ++++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/game/Maelstrom_Globals.h b/game/Maelstrom_Globals.h
index 22a49026..0aa6be2c 100644
--- a/game/Maelstrom_Globals.h
+++ b/game/Maelstrom_Globals.h
@@ -85,6 +85,7 @@ extern void SetStar(int which);
// in main.cpp :
extern Bool gInitializing;
extern Bool gControlBrakes;
+extern Bool gAlwaysZoom;
extern Bool gNetworkAvailable;
extern Bool gUpdateBuffer;
extern Bool gRunning;
diff --git a/game/game.cpp b/game/game.cpp
index ab9cb7cd..dc245bda 100644
--- a/game/game.cpp
+++ b/game/game.cpp
@@ -602,7 +602,7 @@ GamePanelDelegate::UpdateZoom()
// We can zoom if we're on a phone in landscape mode and not local multiplayer
bool zoom = false;
- if (IsPhone() && rect.w > rect.h) {
+ if (gAlwaysZoom || (IsPhone() && rect.w > rect.h)) {
int i;
int local_players = 0;
diff --git a/game/main.cpp b/game/main.cpp
index a1909085..1bcf3bd4 100644
--- a/game/main.cpp
+++ b/game/main.cpp
@@ -58,6 +58,7 @@ static const char *Version =
// Global variables set in this file...
Bool gInitializing = false;
Bool gControlBrakes = false;
+Bool gAlwaysZoom = false;
Bool gNetworkAvailable = false;
Bool gUpdateBuffer = false;
Bool gDelaySound = false;
@@ -142,6 +143,7 @@ void PrintUsage(const char *progname)
" --windowed # Run Maelstrom in windowed mode\n"
" --geometry WxH # Set the window size to WxH\n"
" --control-brakes # Allow manual brake control\n"
+" --zoom # Zoom in on the ship\n"
);
}
@@ -207,6 +209,8 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
}
} else if ( strcmp(argv[i], "--control-brakes") == 0 ) {
gControlBrakes = true;
+ } else if ( strcmp(argv[i], "--zoom") == 0 ) {
+ gAlwaysZoom = true;
} else if ( strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0 && argv[i+1] ) {
// Ignore Xcode debug option
++i;