]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Implement command-line support for setting vid_borderless
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 20 Jun 2020 00:59:37 +0000 (00:59 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 20 Jun 2020 00:59:37 +0000 (00:59 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12701 d7cf8633-e32d-0410-b094-e92efae38249

vid_shared.c

index c35dbffd2fe64c25ba6c7b098719e660d1f7e5bf..0d45a051373a0c66301d42dd2854e4cb432b5afc 100644 (file)
@@ -1516,6 +1516,12 @@ void VID_Start(void)
 // COMMANDLINEOPTION: Video: -window performs +vid_fullscreen 0
                if (COM_CheckParm("-window") || COM_CheckParm("-safe") || (i = COM_CheckParm("+vid_fullscreen") != 0 && atoi(sys.argv[i+1]) == 0))
                        Cvar_SetValueQuick(&vid_fullscreen, false);
+// COMMANDLINEOPTION: Video: -borderless performs +vid_borderless 1
+               if (COM_CheckParm("-borderless") || (i = COM_CheckParm("+vid_borderless") != 0 && atoi(sys.argv[i+1]) == 1))
+               {
+                       Cvar_SetValueQuick(&vid_borderless, true);
+                       Cvar_SetValueQuick(&vid_fullscreen, false);
+               }
 // COMMANDLINEOPTION: Video: -fullscreen performs +vid_fullscreen 1
                if (COM_CheckParm("-fullscreen") || (i = COM_CheckParm("+vid_fullscreen") != 0 && atoi(sys.argv[i+1]) == 1))
                        Cvar_SetValueQuick(&vid_fullscreen, true);