More streaming code
This commit is contained in:
parent
4fe6c24702
commit
cded01187d
4 changed files with 123 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue