public static void SafeSetResolution(Resolution res)
        {
            if (Screen.width == res.width && Screen.height == res.height)
            {
                return;
            }
            IntVec2 oldRes = new IntVec2(Screen.width, Screen.height);

            ResolutionUtility.SetResolutionRaw(res.width, res.height, Screen.fullScreen);
            Prefs.ScreenWidth  = res.width;
            Prefs.ScreenHeight = res.height;
            Find.WindowStack.Add(new Dialog_ResolutionConfirm(oldRes));
        }
        public static void SetNativeResolutionRaw()
        {
            Resolution nativeResolution = ResolutionUtility.NativeResolution;

            ResolutionUtility.SetResolutionRaw(nativeResolution.width, nativeResolution.height, true);
        }