added displaying render driver on info screen page
authorHolger Schemel <info@artsoft.org>
Thu, 3 Sep 2020 22:50:18 +0000 (00:50 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 3 Sep 2020 22:50:18 +0000 (00:50 +0200)
src/conf_gfx.c
src/libgame/sdl.c
src/libgame/sdl.h
src/screens.c

index daf471eb8fc95a23b0702f079c6e4b144004d6b7..0f3b6cdcd74fccc95c025d9279e6d8646b7a5322 100644 (file)
@@ -7897,7 +7897,7 @@ struct ConfigInfo image_config[] =
   { "menu.paragraph_spacing.INFO[MUSIC]",      "-3"                    },
   { "menu.paragraph_spacing.INFO[CREDITS]",    "-3"                    },
   { "menu.paragraph_spacing.INFO[PROGRAM]",    "-3"                    },
-  { "menu.paragraph_spacing.INFO[VERSION]",    "-3"                    },
+  { "menu.paragraph_spacing.INFO[VERSION]",    "-2"                    },
   { "menu.paragraph_spacing.INFO[LEVELSET]",   "-3"                    },
   { "menu.paragraph_spacing.SETUP[INPUT]",     "-1"                    },
 
index 93c6cd0157bab9273c2f8961b9b4941c361dbd6d..7d0a9b5f0de497da2d4b27c91800152f248de8b8 100644 (file)
@@ -330,6 +330,15 @@ static void SDLSetAlpha(SDL_Surface *surface, boolean set, int alpha)
   SDL_SetSurfaceAlphaMod(surface, alpha);
 }
 
+const char *SDLGetRendererName(void)
+{
+  static SDL_RendererInfo renderer_info;
+
+  SDL_GetRendererInfo(sdl_renderer, &renderer_info);
+
+  return renderer_info.name;
+}
+
 SDL_Surface *SDLGetNativeSurface(SDL_Surface *surface)
 {
   SDL_PixelFormat format;
index acdafd5b8eb2f8327bef9b82658524ff361fcedf..7cc70310059a28c2d1fbd5ac33728019caeb723d 100644 (file)
@@ -382,6 +382,7 @@ typedef struct UserEventInfo        UserEvent;
 
 // SDL function definitions
 
+const char *SDLGetRendererName(void);
 boolean SDLSetNativeSurface(SDL_Surface **);
 SDL_Surface *SDLGetNativeSurface(SDL_Surface *);
 void SDLCreateBitmapTextures(Bitmap *);
index 15952e7e915ab2136ead7add03ced8569f18f093..d7a56c409d179272d141f8d5d04a74e9966accaf 100644 (file)
@@ -3764,6 +3764,14 @@ static void DrawInfoScreen_Version(void)
   DrawTextF(xstart3, ystart, font_head, "Used");
   ystart += ystep_head;
 
+  driver_name =
+    getStringCopyNStatic(SDLGetRendererName(), driver_name_len);
+
+  DrawTextF(xstart1, ystart, font_text, "Render Driver");
+  DrawTextF(xstart2, ystart, font_text, "%s", ARG_DEFAULT);
+  DrawTextF(xstart3, ystart, font_text, "%s", driver_name);
+  ystart += ystep_line;
+
   driver_name =
     getStringCopyNStatic(SDL_GetCurrentVideoDriver(), driver_name_len);