Skip to content

Commit e45c9a6

Browse files
veikkosakheron
authored andcommitted
Always start game in windowed mode.
1 parent 831ad86 commit e45c9a6

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ released as version `1.0`, so there might be some changes to the original.
2828

2929
Changes in SDL2 port:
3030

31+
- Game always starts in windowed mode
32+
3133
- Left alt + return toggles full-screen
3234

3335
- Partial A.I. (bot) code added after `1.0` release has been disabled by

src/init.c

+1-11
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,6 @@ void initGraphics()
6262
/* Clean up on exit */
6363
atexit(uninitGraphics);
6464

65-
#ifdef NDEBUG
66-
#define FULLSCREEN SDL_WINDOW_FULLSCREEN
67-
#else
68-
#define FULLSCREEN 0
69-
#endif
70-
71-
if (!windowed && FULLSCREEN) {
72-
fullscreen = FULLSCREEN;
73-
}
74-
7565
/* 8-bit surface for game to write directly to */
7666
screen = SDL_CreateRGBSurface(0,
7767
X_RESOLUTION, Y_RESOLUTION,
@@ -86,7 +76,7 @@ void initGraphics()
8676
window = SDL_CreateWindow("KOPS", SDL_WINDOWPOS_UNDEFINED,
8777
SDL_WINDOWPOS_UNDEFINED,
8878
screen->w, screen->h,
89-
fullscreen | SDL_WINDOW_OPENGL);
79+
SDL_WINDOW_OPENGL);
9080

9181
if (window == NULL) {
9282
sprintf(sdf, "Couldn't set 640x480x8 video mode: %s\n", SDL_GetError());

0 commit comments

Comments
 (0)