1
0
Fork 0

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.
This commit is contained in:
Patryk Obara 2019-12-25 07:14:03 +01:00 committed by Patryk Obara
parent cb82a60341
commit 6ce7ff8b58
2 changed files with 10 additions and 6 deletions

View file

@ -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);

View file

@ -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++;