Removed SDL_bool in favor of plain bool
We require stdbool.h in the build environment, so we might as well use the plain bool type. If your environment doesn't have stdbool.h, this simple replacement will suffice: typedef signed char bool;
This commit is contained in:
@@ -21,7 +21,7 @@ static SDLTest_CommonState *state = NULL;
|
||||
static SDL_Camera *camera = NULL;
|
||||
static SDL_CameraSpec spec;
|
||||
static SDL_Texture *texture = NULL;
|
||||
static SDL_bool texture_updated = SDL_FALSE;
|
||||
static bool texture_updated = false;
|
||||
static SDL_Surface *frame_current = NULL;
|
||||
static SDL_CameraID front_camera = 0;
|
||||
static SDL_CameraID back_camera = 0;
|
||||
@@ -302,7 +302,7 @@ SDL_AppResult SDL_AppIterate(void *appstate)
|
||||
* But in case of 0-copy, it's needed to have the frame while using the texture.
|
||||
*/
|
||||
frame_current = frame_next;
|
||||
texture_updated = SDL_FALSE;
|
||||
texture_updated = false;
|
||||
}
|
||||
|
||||
if (frame_current) {
|
||||
@@ -336,7 +336,7 @@ SDL_AppResult SDL_AppIterate(void *appstate)
|
||||
/* Update SDL_Texture with last video frame (only once per new frame) */
|
||||
if (frame_current && !texture_updated) {
|
||||
SDL_UpdateTexture(texture, NULL, frame_current->pixels, frame_current->pitch);
|
||||
texture_updated = SDL_TRUE;
|
||||
texture_updated = true;
|
||||
}
|
||||
|
||||
SDL_GetTextureSize(texture, &tw, &th);
|
||||
|
||||
Reference in New Issue
Block a user