From 5f8712902cd0abdc5b2cfb53f5fc5284268857f3 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sun, 8 Jan 2012 11:41:25 +0100 Subject: [PATCH] Return at least 64MB VRAM in case the detection fails --- neo/sys/glimp.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/neo/sys/glimp.cpp b/neo/sys/glimp.cpp index a81795a6..d14fbbd2 100644 --- a/neo/sys/glimp.cpp +++ b/neo/sys/glimp.cpp @@ -276,7 +276,10 @@ int Sys_GetVideoRam() { common->Printf("guessing video ram (use +set sys_videoRam to force)\n"); - const SDL_VideoInfo *vi = SDL_GetVideoInfo(); + Uint32 vram = SDL_GetVideoInfo()->video_mem; - return vi->video_mem; + if (!vram) + vram = 64; + + return vram; }