Skip to content

Commit 0a6615c

Browse files
committed
fix: unused info value in AdbDeviceInfoExtensions
1 parent f548861 commit 0a6615c

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/MaaFramework.Binding.Native/Extensions/AdbDeviceInfoExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static MaaAdbController ToAdbController(this AdbDeviceInfo info,
4141
adbPath ?? info.AdbPath,
4242
adbSerial ?? info.AdbSerial,
4343
screencapMethods ?? info.ScreencapMethods,
44-
inputMethods ?? AdbInputMethods.None,
44+
inputMethods ?? info.InputMethods,
4545
config ?? info.Config
4646
),
4747
agentPath,

src/MaaFramework.Binding.UnitTests/Test_IMaaToolkit.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ public void Interface_AdbDevice(MaaTypes type, IMaaToolkit maaToolkit, string ar
7474
.LinkStart()
7575
.Wait()
7676
.ThrowIfNot(MaaJobStatus.Succeeded, MaaJobStatusException.MaaControllerMessage, devices[0].AdbPath, devices[0].AdbSerial);
77+
78+
#if MAA_WIN32
79+
using var optionalArgumentDefaultValuesTest = type switch
80+
{
81+
MaaTypes.Native => devices[0].ToAdbController(),
82+
_ => throw new NotImplementedException(),
83+
};
84+
#endif
7785
}
7886

7987
#if MAA_WIN32 && !GITHUB_ACTIONS
@@ -106,6 +114,16 @@ private static void Test_Win32_WindowInfos(MaaTypes type, IList<DesktopWindowInf
106114
.LinkStart()
107115
.Wait()
108116
.ThrowIfNot(MaaJobStatus.Succeeded, MaaJobStatusException.MaaControllerMessage, windows[0].Handle);
117+
118+
#if MAA_WIN32
119+
using var optionalArgumentDefaultValuesTest = type switch
120+
{
121+
MaaTypes.Native => windows[0].ToWin32Controller(
122+
screencapMethod: Win32ScreencapMethod.GDI,
123+
inputMethod: Win32InputMethod.SendMessage),
124+
_ => throw new NotImplementedException(),
125+
};
126+
#endif
109127
}
110128
#endif
111129

0 commit comments

Comments
 (0)