1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 03:33:29 +08:00

UXAssist 1.2.4

This commit is contained in:
2024-09-24 00:33:41 +08:00
parent daaf7b4901
commit 237830fc91
13 changed files with 149 additions and 73 deletions

View File

@@ -31,7 +31,7 @@ public static class WindowFunctions
switch (uMsg)
{
case WinApi.WM_ACTIVATE:
UXAssist.Logger.LogDebug($"Activate: {wParam.ToInt32()}, {lParam.ToInt32()}");
// UXAssist.Logger.LogDebug($"Activate: {wParam.ToInt32()}, {lParam.ToInt32()}");
// TODO: Set Priority like: WinApi.SetPriorityClass(WinApi.GetCurrentProcess(), 0x00000080);
break;
case WinApi.WM_DESTROY:
@@ -41,9 +41,9 @@ public static class WindowFunctions
}
break;
}
return WinApi.CallWindowProc(_oldWndProc, hWnd, uMsg, wParam, lParam);
}
public static void ShowCPUInfo()
{
var details = WinApi.GetLogicalProcessorDetails();
@@ -51,7 +51,7 @@ public static class WindowFunctions
var hybrid = details.HybridArchitecture;
if (hybrid)
{
msg += "\nP-Cores: {details.PerformanceCoreCount}\nE-Cores: {details.EfficiencyCoreCount}";
msg += $"\nP-Cores: {details.PerformanceCoreCount}\nE-Cores: {details.EfficiencyCoreCount}";
}
var handle = WinApi.GetCurrentProcess();
@@ -114,32 +114,6 @@ public static class WindowFunctions
}
}
public static void RefreshSavePath()
{
if (ProfileName == null) return;
if (UIRoot.instance.loadGameWindow.gameObject.activeSelf)
{
UIRoot.instance.loadGameWindow._Close();
}
if (UIRoot.instance.saveGameWindow.gameObject.activeSelf)
{
UIRoot.instance.saveGameWindow._Close();
}
string gameSavePath;
if (Patches.GamePatch.ProfileBasedSaveFolderEnabled.Value && string.Compare(Patches.GamePatch.DefaultProfileName.Value, ProfileName, StringComparison.OrdinalIgnoreCase) != 0)
gameSavePath = $"{GameConfig.overrideDocumentFolder}{GameConfig.gameName}/Save/{ProfileName}/";
else
gameSavePath = $"{GameConfig.overrideDocumentFolder}{GameConfig.gameName}/Save/";
if (string.Compare(GameConfig.gameSavePath, gameSavePath, StringComparison.OrdinalIgnoreCase) == 0) return;
GameConfig.gameSavePath = gameSavePath;
if (!Directory.Exists(GameConfig.gameSavePath))
{
Directory.CreateDirectory(GameConfig.gameSavePath);
}
}
public static IntPtr FindGameWindow()
{
if (_gameWindowHandle == IntPtr.Zero)