Path: blob/master/thirdparty/sdl/hidapi/SDL_hidapi_linux.h
9903 views
/*1Simple DirectMedia Layer2Copyright (C) 1997-2025 Sam Lantinga <[email protected]>34This software is provided 'as-is', without any express or implied5warranty. In no event will the authors be held liable for any damages6arising from the use of this software.78Permission is granted to anyone to use this software for any purpose,9including commercial applications, and to alter it and redistribute it10freely, subject to the following restrictions:11121. The origin of this software must not be misrepresented; you must not13claim that you wrote the original software. If you use this software14in a product, an acknowledgment in the product documentation would be15appreciated but is not required.162. Altered source versions must be plainly marked as such, and must not be17misrepresented as being the original software.183. This notice may not be removed or altered from any source distribution.19*/2021#ifdef SDL_USE_LIBUDEV22static const SDL_UDEV_Symbols *udev_ctx = NULL;2324#define udev_device_get_devnode udev_ctx->udev_device_get_devnode25#define udev_device_get_parent_with_subsystem_devtype udev_ctx->udev_device_get_parent_with_subsystem_devtype26#define udev_device_get_sysattr_value udev_ctx->udev_device_get_sysattr_value27#define udev_device_get_syspath udev_ctx->udev_device_get_syspath28#define udev_device_new_from_devnum udev_ctx->udev_device_new_from_devnum29#define udev_device_new_from_syspath udev_ctx->udev_device_new_from_syspath30#define udev_device_unref udev_ctx->udev_device_unref31#define udev_enumerate_add_match_subsystem udev_ctx->udev_enumerate_add_match_subsystem32#define udev_enumerate_get_list_entry udev_ctx->udev_enumerate_get_list_entry33#define udev_enumerate_new udev_ctx->udev_enumerate_new34#define udev_enumerate_scan_devices udev_ctx->udev_enumerate_scan_devices35#define udev_enumerate_unref udev_ctx->udev_enumerate_unref36#define udev_list_entry_get_name udev_ctx->udev_list_entry_get_name37#define udev_list_entry_get_next udev_ctx->udev_list_entry_get_next38#define udev_new udev_ctx->udev_new39#define udev_unref udev_ctx->udev_unref4041#undef HIDAPI_H__42#define HIDAPI_ALLOW_BUILD_WORKAROUND_KERNEL_2_6_3943#include "linux/hid.c"44#define HAVE_PLATFORM_BACKEND 14546#endif /* SDL_USE_LIBUDEV */474849