commit 41dec8f8363b3765d1632b6caa8e407d43c658e9
Author: Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Sat Jan 3 11:48:14 2026 -0700
Commit: Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Sat Jan 3 11:48:14 2026 -0700
fix hard coded window width to accept params
---
platform/SDL2Desktop/source/SDL2Host.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/platform/SDL2Desktop/source/SDL2Host.cpp b/platform/SDL2Desktop/source/SDL2Host.cpp
index f6db391..f16695b 100644
--- a/platform/SDL2Desktop/source/SDL2Host.cpp
+++ b/platform/SDL2Desktop/source/SDL2Host.cpp
@@ -22,8 +22,8 @@ using namespace std;
// sdl
#include <SDL2/SDL.h>
-#define WINDOW_SIZE_X 1280
-#define WINDOW_SIZE_Y 720
+//#define WINDOW_SIZE_X 1280
+//#define WINDOW_SIZE_Y 720
#define WINDOW_FLAGS 0
@@ -61,8 +61,8 @@ Host::Host(int windowWidth, int windowHeight)
SDL_Log("Display #%d: current display mode is %dx%dpx @ %dhz.", 0, current.w, current.h, current.refresh_rate);
}
- //int WINDOW_SIZE_X=current.w;
- //int WINDOW_SIZE_Y=current.h;
+ int WINDOW_SIZE_X= windowWidth == 0 ? current.w : windowWidth;
+ int WINDOW_SIZE_Y= windowHeight == 0 ? current.h : windowHeight;
struct stat st = {0};