0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

UI: Add OS specific theme variables via prefix

This commit is contained in:
Warchamp7 2024-05-10 15:37:11 -04:00 committed by Ryan Foster
parent 279e9424c0
commit af685be40d

View File

@ -317,6 +317,19 @@ static vector<OBSThemeVariable> ParseThemeVariables(const char *themeData)
OBSThemeVariable var;
var.name = key;
#ifdef _WIN32
const QString osPrefix = "os_win_";
#elif __APPLE__
const QString osPrefix = "os_mac_";
#else
const QString osPrefix = "os_lin_";
#endif
if (key.startsWith(osPrefix) &&
key.length() > osPrefix.length()) {
var.name = key.sliced(osPrefix.length());
}
ret = cf_next_token_should_be(cfp, ":", ";", nullptr);
if (ret != PARSE_SUCCESS)
continue;