mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-23 23:31:08 +01:00
Backends: SDL3: Update for API changes: SDL_bool removal. SDL_INIT_TIMER removal. (#7999)
This commit is contained in:
parent
faca859043
commit
0af2c4ef76
@ -564,7 +564,7 @@ static void ImGui_ImplSDL3_UpdateMouseData()
|
||||
// We forward mouse input when hovered or captured (via SDL_EVENT_MOUSE_MOTION) or when focused (below)
|
||||
#if SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE
|
||||
// SDL_CaptureMouse() let the OS know e.g. that our imgui drag outside the SDL window boundaries shouldn't e.g. trigger other operations outside
|
||||
SDL_CaptureMouse((bd->MouseButtonsDown != 0) ? SDL_TRUE : SDL_FALSE);
|
||||
SDL_CaptureMouse(bd->MouseButtonsDown != 0);
|
||||
SDL_Window* focused_window = SDL_GetKeyboardFocus();
|
||||
const bool is_app_focused = (bd->Window == focused_window);
|
||||
#else
|
||||
|
@ -158,8 +158,8 @@ void ImGui_ImplSDLRenderer3_RenderDrawData(ImDrawData* draw_data, SDL_Renderer*
|
||||
SDL_Rect ClipRect;
|
||||
};
|
||||
BackupSDLRendererState old = {};
|
||||
old.ViewportEnabled = SDL_RenderViewportSet(renderer) == SDL_TRUE;
|
||||
old.ClipEnabled = SDL_RenderClipEnabled(renderer) == SDL_TRUE;
|
||||
old.ViewportEnabled = SDL_RenderViewportSet(renderer);
|
||||
old.ClipEnabled = SDL_RenderClipEnabled(renderer);
|
||||
SDL_GetRenderViewport(renderer, &old.Viewport);
|
||||
SDL_GetRenderClipRect(renderer, &old.ClipRect);
|
||||
|
||||
|
@ -43,6 +43,8 @@ Breaking changes:
|
||||
|
||||
Other changes:
|
||||
|
||||
- Backends: SDL3: Update for API changes: SDL_bool removal. SDL_INIT_TIMER removal.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.91.2 (Released 2024-09-19)
|
||||
|
@ -27,7 +27,7 @@
|
||||
int main(int, char**)
|
||||
{
|
||||
// Setup SDL
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD))
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD))
|
||||
{
|
||||
printf("Error: SDL_Init(): %s\n", SDL_GetError());
|
||||
return -1;
|
||||
|
@ -25,7 +25,7 @@
|
||||
int main(int, char**)
|
||||
{
|
||||
// Setup SDL
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD))
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMEPAD))
|
||||
{
|
||||
printf("Error: SDL_Init(): %s\n", SDL_GetError());
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user