MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / MaaWlRootsControllerCreate

Function MaaWlRootsControllerCreate

source/MaaFramework/API/MaaFramework.cpp:264–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264MaaController* MaaWlRootsControllerCreate(const char* wlr_socket_path, MaaBool use_win32_vk_code)
265{
266 LogFunc << VAR(wlr_socket_path) << VAR(use_win32_vk_code);
267
268#ifndef __linux__
269
270 LogError << "This API " << __FUNCTION__ << " is only available on Linux";
271 return nullptr;
272
273#else
274
275 auto control_unit = MAA_NS::WlRootsControlUnitLibraryHolder::create_control_unit(wlr_socket_path, use_win32_vk_code);
276
277 if (!control_unit) {
278 LogError << "Failed to create control unit";
279 return nullptr;
280 }
281
282 return new MAA_CTRL_NS::ControllerAgent(std::move(control_unit));
283#endif
284}
285
286MaaController* MaaKWinControllerCreate(const char* device_node, int screen_width, int screen_height, MaaBool use_win32_vk_code)
287{

Callers 2

ctorMethod · 0.50
runMethod · 0.50

Calls 1

moveFunction · 0.85

Tested by

no test coverage detected