Skip to content

Commit 60c84b3

Browse files
committed
Change screen global variable to display
1 parent f02b63c commit 60c84b3

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/engine.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ ENGINE_start(ENGINE* engine) {
251251
}
252252

253253
//Create window
254-
engine->window = SDL_CreateWindow("DOME", SDL_WINDOWPOS_CENTERED_DISPLAY(SCREEN), SDL_WINDOWPOS_CENTERED_DISPLAY(SCREEN), SCREEN_WIDTH, SCREEN_HEIGHT, windowFlags);
254+
engine->window = SDL_CreateWindow("DOME", SDL_WINDOWPOS_CENTERED_DISPLAY(DISPLAY), SDL_WINDOWPOS_CENTERED_DISPLAY(DISPLAY), SCREEN_WIDTH, SCREEN_HEIGHT, windowFlags);
255255
if(engine->window == NULL)
256256
{
257257
char* message = "Window could not be created! SDL_Error: %s\n";

src/game.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ int DOME_begin(ENGINE* engine, char* entryPath) {
317317
initMethod = NULL;
318318
engine->initialized = true;
319319

320-
SDL_SetWindowPosition(engine->window, SDL_WINDOWPOS_CENTERED_DISPLAY(SCREEN), SDL_WINDOWPOS_CENTERED_DISPLAY(SCREEN));
320+
SDL_SetWindowPosition(engine->window, SDL_WINDOWPOS_CENTERED_DISPLAY(DISPLAY), SDL_WINDOWPOS_CENTERED_DISPLAY(DISPLAY));
321321
SDL_ShowWindow(engine->window);
322322

323323
loop.lag = loop.MS_PER_FRAME;

src/main.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ global_variable WrenHandle* gamepadClass = NULL;
7878
global_variable WrenHandle* updateInputMethod = NULL;
7979

8080
// These are set by cmd arguments
81-
global_variable int SCREEN = 0;
81+
global_variable int DISPLAY = 0;
8282
#ifdef DEBUG
8383
global_variable bool DEBUG_MODE = true;
8484
#else
@@ -359,9 +359,7 @@ int main(int argc, char* argv[])
359359
} break;
360360
case 's':
361361
{
362-
int screen = atoi(options.optarg);
363-
SCREEN = screen;
364-
ENGINE_printLog(&engine, "Screen force enabled\n");
362+
DISPLAY = atoi(options.optarg);
365363
} break;
366364
case 'h':
367365
{

0 commit comments

Comments
 (0)