mirror of https://github.com/hykilpikonna/AquaDX
[+] TouchPanelBaudRate
parent
3bc9f1382c
commit
0f1bfc5a17
|
@ -105,6 +105,10 @@ FrameRateDisplay=false
|
|||
# Practice mode, activated by pressing Test in the game
|
||||
# Must be used together with TestProof
|
||||
PractiseMode=true
|
||||
# Adjust the baud rate of the touch screen serial port, default value is 9600
|
||||
# Requires hardware support. If you are unsure whether you can use it, you cannot use it
|
||||
# Set to 0 to disable
|
||||
TouchPanelBaudRate=0
|
||||
|
||||
# ===================================
|
||||
# Save some potentially unnecessary time
|
||||
|
|
|
@ -125,6 +125,10 @@ FrameRateDisplay=false
|
|||
# 练习模式,在游戏中按 Test 打开
|
||||
# 必须和 TestProof 一起用
|
||||
PractiseMode=true
|
||||
# 调整触摸屏串口波特率,默认值 9600
|
||||
# 需要硬件配合。如果你不清楚你是否可以使用,那你不能使用
|
||||
# 改为 0 禁用
|
||||
TouchPanelBaudRate=0
|
||||
|
||||
# ===================================
|
||||
# 节省一些不知道有用没用的时间
|
||||
|
|
|
@ -75,6 +75,7 @@ namespace AquaMai
|
|||
public bool SelectionDetail { get; set; }
|
||||
public bool ShowNetErrorDetail { get; set; }
|
||||
public bool FrameRateDisplay { get; set; }
|
||||
public int TouchPanelBaudRate { get; set; }
|
||||
}
|
||||
|
||||
public class TimeSavingConfig
|
||||
|
|
|
@ -168,6 +168,7 @@ namespace AquaMai
|
|||
Patch(typeof(CustomLogo));
|
||||
// Utils
|
||||
Patch(typeof(JudgeAdjust));
|
||||
Patch(typeof(TouchPanelBaudRate));
|
||||
# if DEBUG
|
||||
Patch(typeof(LogNetworkErrors));
|
||||
# endif
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
using HarmonyLib;
|
||||
using IO;
|
||||
|
||||
namespace AquaMai.Utils;
|
||||
|
||||
public class TouchPanelBaudRate
|
||||
{
|
||||
[HarmonyPatch(typeof(NewTouchPanel), "Open")]
|
||||
[HarmonyPrefix]
|
||||
private static void OpenPrefix(ref int ___BaudRate)
|
||||
{
|
||||
if (AquaMai.AppConfig.Utils.TouchPanelBaudRate <= 0) return;
|
||||
___BaudRate = AquaMai.AppConfig.Utils.TouchPanelBaudRate;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue