From 1a8611d030179a67b638bdcd1e188787a26fa4de Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 31 Mar 2026 17:56:21 -0700
Subject: [PATCH] Lock the screen into landscape orientation
---
game/init.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/game/init.cpp b/game/init.cpp
index 88e339b3..cf2923fb 100644
--- a/game/init.cpp
+++ b/game/init.cpp
@@ -817,6 +817,9 @@ bool StartInitialization(int window_width, int window_height, Uint32 window_flag
gInitializing = true;
+ // Lock the screen into landscape orientation
+ SDL_SetHint(SDL_HINT_ORIENTATIONS, "LandscapeLeft LandscapeRight");
+
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_GAMEPAD)) {
error("Couldn't initialize SDL: %s\n", SDL_GetError());
return false;