Explorar el Código

fullscreen and windowed mode cli fix update 2

blackwc hace 10 años
padre
commit
ef5bdc66d3

+ 7 - 7
Templates/Empty/game/core/scripts/client/canvas.cs

@@ -32,11 +32,6 @@ function configureCanvas()
    if ($pref::Video::mode $= "")
       $pref::Video::mode = "800 600 false 32 60 0";
 
-   if($cliFullscreen !$="") {
-      $pref::Video::mode = setWord($pref::Video::mode, $WORD::FULLSCREEN, $cliFullScreen);
-      $cliFullscreen = "";
-   }
-
    %resX = getWord($pref::Video::mode, $WORD::RES_X);
    %resY = getWord($pref::Video::mode, $WORD::RES_Y);
    %fs = getWord($pref::Video::mode,   $WORD::FULLSCREEN);
@@ -44,9 +39,14 @@ function configureCanvas()
    %rate = getWord($pref::Video::mode, $WORD::REFRESH);
    %fsaa = getWord($pref::Video::mode, $WORD::AA);
    
-   echo("--------------");
-   echo("Attempting to set resolution to \"" @ $pref::Video::mode @ "\"");
+   if($cliFullscreen !$= "") {
+      %fs = $cliFullscreen;
+      $cliFullscreen = "";
+   }
    
+   echo("--------------");
+   echo("Attempting to set resolution to \"" @ %resX SPC %resY SPC %fs SPC %bpp SPC %rate SPC %fsaa @ "\"");
+      
    %deskRes    = getDesktopResolution();      
    %deskResX   = getWord(%deskRes, $WORD::RES_X);
    %deskResY   = getWord(%deskRes, $WORD::RES_Y);

+ 7 - 7
Templates/Full/game/core/scripts/client/canvas.cs

@@ -32,11 +32,6 @@ function configureCanvas()
    if ($pref::Video::mode $= "")
       $pref::Video::mode = "800 600 false 32 60 0";
 
-   if($cliFullscreen !$= "") {
-      $pref::Video::mode = setWord($pref::Video::mode, $WORD::FULLSCREEN, $cliFullScreen);
-      $cliFullscreen = "";
-   }
-
    %resX = getWord($pref::Video::mode, $WORD::RES_X);
    %resY = getWord($pref::Video::mode, $WORD::RES_Y);
    %fs = getWord($pref::Video::mode,   $WORD::FULLSCREEN);
@@ -44,9 +39,14 @@ function configureCanvas()
    %rate = getWord($pref::Video::mode, $WORD::REFRESH);
    %fsaa = getWord($pref::Video::mode, $WORD::AA);
    
-   echo("--------------");
-   echo("Attempting to set resolution to \"" @ $pref::Video::mode @ "\"");
+   if($cliFullscreen !$= "") {
+      %fs = $cliFullscreen;
+      $cliFullscreen = "";
+   }
    
+   echo("--------------");
+   echo("Attempting to set resolution to \"" @ %resX SPC %resY SPC %fs SPC %bpp SPC %rate SPC %fsaa @ "\"");
+      
    %deskRes    = getDesktopResolution();      
    %deskResX   = getWord(%deskRes, $WORD::RES_X);
    %deskResY   = getWord(%deskRes, $WORD::RES_Y);