Skip to content

Commit 0547854

Browse files
bernie-labergecedrik-fuoco-adsk
authored andcommitted
620: Fix overrides of video output command line options (AcademySoftwareFoundation#621)
### 620: Fix overrides of video output command line options ### Linked issues Fixes AcademySoftwareFoundation#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 <bernard.laberge@autodesk.com> Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
1 parent 4761bca commit 0547854

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/lib/app/RvCommon/RvPreferences.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3593,6 +3593,10 @@ RvPreferences::videoFormatChanged(int v)
35933593
settings.setValue("videoFormat", v);
35943594
settings.endGroup();
35953595

3596+
// The user has set a new video format which overrides the video format
3597+
// specified on the command line if any
3598+
Rv::Options::sharedOptions().presentFormat=nullptr;
3599+
35963600
updateVideoDataFormat(d);
35973601
updateVideoSync(d);
35983602
updateVideoSyncSource(d);
@@ -3651,6 +3655,10 @@ RvPreferences::videoDataFormatChanged(int v)
36513655
settings.setValue("dataFormat", v);
36523656
settings.endGroup();
36533657

3658+
// The user has set a new video data format which overrides the video
3659+
// data format specified on the command line if any
3660+
Rv::Options::sharedOptions().presentData=nullptr;
3661+
36543662
updateVideoSync(d);
36553663
updateVideoSyncSource(d);
36563664
updateVideoProfiles(d);
@@ -3711,6 +3719,9 @@ RvPreferences::videoAudioCheckBoxChanged(int v)
37113719
settings.beginGroup(QString::fromUtf8(str.str().c_str()));
37123720
settings.setValue("useAsAudioDevice", checked);
37133721
settings.endGroup();
3722+
3723+
// This user action overrides the presentAudio command line option if any
3724+
Rv::Options::sharedOptions().presentAudio=-1;
37143725
}
37153726
}
37163727

0 commit comments

Comments
 (0)