Un-stub Surfaceinfo and just print the parts that still work in SDL2

This means the console command vid_info also works properly too now (well, it does nothing in OpenGL mind)
This commit is contained in:
Monster Iestyn 2016-11-21 20:40:02 +00:00
parent f4705b01f4
commit 168f8d5c5e

View file

@ -434,13 +434,8 @@ static void VID_Command_NumModes_f (void)
static void SurfaceInfo(const SDL_Surface *infoSurface, const char *SurfaceText) static void SurfaceInfo(const SDL_Surface *infoSurface, const char *SurfaceText)
{ {
#if 1
(void)infoSurface;
(void)SurfaceText;
SDL2STUB();
#else
INT32 vfBPP; INT32 vfBPP;
const SDL_Surface *VidSur = SDL_GetVideoSurface(); //const SDL_Surface *VidSur = SDL_GetVideoSurface(); // SDL2 doesn't have this
if (!infoSurface) if (!infoSurface)
return; return;
@ -453,15 +448,16 @@ static void SurfaceInfo(const SDL_Surface *infoSurface, const char *SurfaceText)
CONS_Printf("\x82" "%s\n", SurfaceText); CONS_Printf("\x82" "%s\n", SurfaceText);
CONS_Printf(M_GetText(" %ix%i at %i bit color\n"), infoSurface->w, infoSurface->h, vfBPP); CONS_Printf(M_GetText(" %ix%i at %i bit color\n"), infoSurface->w, infoSurface->h, vfBPP);
/*
if (infoSurface->flags&SDL_HWSURFACE) if (infoSurface->flags&SDL_HWSURFACE)
CONS_Printf("%s", M_GetText(" Stored in video memory\n")); CONS_Printf("%s", M_GetText(" Stored in video memory\n"));
else if (infoSurface->flags&SDL_OPENGL) else if (infoSurface->flags&SDL_OPENGL)
CONS_Printf("%s", M_GetText(" Stored in an OpenGL context\n")); CONS_Printf("%s", M_GetText(" Stored in an OpenGL context\n"));
else if (infoSurface->flags&SDL_PREALLOC) else */if (infoSurface->flags&SDL_PREALLOC)
CONS_Printf("%s", M_GetText(" Uses preallocated memory\n")); CONS_Printf("%s", M_GetText(" Uses preallocated memory\n"));
else else
CONS_Printf("%s", M_GetText(" Stored in system memory\n")); CONS_Printf("%s", M_GetText(" Stored in system memory\n"));
/*
if (infoSurface->flags&SDL_ASYNCBLIT) if (infoSurface->flags&SDL_ASYNCBLIT)
CONS_Printf("%s", M_GetText(" Uses asynchronous blits if possible\n")); CONS_Printf("%s", M_GetText(" Uses asynchronous blits if possible\n"));
else else
@ -491,11 +487,13 @@ static void SurfaceInfo(const SDL_Surface *infoSurface, const char *SurfaceText)
CONS_Printf("%s", M_GetText(" Uses hardware acceleration blit\n")); CONS_Printf("%s", M_GetText(" Uses hardware acceleration blit\n"));
if (infoSurface->flags&SDL_SRCCOLORKEY) if (infoSurface->flags&SDL_SRCCOLORKEY)
CONS_Printf("%s", M_GetText(" Use colorkey blitting\n")); CONS_Printf("%s", M_GetText(" Use colorkey blitting\n"));
*/
if (infoSurface->flags&SDL_RLEACCEL) if (infoSurface->flags&SDL_RLEACCEL)
CONS_Printf("%s", M_GetText(" Colorkey RLE acceleration blit\n")); CONS_Printf("%s", M_GetText(" Colorkey RLE acceleration blit\n"));
/*
if (infoSurface->flags&SDL_SRCALPHA) if (infoSurface->flags&SDL_SRCALPHA)
CONS_Printf("%s", M_GetText(" Use alpha blending acceleration blit\n")); CONS_Printf("%s", M_GetText(" Use alpha blending acceleration blit\n"));
#endif */
} }
static void VID_Command_Info_f (void) static void VID_Command_Info_f (void)