mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Merge pull request #3491 from IvanSavenko/change_default_driver
Change default SDL driver name from opengl to empty (autoselection)
This commit is contained in:
commit
8400c27251
@ -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