From: cloudwalk Date: Sat, 20 Jun 2020 00:59:37 +0000 (+0000) Subject: Implement command-line support for setting vid_borderless X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=07bd5521fb7536f194768d05a0440017d6d60c58;p=xonotic%2Fdarkplaces.git Implement command-line support for setting vid_borderless git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12701 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_shared.c b/vid_shared.c index c35dbffd..0d45a051 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -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);