Exemple #1
0
 private void Revert()
 {
     if (Prefs.LogVerbose)
     {
         Log.Message("Reverting screen settings to " + oldRes.x + "x" + oldRes.z + ", fs=" + oldFullscreen);
     }
     ResolutionUtility.SetResolutionRaw(oldRes.x, oldRes.z, oldFullscreen);
     Prefs.FullScreen   = oldFullscreen;
     Prefs.ScreenWidth  = oldRes.x;
     Prefs.ScreenHeight = oldRes.z;
     Prefs.UIScale      = oldUIScale;
 }
Exemple #2
0
 private void Revert()
 {
     if (Prefs.LogVerbose)
     {
         Log.Message(string.Concat(new object[]
         {
             "Reverting screen settings to ",
             this.oldRes.x,
             "x",
             this.oldRes.z,
             ", fs=",
             this.oldFullscreen
         }), false);
     }
     ResolutionUtility.SetResolutionRaw(this.oldRes.x, this.oldRes.z, this.oldFullscreen);
     Prefs.FullScreen   = this.oldFullscreen;
     Prefs.ScreenWidth  = this.oldRes.x;
     Prefs.ScreenHeight = this.oldRes.z;
     Prefs.UIScale      = this.oldUIScale;
 }
Exemple #3
0
 public void Apply()
 {
     if (this.customCursorEnabled)
     {
         CustomCursor.Activate();
     }
     else
     {
         CustomCursor.Deactivate();
     }
     AudioListener.volume        = this.volumeGame;
     Application.runInBackground = this.runInBackground;
     if (this.screenWidth == 0 || this.screenHeight == 0)
     {
         ResolutionUtility.SetNativeResolutionRaw();
     }
     else
     {
         ResolutionUtility.SetResolutionRaw(this.screenWidth, this.screenHeight, this.fullscreen);
     }
 }
Exemple #4
0
 public void Apply()
 {
     if (UnityData.IsInMainThread)
     {
         if (customCursorEnabled)
         {
             CustomCursor.Activate();
         }
         else
         {
             CustomCursor.Deactivate();
         }
         AudioListener.volume        = volumeGame;
         Application.runInBackground = runInBackground;
         if (screenWidth == 0 || screenHeight == 0)
         {
             ResolutionUtility.SetNativeResolutionRaw();
         }
         else
         {
             ResolutionUtility.SetResolutionRaw(screenWidth, screenHeight, fullscreen);
         }
     }
 }