This article's documentation is for anything that uses the Source engine. Click here for more information.

Mat setvideomode: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
{{this is a|console variable|name=mat_setvideomode}} This [[integer]] and [[boolean]] [[cvar]] sets the screen resolution and change the display mode to windowed or fullscreen.
{{this is a|console variable|name=mat_setvideomode}} This [[integer]] and [[boolean]] [[cvar]] sets the screen resolution and change the display mode to windowed or fullscreen.


If <windowed> is set to "1", switches the game to windowed mode, if set to "0", switches the game to fullscreen.
If {{code|<windowed>}} value is set to "1", switches the game to windowed mode, if set to "0", switches the game to fullscreen.


{{Syntax|mat_setvideomode <width> <height> <windowed>}}
{{Syntax|mat_setvideomode <width> <height> <windowed>}}


== Example ==
== Example ==
{{code|mat_setvideomode 1920 1080 0}}
;{{code|mat_setvideomode 1920 1080 0}}
: Runs the game in fullscreen 1920x1080 resolution.
: Runs the game in fullscreen 1920x1080 resolution.


{{Code|mat_setvideomode 1920 1080 1}}
;{{Code|mat_setvideomode 1920 1080 1}}
: Runs the game in windowed 1920x1080 resolution.
: Runs the game in windowed 1920x1080 resolution.

Latest revision as of 22:06, 17 January 2025

English (en)Translate (Translate)

mat_setvideomode is a console variable available in all Source Source games. This integer and boolean cvar sets the screen resolution and change the display mode to windowed or fullscreen.

If <windowed> value is set to "1", switches the game to windowed mode, if set to "0", switches the game to fullscreen.

Syntax: mat_setvideomode <width> <height> <windowed>

Example

mat_setvideomode 1920 1080 0
Runs the game in fullscreen 1920x1080 resolution.
mat_setvideomode 1920 1080 1
Runs the game in windowed 1920x1080 resolution.