aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMon ouïe <mon.ouie@gmail.com>2023-11-30 22:26:59 +0100
committerMon ouïe <mon.ouie@gmail.com>2023-11-30 22:26:59 +0100
commit99fee8244657bf047abab813e630d2ea6b08757e (patch)
tree38b602498f8ccfc914c5e1df7f991972bc2bfda7 /src
parenta50a1ea5cec17195cb61126a8c4c219760b5de27 (diff)
Add command line option to chose the VR overlay key
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a10745f..1929193 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -415,6 +415,7 @@ private: // X compositor
vr::VROverlayHandle_t thumbnail_handle = vr::k_ulOverlayHandleInvalid;
VideoBuffers *overlay_buffers = nullptr;
GLuint m_unOverlayProgramID = 0;
+ const char *overlay_key = "vr-video-player";
};
@@ -709,7 +710,10 @@ CMainApplication::CMainApplication( int argc, char *argv[] )
reduce_flicker = true;
} else if(strcmp(argv[i], "--overlay") == 0) {
overlay_mode = true;
- }
+ } else if(strcmp(argv[i], "--overlay-key") == 0 && i < argc - 1) {
+ overlay_key = argv[i + 1];
+ ++i;
+ }
else if(argv[i][0] == '-') {
fprintf(stderr, "Invalid flag: %s\n", argv[i]);
usage();
@@ -1179,7 +1183,7 @@ bool CMainApplication::BInitOverlay()
}
vr::VROverlay()->CreateDashboardOverlay(
- "vr-video-player",
+ overlay_key,
"vr-video-player",
&overlay_handle,
&thumbnail_handle