#include "JoystickSDL.h"#include <array>#include <QtCore/QMetaObject>#include <QtCore/QMutex>#include <QtCore/QThread>#include "JoystickManager.h"#include "QGCLoggingCategory.h"#include "SDLJoystick.h"#include <SDL3/SDL.h>Go to the source code of this file.
Functions | |
| static bool | sdlEventWatcher (void *userdata, SDL_Event *event) |
| SDL event watcher - uses Qt::QueuedConnection for thread safety. | |
Variables | |
| static QMap< QString, Joystick * > | s_discoveryCache |
| static QMutex | s_discoveryCacheMutex |
|
static |
SDL event watcher - uses Qt::QueuedConnection for thread safety.
Definition at line 30 of file JoystickSDL.cc.
References JoystickManager::instance(), and sdlEventWatcher().
Referenced by JoystickSDL::init(), sdlEventWatcher(), and JoystickSDL::shutdown().
|
static |
Discovery cache - the last discover()'s joysticks. Only the main thread changes it; shutdown() empties it. The mutex guards the map alone, for the copy discover() returns off the main thread. Lock order: the SDL joystick lock, if held, comes first, and nothing that can block or re-enter runs under the mutex (only a copy, swap or assignment of the map).
Definition at line 26 of file JoystickSDL.cc.
Referenced by JoystickSDL::discover(), and JoystickSDL::shutdown().
|
static |
Definition at line 27 of file JoystickSDL.cc.
Referenced by JoystickSDL::discover(), and JoystickSDL::shutdown().