Skip to content

Commit

Permalink
UI: Add OS specific theme variables via prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Warchamp7 authored and RytoEX committed May 10, 2024
1 parent 279e942 commit af685be
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions UI/obs-app-theming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit af685be

Please sign in to comment.