diff --git a/UminekoLauncher/Dialogs/ConfigPopup.xaml b/UminekoLauncher/Dialogs/ConfigPopup.xaml
index 92c913e..92a621d 100644
--- a/UminekoLauncher/Dialogs/ConfigPopup.xaml
+++ b/UminekoLauncher/Dialogs/ConfigPopup.xaml
@@ -25,13 +25,14 @@
-
+
+
diff --git a/UminekoLauncher/Dialogs/UpdateWindow.xaml.cs b/UminekoLauncher/Dialogs/UpdateWindow.xaml.cs
index 60f6f3f..1f751e1 100644
--- a/UminekoLauncher/Dialogs/UpdateWindow.xaml.cs
+++ b/UminekoLauncher/Dialogs/UpdateWindow.xaml.cs
@@ -5,7 +5,6 @@
using System.IO;
using System.Net;
using System.Net.Mime;
-using System.Security.Cryptography;
using System.Text;
using System.Windows;
diff --git a/UminekoLauncher/GameConfig.cs b/UminekoLauncher/GameConfig.cs
index 9a141d9..f4d5d28 100644
--- a/UminekoLauncher/GameConfig.cs
+++ b/UminekoLauncher/GameConfig.cs
@@ -26,7 +26,9 @@ public enum DisplayResolution
[Description("1920x1080")]
x1920,
[Description("2560x1440")]
- x2560
+ x2560,
+ [Description("Custom")]
+ Custom
}
///
/// 该静态类用于执行游戏配置的相关操作。
@@ -59,6 +61,11 @@ static class GameConfig
///
public static DisplayResolution DisplayResolution { get; set; } = DisplayResolution.x1920;
+ ///
+ /// 获取或设置自定义游戏分辨率。此属性默认为空。
+ ///
+ public static string CustomDisplayResolution { get; set; } = null;
+
///
/// 获取或设置游戏显示模式。
///
@@ -99,7 +106,8 @@ public static void LoadConfig()
#region 分辨率
if (line.StartsWith("window-width"))
{
- switch (line.Split('=')[1])
+ string strValue = line.Split('=')[1];
+ switch (strValue)
{
case "1280":
DisplayResolution = DisplayResolution.x1280;
@@ -120,7 +128,8 @@ public static void LoadConfig()
DisplayResolution = DisplayResolution.x2560;
break;
default:
- DisplayResolution = DisplayResolution.x1920;
+ DisplayResolution = DisplayResolution.Custom;
+ CustomDisplayResolution = strValue;
break;
}
continue;
@@ -170,29 +179,36 @@ public static void SaveConfig()
#region 分辨率
string displayResolution = "window-width=";
- switch (DisplayResolution)
+ if (DisplayResolution == DisplayResolution.Custom && !string.IsNullOrEmpty(CustomDisplayResolution))
{
- case DisplayResolution.x1280:
- displayResolution += "1280";
- break;
- case DisplayResolution.x1366:
- displayResolution += "1366";
- break;
- case DisplayResolution.x1440:
- displayResolution += "1440";
- break;
- case DisplayResolution.x1600:
- displayResolution += "1600";
- break;
- case DisplayResolution.x1920:
- displayResolution += "1920";
- break;
- case DisplayResolution.x2560:
- displayResolution += "2560";
- break;
- default:
- displayResolution += "1920";
- break;
+ displayResolution += CustomDisplayResolution;
+ }
+ else
+ {
+ switch (DisplayResolution)
+ {
+ case DisplayResolution.x1280:
+ displayResolution += "1280";
+ break;
+ case DisplayResolution.x1366:
+ displayResolution += "1366";
+ break;
+ case DisplayResolution.x1440:
+ displayResolution += "1440";
+ break;
+ case DisplayResolution.x1600:
+ displayResolution += "1600";
+ break;
+ case DisplayResolution.x1920:
+ displayResolution += "1920";
+ break;
+ case DisplayResolution.x2560:
+ displayResolution += "2560";
+ break;
+ default:
+ displayResolution += "1920";
+ break;
+ }
}
config.Add(displayResolution);
#endregion
diff --git a/UminekoLauncher/Properties/AssemblyInfo.cs b/UminekoLauncher/Properties/AssemblyInfo.cs
index 6199cba..dcdb763 100644
--- a/UminekoLauncher/Properties/AssemblyInfo.cs
+++ b/UminekoLauncher/Properties/AssemblyInfo.cs
@@ -51,5 +51,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.3.0.4")]
-[assembly: AssemblyFileVersion("1.3.0.4")]
+[assembly: AssemblyVersion("1.3.0.6")]
+[assembly: AssemblyFileVersion("1.3.0.6")]