mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Change default SDL driver name from opengl to empty (autoselection)
This commit is contained in:
parent
f6e0f46040
commit
b08462d555
@ -199,6 +199,7 @@
|
||||
},
|
||||
"driver" : {
|
||||
"type" : "string",
|
||||
"defaultWindows" : "",
|
||||
"default" : "opengl",
|
||||
"description" : "preferred graphics backend driver name for SDL2"
|
||||
},
|
||||
|
@ -169,6 +169,8 @@ static QStringList getAvailableRenderingDrivers()
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
QStringList result;
|
||||
|
||||
result += QString(); // empty value for autoselection
|
||||
|
||||
int driversCount = SDL_GetNumRenderDrivers();
|
||||
|
||||
for(int it = 0; it < driversCount; it++)
|
||||
|
@ -1289,7 +1289,12 @@ static JsonNode getDefaultValue(const JsonNode & schema, std::string fieldName)
|
||||
#elif defined(VCMI_ANDROID)
|
||||
if (!fieldProps["defaultAndroid"].isNull())
|
||||
return fieldProps["defaultAndroid"];
|
||||
#elif !defined(VCMI_MOBILE)
|
||||
#elif defined(VCMI_WINDOWS)
|
||||
if (!fieldProps["defaultWindows"].isNull())
|
||||
return fieldProps["defaultWindows"];
|
||||
#endif
|
||||
|
||||
#if !defined(VCMI_MOBILE)
|
||||
if (!fieldProps["defaultDesktop"].isNull())
|
||||
return fieldProps["defaultDesktop"];
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user