From 6ce7ff8b58b88d885a43dd21348509ccecdfa588 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Wed, 25 Dec 2019 07:14:03 +0100 Subject: [PATCH] Change sdl.renderer to sdl.texture_renderer Otherwise users might easily miss, that this option is supposed to work only for 'texture' output. Also, do slight adjustments to formatting in generated .conf file. --- src/gui/sdlmain.cpp | 12 ++++++++---- src/misc/setup.cpp | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index e02d7de1..e14fcf0b 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -697,7 +697,7 @@ dosurface: retFlags |= GFX_SCALING; SDL_RendererInfo rendererInfo; SDL_GetRendererInfo(sdl.renderer, &rendererInfo); - LOG_MSG("Using driver \"%s\" for renderer", rendererInfo.name); + LOG_MSG("Using driver \"%s\" for texture renderer", rendererInfo.name); if (rendererInfo.flags & SDL_RENDERER_ACCELERATED) retFlags |= GFX_HARDWARE; break; @@ -1291,7 +1291,7 @@ static void GUI_StartUp(Section * sec) { sdl.texture.pixelFormat = 0; sdl.window = 0; sdl.renderer = 0; - sdl.rendererDriver = section->Get_string("renderer"); + sdl.rendererDriver = section->Get_string("texture_renderer"); #if C_OPENGL if(sdl.desktop.want_type==SCREEN_OPENGL){ /* OPENGL is requested */ @@ -1784,8 +1784,12 @@ void Config_Add_SDL() { "software", 0 }; - Pstring = sdl_sec->Add_string("renderer",Property::Changeable::Always,"auto"); - Pstring->Set_help("Choose a renderer driver if output=texture or output=texturenb. Use output=auto for an automatic choice."); + + Pstring = sdl_sec->Add_string("texture_renderer", + Property::Changeable::Always, + "auto"); + Pstring->Set_help("Choose a renderer driver if output=texture or texturenb.\n" + "Use output=auto for an automatic choice."); Pstring->Set_values(renderers); Pbool = sdl_sec->Add_bool("autolock",Property::Changeable::Always,true); diff --git a/src/misc/setup.cpp b/src/misc/setup.cpp index 47946284..db746cc9 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -715,7 +715,7 @@ bool Config::PrintConfig(char const * const configfilename) const { } i=0; char prefix[80]; - snprintf(prefix,80, "\n# %*s ", (int)maxwidth, ""); + snprintf(prefix,80, "\n# %*s ", (int)maxwidth, ""); while ((p = sec->Get_prop(i++))) { std::string help = p->Get_help(); std::string::size_type pos = std::string::npos; @@ -749,7 +749,7 @@ bool Config::PrintConfig(char const * const configfilename) const { *helpwrite++=*helpstr; if (*helpstr == '\n') { *helpwrite=0; - fprintf(outfile,"# %s",helpline); + fprintf(outfile,"# %s", helpline); helpwrite=helpline; } helpstr++;