Skip to content

Commit faa0d60

Browse files
committed
bug: show the console on startup
1 parent 0537397 commit faa0d60

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

src/main.cpp

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -793,31 +793,17 @@ int main(int argc, char *argv[])
793793
CON("INI: Load game config");
794794
game = new Game(std::string(appdata));
795795
game->load_config();
796-
#if 0
797-
game->save_config();
798-
int x = 1;
799-
if (x) {
800-
exit(0);
801-
}
802-
#endif
803796

804797
if (! sdl_init()) {
805798
ERR("SDL: Init");
806799
}
807800

808-
game->config.gfx_vsync_locked = SDL_GL_GetSwapInterval();
809-
810-
if (! game->config.gfx_vsync_locked) {
811-
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
812-
GL_ERROR_CHECK();
813-
814-
if (game->config.gfx_vsync_enable) {
815-
SDL_GL_SetSwapInterval(1);
816-
} else {
817-
SDL_GL_SetSwapInterval(0);
818-
}
819-
GL_ERROR_CHECK();
820-
}
801+
//
802+
// For some reason this is needed on windows to force the console
803+
// to appear.
804+
//
805+
auto save_gfx_vsync_locked = game->config.gfx_vsync_locked;
806+
game->config.gfx_vsync_locked = 1;
821807

822808
//
823809
// Check for overrides.
@@ -1024,8 +1010,9 @@ int main(int argc, char *argv[])
10241010

10251011
loop:
10261012

1027-
wid_toggle_hidden(wid_console_window);
1013+
wid_hide(wid_console_window);
10281014

1015+
game->config.gfx_vsync_locked = save_gfx_vsync_locked;
10291016
config_gfx_vsync_update();
10301017
pcg_random_allowed--;
10311018

0 commit comments

Comments
 (0)