Use C99 bool internally in SDL

This commit is contained in:
Sam Lantinga
2024-08-22 09:21:26 -07:00
parent 6501e90018
commit 8f546bb3c9
450 changed files with 6046 additions and 6033 deletions

View File

@@ -276,7 +276,7 @@ static int RPI_WarpMouseGlobal(float x, float y)
}
// Update internal mouse position.
SDL_SendMouseMotion(0, mouse->focus, SDL_GLOBAL_MOUSE_ID, SDL_FALSE, x, y);
SDL_SendMouseMotion(0, mouse->focus, SDL_GLOBAL_MOUSE_ID, false, x, y);
return RPI_WarpMouseGlobalGraphically(x, y);
}

View File

@@ -183,7 +183,7 @@ static void AddDispManXDisplay(const int display_id)
display.internal = data;
SDL_AddVideoDisplay(&display, SDL_FALSE);
SDL_AddVideoDisplay(&display, false);
}
int RPI_VideoInit(SDL_VideoDevice *_this)
@@ -296,11 +296,11 @@ int RPI_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesI
}
// Start generating vsync callbacks if necessary
wdata->double_buffer = SDL_FALSE;
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_DOUBLE_BUFFER, SDL_FALSE)) {
wdata->double_buffer = false;
if (SDL_GetHintBoolean(SDL_HINT_VIDEO_DOUBLE_BUFFER, false)) {
wdata->vsync_cond = SDL_CreateCondition();
wdata->vsync_cond_mutex = SDL_CreateMutex();
wdata->double_buffer = SDL_TRUE;
wdata->double_buffer = true;
vc_dispmanx_vsync_callback(displaydata->dispman_display, RPI_vsync_callback, (void *)wdata);
}

View File

@@ -48,7 +48,7 @@ struct SDL_WindowData
// Vsync callback cond and mutex
SDL_Condition *vsync_cond;
SDL_Mutex *vsync_cond_mutex;
SDL_bool double_buffer;
bool double_buffer;
};
#define SDL_RPI_VIDEOLAYER 10000 // High enough so to occlude everything