From e644adf3b80a549d08eba9088bb36aa351d80af8 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sat, 18 Feb 2017 02:43:35 -0500 Subject: [PATCH] - added "vid_glswfb" CVAR for linux, defaults to false, to allow init without GL framebuffer. This will need to be ultimately finished at a later date. --- src/posix/sdl/sdlglvideo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/posix/sdl/sdlglvideo.cpp b/src/posix/sdl/sdlglvideo.cpp index 51a15b8c4..226600c64 100644 --- a/src/posix/sdl/sdlglvideo.cpp +++ b/src/posix/sdl/sdlglvideo.cpp @@ -62,6 +62,10 @@ CUSTOM_CVAR(Bool, gl_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINI { Printf("This won't take effect until " GAMENAME " is restarted.\n"); } +CUSTOM_CVAR(Bool, vid_glswfb, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) +{ + Printf("This won't take effect until " GAMENAME " is restarted.\n"); +} #ifdef __arm__ CUSTOM_CVAR(Bool, gl_es, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) @@ -211,6 +215,10 @@ DFrameBuffer *SDLGLVideo::CreateFrameBuffer (int width, int height, bool bgra, b { fb = new OpenGLFrameBuffer(0, width, height, 32, 60, fullscreen); } + else if (vid_glswfb == 0) + { + fb = new SDLFB(width, height, bgra, fullscreen, nullptr); + } else { fb = (SDLBaseFB*)CreateGLSWFrameBuffer(width, height, bgra, fullscreen);