Merge SDL-ryan-batching-renderer branch to default.
--HG-- extra : rebase_source : 83b86d35497a01be6f48055490580bbba19ccc7a extra : amend_source : faae1a04859499ede43aba3ba50fc4f62b5afbcb
This commit is contained in:
commit
9f99a9c642
38 changed files with 6953 additions and 5554 deletions
|
@ -202,13 +202,14 @@ static void UpdateEventsForDeviceRemoval()
|
|||
{
|
||||
int i, num_events;
|
||||
SDL_Event *events;
|
||||
SDL_bool isstack;
|
||||
|
||||
num_events = SDL_PeepEvents(NULL, 0, SDL_PEEKEVENT, SDL_CONTROLLERDEVICEADDED, SDL_CONTROLLERDEVICEADDED);
|
||||
if (num_events <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
events = SDL_stack_alloc(SDL_Event, num_events);
|
||||
events = SDL_small_alloc(SDL_Event, num_events, &isstack);
|
||||
if (!events) {
|
||||
return;
|
||||
}
|
||||
|
@ -219,7 +220,7 @@ static void UpdateEventsForDeviceRemoval()
|
|||
}
|
||||
SDL_PeepEvents(events, num_events, SDL_ADDEVENT, 0, 0);
|
||||
|
||||
SDL_stack_free(events);
|
||||
SDL_small_free(events, isstack);
|
||||
}
|
||||
|
||||
static SDL_bool HasSameOutput(SDL_ExtendedGameControllerBind *a, SDL_ExtendedGameControllerBind *b)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue