mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 00:46:25 +00:00
Pointer as bool (libsdl-org#7214)
This commit is contained in:
@@ -373,7 +373,7 @@ static SDL_bool HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device)
|
||||
SDL_JoystickType joystick_type = SDL_JOYSTICK_TYPE_GAMEPAD;
|
||||
|
||||
ctx = (SDL_DriverPS5_Context *)SDL_calloc(1, sizeof(*ctx));
|
||||
if (ctx == NULL) {
|
||||
if (!ctx) {
|
||||
SDL_OutOfMemory();
|
||||
return SDL_FALSE;
|
||||
}
|
||||
@@ -1476,7 +1476,7 @@ static SDL_bool HIDAPI_DriverPS5_UpdateDevice(SDL_HIDAPI_Device *device)
|
||||
++packet_count;
|
||||
ctx->last_packet = now;
|
||||
|
||||
if (joystick == NULL) {
|
||||
if (!joystick) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user