File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1150,13 +1150,18 @@ private void InitBuiltInCommands()
11501150 ( ) => LogVariable ( "Application path" , AppDomain . CurrentDomain . BaseDirectory )
11511151 ) ) ;
11521152
1153- AddCommand ( Command . Create < bool > (
1153+ AddCommand ( Command . Create < bool ? > (
11541154 "showfps" ,
11551155 "displayfps" ,
11561156 "Query or set whether the fps is being displayed on-screen" ,
11571157 Parameter . Create ( "enabled" , "Whether the fps is being displayed on-screen" ) ,
11581158 b =>
11591159 {
1160+ if ( ! b . HasValue )
1161+ {
1162+ b = ! _isDisplayingFps ;
1163+ }
1164+
11601165 if ( b != _isDisplayingFps )
11611166 {
11621167 _isDisplayingFps = ! _isDisplayingFps ;
@@ -1171,7 +1176,7 @@ private void InitBuiltInCommands()
11711176 }
11721177 }
11731178
1174- LogSuccess ( $ "{ ( b ? "Enabled" : "Disabled" ) } the on-screen fps.") ;
1179+ LogSuccess ( $ "{ ( b . Value ? "Enabled" : "Disabled" ) } the on-screen fps.") ;
11751180 } ,
11761181 ( ) => LogVariable ( "Show fps" , _isDisplayingFps )
11771182 ) ) ;
You can’t perform that action at this time.
0 commit comments