]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Start video _during_ initialization, rather than when finding a model
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 30 May 2020 19:59:11 +0000 (19:59 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 30 May 2020 19:59:11 +0000 (19:59 +0000)
Fixes Steel Storm: Burning Retribution crashing on start due to a NULL
array that isn't initialized before MQC draws their intro video.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12610 d7cf8633-e32d-0410-b094-e92efae38249

host.c
model_shared.c

diff --git a/host.c b/host.c
index 46453fd144b10e703d767906bf3155067bea59b9..313745a977e9d72b45d93f01a71bebf3e449362e 100644 (file)
--- a/host.c
+++ b/host.c
@@ -1336,6 +1336,9 @@ static void Host_Init (void)
 
        Log_Start();
        
+       // Starting after we parse commands so the screen resolution doesn't get weird for the first few seconds
+       Host_StartVideo();
+       
        // put up the loading image so the user doesn't stare at a black screen...
        SCR_BeginLoadingPlaque(true);
 
index 19bbbc0a3735e5c04d75a01b459fd1a47ab0a1e2..d1a48daee7baebdd52043ec24d26d2eeb563cf01 100644 (file)
@@ -579,9 +579,6 @@ dp_model_t *Mod_FindName(const char *name, const char *parentname)
        if (!parentname)
                parentname = "";
 
-       // if we're not dedicatd, the renderer calls will crash without video
-       Host_StartVideo();
-
        nummodels = (int)Mem_ExpandableArray_IndexRange(&models);
 
        if (!name[0])