[SDL2] pointer boolean (#8523)

This commit is contained in:
Sylvain Becker
2023-11-10 15:30:56 +01:00
committed by GitHub
parent 4a3a9f3ad8
commit a14b948b6c
394 changed files with 2564 additions and 2559 deletions

View File

@@ -89,7 +89,7 @@ static SDL_Cursor *Android_CreateCursor(SDL_Surface *surface, int hot_x, int hot
SDL_Surface *converted;
converted = SDL_ConvertSurfaceFormat(surface, SDL_PIXELFORMAT_ARGB8888, 0);
if (converted == NULL) {
if (!converted) {
return NULL;
}
custom_cursor = Android_JNI_CreateCustomCursor(converted, hot_x, hot_y);
@@ -118,7 +118,7 @@ static void Android_FreeCursor(SDL_Cursor *cursor)
static SDL_Cursor *Android_CreateEmptyCursor()
{
if (empty_cursor == NULL) {
if (!empty_cursor) {
SDL_Surface *empty_surface = SDL_CreateRGBSurfaceWithFormat(0, 1, 1, 32, SDL_PIXELFORMAT_ARGB8888);
if (empty_surface) {
SDL_memset(empty_surface->pixels, 0, (size_t)empty_surface->h * empty_surface->pitch);
@@ -139,7 +139,7 @@ static void Android_DestroyEmptyCursor()
static int Android_ShowCursor(SDL_Cursor *cursor)
{
if (cursor == NULL) {
if (!cursor) {
cursor = Android_CreateEmptyCursor();
}
if (cursor) {
@@ -216,7 +216,7 @@ void Android_OnMouse(SDL_Window *window, int state, int action, float x, float y
int changes;
Uint8 button;
if (window == NULL) {
if (!window) {
return;
}