shithub: choc

Download patch

ref: 4987a479c986206dc2ea0e5e141e89c67a2c963a
parent: dd9fa2865d5362abf1e0fa8dd15658f91164e26a
author: Simon Howard <fraggle@soulsphere.org>
date: Sat Feb 27 18:41:58 EST 2016

doom: Don't run tics until graphics initialized.

Running tics before I_InitGraphics() is called causes the music to start
playing while the screen is still being initialized, and this doesn't
look nice. Instead, wait until the video is fully ready before we start
playing music or running any tics.

--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -427,8 +427,6 @@
 
     main_loop_started = true;
 
-    TryRunTics();
-
     I_SetWindowTitle(gamedescription);
     I_GraphicsCheckCommandLine();
     I_InputCheckCommandLine();
@@ -435,6 +433,8 @@
     I_SetGrabMouseCallback(D_GrabMouseCallback);
     I_InitGraphics();
     V_EnableLoadingDisk(SCREENWIDTH - LOADING_DISK_W, SCREENHEIGHT - LOADING_DISK_H);
+
+    TryRunTics();
 
     V_RestoreBuffer();
     R_ExecuteSetViewSize();