]> uap-core.de Git - uwplayer.git/commitdiff
implement -s (single instance) arg
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Thu, 7 Aug 2025 19:48:36 +0000 (21:48 +0200)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Thu, 7 Aug 2025 19:48:36 +0000 (21:48 +0200)
application/main.c

index 458fed02a3aee66bfe5fb2cd01195049a956242f..83724742b7c2c00626449d954c44e4a6b438225c 100644 (file)
@@ -213,6 +213,12 @@ int main(int argc, char** argv) {
         PlayListSetMode(window, playback);
     }
     
+    if(single_instance) {
+        // this will trigger the Single Instance menu button event handler
+        // and enable the single instance mode if possible
+        XmToggleButtonGadgetSetState(window->prefSingleInstanceButton, True, True);
+    }
+    
     WindowShow(window);
     AppMainLoop(app);