diff options
| author | Ray <[email protected]> | 2018-10-24 13:45:17 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2018-10-24 13:45:17 +0200 |
| commit | 72431c6c36a166b00e52527962ab4d978ab0111d (patch) | |
| tree | 346e60c85c667b4e7650b7d3cd1c7ee3c8a54be5 /src/core.c | |
| parent | 550dd40cb324896138dde9ee43bb44c0b9723345 (diff) | |
| download | raylib-72431c6c36a166b00e52527962ab4d978ab0111d.tar.gz raylib-72431c6c36a166b00e52527962ab4d978ab0111d.zip | |
Code tweaks
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -331,18 +331,19 @@ static int currentMouseWheelY = 0; // Registers current mouse wheel #if defined(PLATFORM_RPI) static char currentMouseStateEvdev[3] = { 0 }; // Holds the new mouse state for the next polling event to grab (Can't be written directly due to multithreading, app could miss the update) + typedef struct { - pthread_t threadId; // Event reading thread id - int fd; // File descriptor to the device it is assigned to - int eventNum; // Number of 'event<N>' device - Rectangle absRange; // Range of values for absolute pointing devices (touchscreens) - int touchSlot; // Hold the touch slot number of the currently being sent multitouch block - bool isMouse; // True if device supports relative X Y movements - bool isTouch; // True if device supports absolute X Y movements and has BTN_TOUCH - bool isMultitouch; // True if device supports multiple absolute movevents and has BTN_TOUCH - bool isKeyboard; // True if device has letter keycodes - bool isGamepad; // True if device has gamepad buttons -}InputEventWorker; + pthread_t threadId; // Event reading thread id + int fd; // File descriptor to the device it is assigned to + int eventNum; // Number of 'event<N>' device + Rectangle absRange; // Range of values for absolute pointing devices (touchscreens) + int touchSlot; // Hold the touch slot number of the currently being sent multitouch block + bool isMouse; // True if device supports relative X Y movements + bool isTouch; // True if device supports absolute X Y movements and has BTN_TOUCH + bool isMultitouch; // True if device supports multiple absolute movevents and has BTN_TOUCH + bool isKeyboard; // True if device has letter keycodes + bool isGamepad; // True if device has gamepad buttons +} InputEventWorker; static InputEventWorker eventWorkers[10]; // List of worker threads for every monitored "/dev/input/event<N>" |
