More streaming code

This commit is contained in:
Cameron Gutman
2018-06-24 00:14:23 -07:00
parent 4fe6c24702
commit cded01187d
4 changed files with 123 additions and 0 deletions
+16
View File
@@ -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;
+1
View File
@@ -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);