UI: Fix path calculation for disk space check

When using custom FFmpeg output mode, the check would instead use the
standard recording path which is no longer visible in the settings. This
commit also simplifies the checks by moving the duplicated code to a new
function.
This commit is contained in:
Richard Stanway
2019-09-27 15:04:07 +02:00
parent 66967b7a55
commit 27b7f45fd7
3 changed files with 31 additions and 13 deletions

View File

@@ -297,13 +297,7 @@ void OBSBasicStats::Update()
/* ------------------ */
const char *mode = config_get_string(main->Config(), "Output", "Mode");
const char *path = strcmp(mode, "Advanced")
? config_get_string(main->Config(),
"SimpleOutput",
"FilePath")
: config_get_string(main->Config(), "AdvOut",
"RecFilePath");
const char *path = main->GetCurrentOutputPath();
#define MBYTE (1024ULL * 1024ULL)
#define GBYTE (1024ULL * 1024ULL * 1024ULL)