From 7e8407a74b32d6c9600498420181e75d0b1ef3ad Mon Sep 17 00:00:00 2001 From: Bernard Laberge <117092886+bernie-laberge@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:51:13 -0800 Subject: [PATCH] 620: Fix overrides of video output command line options (#621) ### 620: Fix overrides of video output command line options ### Linked issues Fixes #620 ### Summarize your change. This commit now enables the user to override the following optional video output related command line options: - presentVideoFormat - presentDataFormat - presentAudio ### Describe the reason for the change. User cannot override settings presentVideoFormat and presentDataFormat once specified on the command line ### Describe what you have tested and on which operating system. Successfully tested on macOS ### Add a list of changes, and note any that might need special attention during the review. ### If possible, provide screenshots. Signed-off-by: Bernard Laberge --- src/lib/app/RvCommon/RvPreferences.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/app/RvCommon/RvPreferences.cpp b/src/lib/app/RvCommon/RvPreferences.cpp index 3cfece36..c637be68 100644 --- a/src/lib/app/RvCommon/RvPreferences.cpp +++ b/src/lib/app/RvCommon/RvPreferences.cpp @@ -3593,6 +3593,10 @@ RvPreferences::videoFormatChanged(int v) settings.setValue("videoFormat", v); settings.endGroup(); + // The user has set a new video format which overrides the video format + // specified on the command line if any + Rv::Options::sharedOptions().presentFormat=nullptr; + updateVideoDataFormat(d); updateVideoSync(d); updateVideoSyncSource(d); @@ -3651,6 +3655,10 @@ RvPreferences::videoDataFormatChanged(int v) settings.setValue("dataFormat", v); settings.endGroup(); + // The user has set a new video data format which overrides the video + // data format specified on the command line if any + Rv::Options::sharedOptions().presentData=nullptr; + updateVideoSync(d); updateVideoSyncSource(d); updateVideoProfiles(d); @@ -3711,6 +3719,9 @@ RvPreferences::videoAudioCheckBoxChanged(int v) settings.beginGroup(QString::fromUtf8(str.str().c_str())); settings.setValue("useAsAudioDevice", checked); settings.endGroup(); + + // This user action overrides the presentAudio command line option if any + Rv::Options::sharedOptions().presentAudio=-1; } }