mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-15 22:35:59 +00:00
[SDL2] pointer boolean (#8523)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user