mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-02 09:33:33 +00:00
UI: Add --no-studio-mode command line option
This commit is contained in:
parent
a1f853af55
commit
dd692628b5
|
@ -98,6 +98,7 @@ static bool unfiltered_log = false;
|
|||
bool opt_start_streaming = false;
|
||||
bool opt_start_recording = false;
|
||||
bool opt_studio_mode = false;
|
||||
bool opt_no_studio_mode = false;
|
||||
bool opt_start_replaybuffer = false;
|
||||
bool opt_start_virtualcam = false;
|
||||
bool opt_minimize_tray = false;
|
||||
|
@ -3390,6 +3391,9 @@ int main(int argc, char *argv[])
|
|||
} else if (arg_is(argv[i], "--studio-mode", nullptr)) {
|
||||
opt_studio_mode = true;
|
||||
|
||||
} else if (arg_is(argv[i], "--no-studio-mode", nullptr)) {
|
||||
opt_no_studio_mode = true;
|
||||
|
||||
} else if (arg_is(argv[i], "--allow-opengl", nullptr)) {
|
||||
opt_allow_opengl = true;
|
||||
|
||||
|
@ -3415,6 +3419,7 @@ int main(int argc, char *argv[])
|
|||
"--profile <string>: Use specific profile.\n"
|
||||
"--scene <string>: Start with specific scene.\n\n"
|
||||
"--studio-mode: Enable studio mode.\n"
|
||||
"--no-studio-mode: Disable studio mode.\n"
|
||||
"--minimize-to-tray: Minimize to system tray.\n"
|
||||
#if ALLOW_PORTABLE_MODE
|
||||
"--portable, -p: Use portable mode.\n"
|
||||
|
@ -3445,6 +3450,12 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (opt_studio_mode && opt_no_studio_mode) {
|
||||
std::cout
|
||||
<< "Can't use \"--studio-mode\" and \"--no-studio-mode\" together.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#if ALLOW_PORTABLE_MODE
|
||||
if (!portable_mode) {
|
||||
portable_mode =
|
||||
|
|
|
@ -284,6 +284,7 @@ extern bool opt_start_replaybuffer;
|
|||
extern bool opt_start_virtualcam;
|
||||
extern bool opt_minimize_tray;
|
||||
extern bool opt_studio_mode;
|
||||
extern bool opt_no_studio_mode;
|
||||
extern bool opt_allow_opengl;
|
||||
extern bool opt_always_on_top;
|
||||
extern std::string opt_starting_scene;
|
||||
|
|
|
@ -2094,13 +2094,16 @@ void OBSBasic::OBSInit()
|
|||
editPropertiesMode = config_get_bool(
|
||||
App()->GlobalConfig(), "BasicWindow", "EditPropertiesMode");
|
||||
|
||||
if (!opt_studio_mode) {
|
||||
if (!opt_studio_mode && !opt_no_studio_mode) {
|
||||
SetPreviewProgramMode(config_get_bool(App()->GlobalConfig(),
|
||||
"BasicWindow",
|
||||
"PreviewProgramMode"));
|
||||
} else {
|
||||
} else if (opt_studio_mode) {
|
||||
SetPreviewProgramMode(true);
|
||||
opt_studio_mode = false;
|
||||
} else {
|
||||
SetPreviewProgramMode(false);
|
||||
opt_no_studio_mode = false;
|
||||
}
|
||||
|
||||
#define SET_VISIBILITY(name, control) \
|
||||
|
|
Loading…
Reference in a new issue