File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ if(WITH_CUSTOM_CONTROLLER)
3636 target_compile_definitions (DlopenTesting PRIVATE WITH_CUSTOM_CONTROLLER )
3737endif ()
3838
39+ if (WITH_GAMEPAD_CONTROLLER)
40+ target_compile_definitions (DlopenTesting PRIVATE WITH_GAMEPAD_CONTROLLER )
41+ endif ()
42+
3943add_dependencies (DlopenTesting LibraryHolder )
4044
4145set_target_properties (DlopenTesting PROPERTIES FOLDER Testing )
Original file line number Diff line number Diff line change @@ -69,6 +69,20 @@ int main()
6969 return -1 ;
7070 }
7171
72+ #endif
73+
74+ #ifdef WITH_GAMEPAD_CONTROLLER
75+
76+ std::cout << " ********** GamepadControlUnitLibraryHolder::create_control_unit **********" << std::endl;
77+ auto gamepad_handle = MAA_NS::GamepadControlUnitLibraryHolder::create_control_unit (
78+ nullptr ,
79+ MaaGamepadType_Xbox360,
80+ MaaWin32ScreencapMethod_None);
81+ if (!gamepad_handle) {
82+ std::cerr << " Failed to create gamepad control unit" << std::endl;
83+ return -1 ;
84+ }
85+
7286#endif
7387
7488 std::cout << " ********** Done **********" << std::endl;
You can’t perform that action at this time.
0 commit comments