mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 07:16:00 +00:00
Pointer as bool (libsdl-org#7214)
This commit is contained in:
@@ -231,7 +231,7 @@ static SDL_bool ReadInputSync(SDL_DriverWii_Context *ctx, EWiiInputReportIDs exp
|
||||
int nRead = 0;
|
||||
while ((nRead = ReadInput(ctx)) != -1) {
|
||||
if (nRead > 0) {
|
||||
if (ctx->m_rgucReadBuffer[0] == expectedID && (isMine == NULL || isMine(ctx->m_rgucReadBuffer))) {
|
||||
if (ctx->m_rgucReadBuffer[0] == expectedID && (!isMine || isMine(ctx->m_rgucReadBuffer))) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
} else {
|
||||
@@ -725,7 +725,7 @@ static SDL_bool HIDAPI_DriverWii_InitDevice(SDL_HIDAPI_Device *device)
|
||||
SDL_DriverWii_Context *ctx;
|
||||
|
||||
ctx = (SDL_DriverWii_Context *)SDL_calloc(1, sizeof(*ctx));
|
||||
if (ctx == NULL) {
|
||||
if (!ctx) {
|
||||
SDL_OutOfMemory();
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user