mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-15 21:22:40 +00:00
More streaming code
This commit is contained in:
@@ -474,6 +474,22 @@ void SdlHandleControllerDeviceEvent(SDL_ControllerDeviceEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
int SdlGetAttachedGamepadMask(void)
|
||||
{
|
||||
int i;
|
||||
int count;
|
||||
int mask;
|
||||
|
||||
count = mask = 0;
|
||||
for (i = 0; i < SDL_NumJoysticks(); i++) {
|
||||
if (SDL_IsGameController(i)) {
|
||||
mask |= (1 << count++);
|
||||
}
|
||||
}
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
void SdlInitializeGamepad(bool multiController)
|
||||
{
|
||||
g_MultiController = multiController;
|
||||
|
||||
@@ -14,6 +14,7 @@ extern DECODER_RENDERER_CALLBACKS k_VideoCallbacks;
|
||||
int SdlDetermineAudioConfiguration(void);
|
||||
|
||||
void SdlInitializeGamepad(bool multiController);
|
||||
int SdlGetAttachedGamepadMask(void);
|
||||
void SdlHandleControllerDeviceEvent(SDL_ControllerDeviceEvent* event);
|
||||
void SdlHandleControllerButtonEvent(SDL_ControllerButtonEvent* event);
|
||||
void SdlHandleControllerAxisEvent(SDL_ControllerAxisEvent* event);
|
||||
|
||||
Reference in New Issue
Block a user