Maelstrom: Enable zoom mode on tablets as well as phones

From ad2049064eabaf1d7d54e90ccdc3fd241c8464cb Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 27 Mar 2026 21:19:11 -0700
Subject: [PATCH] Enable zoom mode on tablets as well as phones

---
 game/game.cpp  |  4 ++--
 game/steam.cpp | 14 ++++++++------
 game/steam.h   |  2 +-
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/game/game.cpp b/game/game.cpp
index 71b7dfda..27e5b478 100644
--- a/game/game.cpp
+++ b/game/game.cpp
@@ -595,8 +595,8 @@ GamePanelDelegate::UpdateZoom()
 	SDL_GetRenderSafeArea(renderer, &rect);
 	SDL_SetRenderLogicalPresentation(renderer, saved_w, saved_h, saved_mode);
 
-	// We can zoom if we're on a phone in landscape mode
-	if ((SDL_IsPhone() || SteamStreamingToPhone()) && rect.w > rect.h) {
+	// We can zoom if we're on a phone or tablet in landscape mode
+	if ((SDL_IsPhone() || SDL_IsTablet() || SteamStreamingToPhoneOrTablet()) && rect.w > rect.h) {
 		StartZoom(rect);
 	} else {
 		StopZoom();
diff --git a/game/steam.cpp b/game/steam.cpp
index ae931c79..8cdb0210 100644
--- a/game/steam.cpp
+++ b/game/steam.cpp
@@ -44,7 +44,7 @@ class SteamInterface
 	bool Init();
 	void Quit();
 
-	bool StreamingToPhone();
+	bool StreamingToPhoneOrTablet();
 
 	void SetSteamTimelineMode(STEAM_TIMELINE_MODE mode);
 	void SetSteamTimelineLevelStarted(int level);
@@ -130,7 +130,7 @@ void SteamInterface::Quit()
 	m_initialized = false;
 }
 
-bool SteamInterface::StreamingToPhone()
+bool SteamInterface::StreamingToPhoneOrTablet()
 {
 	if (!m_initialized) {
 		return false;
@@ -145,7 +145,9 @@ bool SteamInterface::StreamingToPhone()
 			continue;
 		}
 
-		if (pSteamRemotePlay->GetSessionClientFormFactor(sessionID) == k_ESteamDeviceFormFactorPhone) {
+		ESteamDeviceFormFactor eFormFactor = pSteamRemotePlay->GetSessionClientFormFactor(sessionID);
+		if (eFormFactor == k_ESteamDeviceFormFactorPhone || 
+		    eFormFactor == k_ESteamDeviceFormFactorTablet) {
 			return true;
 		}
 	}
@@ -507,9 +509,9 @@ bool InitSteam()
 	return steam.Init();
 }
 
-bool SteamStreamingToPhone()
+bool SteamStreamingToPhoneOrTablet()
 {
-	return steam.StreamingToPhone();
+	return steam.StreamingToPhoneOrTablet();
 }
 
 Uint32 GetRemoteSessionForGamepad(SDL_Gamepad *gamepad)
@@ -584,7 +586,7 @@ bool InitSteam()
 	return false;
 }
 
-bool SteamStreamingToPhone()
+bool SteamStreamingToPhoneOrTablet()
 {
 	return false;
 }
diff --git a/game/steam.h b/game/steam.h
index 7d76b77e..834ab389 100644
--- a/game/steam.h
+++ b/game/steam.h
@@ -45,7 +45,7 @@ enum STEAM_TIMELINE_EVENT
 typedef Uint32 RemotePlaySessionID_t;
 
 extern bool InitSteam();
-extern bool SteamStreamingToPhone();
+extern bool SteamStreamingToPhoneOrTablet();
 extern RemotePlaySessionID_t GetRemoteSessionForGamepad(SDL_Gamepad *gamepad);
 extern Uint8 GetRemoteSessionControl(RemotePlaySessionID_t sessionID);
 extern const char *GetRemotePlayerName(Uint8 controlType);