mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-10 13:28:15 +00:00
[SDL2] pointer boolean (#8523)
This commit is contained in:
@@ -108,7 +108,7 @@ initializeTexture(SDL_Renderer *renderer)
|
||||
SDL_Surface *bmp_surface;
|
||||
/* load the bmp */
|
||||
bmp_surface = SDL_LoadBMP("icon.bmp");
|
||||
if (bmp_surface == NULL) {
|
||||
if (!bmp_surface) {
|
||||
fatalError("could not load bmp");
|
||||
}
|
||||
/* set white to transparent on the happyface */
|
||||
@@ -117,7 +117,7 @@ initializeTexture(SDL_Renderer *renderer)
|
||||
|
||||
/* convert RGBA surface to texture */
|
||||
texture = SDL_CreateTextureFromSurface(renderer, bmp_surface);
|
||||
if (texture == NULL) {
|
||||
if (!texture) {
|
||||
fatalError("could not create texture");
|
||||
}
|
||||
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
||||
|
Reference in New Issue
Block a user