MCPcopy Create free account
hub / github.com/crownengine/crown / WindowsDevice

Method WindowsDevice

src/device/main_windows.cpp:336–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334 void *_xinput_lib;
335
336 WindowsDevice(Allocator &a, DeviceOptions &opts)
337 : _hwnd(NULL)
338 , _hcursor(NULL)
339 , _events(a)
340 , _queue(push_event)
341 , _mouse_last_x(INT16_MAX)
342 , _mouse_last_y(INT16_MAX)
343 , _cursor_mode(CursorMode::NORMAL)
344 , _options(&opts)
345 , _xinput_lib(NULL)
346 {
347#define DL_IMPORT_FUNC(func_name, return_type, params) \
348 func_name = (PROTO_ ## func_name)os::library_symbol(_xinput_lib, # func_name); \
349 CE_ENSURE(func_name != NULL);
350
351 for (u32 i = 0; i < countof(s_xinput_dll_names); ++i) {
352 if ((_xinput_lib = os::library_open(s_xinput_dll_names[i])) != NULL) {
353 XINPUT_IMPORT();
354 break;
355 }
356 }
357
358#undef DL_IMPORT_FUNC
359 }
360
361 ~WindowsDevice()
362 {

Callers

nothing calls this directly

Calls 1

library_openFunction · 0.85

Tested by

no test coverage detected