]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - wad.c
Fix engine not starting on Windows if linked against SDL > 2.0.5
[xonotic/darkplaces.git] / wad.c
diff --git a/wad.c b/wad.c
index 4e714b0b2712cfad3b6d9433abf5e8db5a58f929..fabffc3b9205aeb50e16ae56c858a27d11805279 100644 (file)
--- a/wad.c
+++ b/wad.c
@@ -111,7 +111,7 @@ void W_UnloadAll(void)
        memset(&wad, 0, sizeof(wad));
 }
 
-unsigned char *W_GetLumpName(const char *name)
+unsigned char *W_GetLumpName(const char *name, fs_offset_t *returnfilesize)
 {
        int i;
        fs_offset_t filesize;
@@ -146,8 +146,14 @@ unsigned char *W_GetLumpName(const char *name)
        }
 
        for (lump = wad.gfx.lumps, i = 0;i < wad.gfx.numlumps;i++, lump++)
+       {
                if (!strcmp(clean, lump->name))
+               {
+                       if (returnfilesize)
+                               *returnfilesize = lump->size;
                        return (wad.gfx_base + lump->filepos);
+               }
+       }
        return NULL;
 }