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

Function load

source/MaaGamepadControlUnit/Manager/GamepadControlUnitMgr.cpp:19–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 ~Win32ControlUnitLoader() { destroy(); }
18
19 bool load()
20 {
21#ifdef _WIN32
22 if (!load_library(library_dir() / "MaaWin32ControlUnit")) {
23 LogError << "Failed to load MaaWin32ControlUnit library";
24 return false;
25 }
26
27 create_func_ = get_function<decltype(::MaaWin32ControlUnitCreate)>("MaaWin32ControlUnitCreate");
28 destroy_func_ = get_function<decltype(::MaaWin32ControlUnitDestroy)>("MaaWin32ControlUnitDestroy");
29
30 if (!create_func_ || !destroy_func_) {
31 LogError << "Failed to get Win32ControlUnit API functions";
32 unload();
33 return false;
34 }
35
36 return true;
37#else
38 return false;
39#endif
40 }
41
42 void unload()
43 {

Callers 4

initMethod · 0.85
classifierMethod · 0.85
detectorMethod · 0.85
get_imageMethod · 0.85

Calls 1

unloadFunction · 0.85

Tested by

no test coverage detected