New upstream version 21.0.2+dfsg1
This commit is contained in:
parent
1f1bbb3518
commit
baafb6325b
706 changed files with 49633 additions and 5044 deletions
|
|
@ -62,6 +62,7 @@ static string currentLogFile;
|
|||
static string lastLogFile;
|
||||
|
||||
bool portable_mode = false;
|
||||
static bool multi = false;
|
||||
static bool log_verbose = false;
|
||||
static bool unfiltered_log = false;
|
||||
bool opt_start_streaming = false;
|
||||
|
|
@ -411,6 +412,11 @@ bool OBSApp::InitGlobalConfigDefaults()
|
|||
config_set_default_bool(globalConfig, "BasicWindow",
|
||||
"ShowStatusBar", true);
|
||||
|
||||
if (!config_get_bool(globalConfig, "General", "Pre21Defaults")) {
|
||||
config_set_default_string(globalConfig, "General",
|
||||
"CurrentTheme", "Dark");
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
config_set_default_bool(globalConfig, "Audio", "DisableAudioDucking",
|
||||
true);
|
||||
|
|
@ -635,6 +641,17 @@ bool OBSApp::InitGlobalConfig()
|
|||
changed = true;
|
||||
}
|
||||
|
||||
if (!config_has_user_value(globalConfig, "General", "Pre21Defaults")) {
|
||||
uint32_t lastVersion = config_get_int(globalConfig, "General",
|
||||
"LastVersion");
|
||||
bool useOldDefaults = lastVersion &&
|
||||
lastVersion < MAKE_SEMANTIC_VERSION(21, 0, 0);
|
||||
|
||||
config_set_bool(globalConfig, "General", "Pre21Defaults",
|
||||
useOldDefaults);
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (changed)
|
||||
config_save_safe(globalConfig, "tmp", nullptr);
|
||||
|
||||
|
|
@ -737,14 +754,19 @@ bool OBSApp::SetTheme(std::string name, std::string path)
|
|||
bool OBSApp::InitTheme()
|
||||
{
|
||||
const char *themeName = config_get_string(globalConfig, "General",
|
||||
"Theme");
|
||||
"CurrentTheme");
|
||||
if (!themeName) {
|
||||
/* Use deprecated "Theme" value if available */
|
||||
themeName = config_get_string(globalConfig,
|
||||
"General", "Theme");
|
||||
if (!themeName)
|
||||
themeName = "Default";
|
||||
}
|
||||
|
||||
if (!themeName)
|
||||
themeName = "Default";
|
||||
if (strcmp(themeName, "Default") != 0 && SetTheme(themeName))
|
||||
return true;
|
||||
|
||||
stringstream t;
|
||||
t << themeName;
|
||||
return SetTheme(t.str());
|
||||
return SetTheme("Default");
|
||||
}
|
||||
|
||||
OBSApp::OBSApp(int &argc, char **argv, profiler_name_store_t *store)
|
||||
|
|
@ -1343,7 +1365,7 @@ static int run_program(fstream &logFile, int argc, char *argv[])
|
|||
bool already_running = false;
|
||||
RunOnceMutex rom = GetRunOnceMutex(already_running);
|
||||
|
||||
if (already_running) {
|
||||
if (already_running && !multi) {
|
||||
blog(LOG_WARNING, "\n================================");
|
||||
blog(LOG_WARNING, "Warning: OBS is already running!");
|
||||
blog(LOG_WARNING, "================================\n");
|
||||
|
|
@ -1371,10 +1393,22 @@ static int run_program(fstream &logFile, int argc, char *argv[])
|
|||
|
||||
blog(LOG_WARNING, "User is now running a secondary "
|
||||
"instance of OBS!");
|
||||
|
||||
} else if (already_running && multi) {
|
||||
blog(LOG_INFO, "User enabled --multi flag and is now "
|
||||
"running multiple instances of OBS.");
|
||||
}
|
||||
|
||||
/* --------------------------------------- */
|
||||
#endif
|
||||
if (argc > 1) {
|
||||
stringstream stor;
|
||||
stor << argv[1];
|
||||
for (int i = 2; i < argc; ++i) {
|
||||
stor << " " << argv[i];
|
||||
}
|
||||
blog(LOG_INFO, "Command Line Arguments: %s", stor.str().c_str());
|
||||
}
|
||||
|
||||
if (!program.OBSInit())
|
||||
return 0;
|
||||
|
|
@ -1851,6 +1885,9 @@ int main(int argc, char *argv[])
|
|||
if (arg_is(argv[i], "--portable", "-p")) {
|
||||
portable_mode = true;
|
||||
|
||||
} else if (arg_is(argv[i], "--multi", "-m")) {
|
||||
multi = true;
|
||||
|
||||
} else if (arg_is(argv[i], "--verbose", nullptr)) {
|
||||
log_verbose = true;
|
||||
|
||||
|
|
@ -1899,7 +1936,8 @@ int main(int argc, char *argv[])
|
|||
"--scene <string>: Start with specific scene.\n\n" <<
|
||||
"--studio-mode: Enable studio mode.\n" <<
|
||||
"--minimize-to-tray: Minimize to system tray.\n" <<
|
||||
"--portable, -p: Use portable mode.\n\n" <<
|
||||
"--portable, -p: Use portable mode.\n" <<
|
||||
"--multi, -m: Don't warn when launching multiple instances.\n\n" <<
|
||||
"--verbose: Make log more verbose.\n" <<
|
||||
"--always-on-top: Start in 'always on top' mode.\n\n" <<
|
||||
"--unfiltered_log: Make log unfiltered.\n\n" <<
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue