Examples: SDL3: updates for latest SDL3 API changes.

features/potocpav-newer-lines-2
ocornut ago%!(EXTRA string=12 months)
parent e45efa9951
commit 93daf23223
  1. 8
      backends/imgui_impl_sdl3.cpp
  2. 2
      docs/CHANGELOG.txt
  3. 3
      examples/example_sdl3_sdlrenderer3/main.cpp

@ -60,6 +60,14 @@
#define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE 0 #define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE 0
#endif #endif
// FIXME-LEGACY: remove when SDL 3.1.3 preview is released.
#ifndef SDLK_APOSTROPHE
#define SDLK_APOSTROPHE SDLK_QUOTE
#endif
#ifndef SDLK_GRAVE
#define SDLK_GRAVE SDLK_BACKQUOTE
#endif
// SDL Data // SDL Data
struct ImGui_ImplSDL3_Data struct ImGui_ImplSDL3_Data
{ {

@ -56,7 +56,7 @@ Other changes:
- Backends: Win32: undo an assert introduced in 1.90.6 which didn't allow WndProc - Backends: Win32: undo an assert introduced in 1.90.6 which didn't allow WndProc
handler to be called before backend initialization. Because of how ::CreateWindow() handler to be called before backend initialization. Because of how ::CreateWindow()
calls in WndProc this is facilitating. (#6275) [@MennoVink] calls in WndProc this is facilitating. (#6275) [@MennoVink]
- Backends: SDL3: minor updates for latest SDL3 API changes. (#7580) [@kuvaus] - Backends, Examples: SDL3: updates for latest SDL3 API changes. (#7580) [@kuvaus, @ocornut]
----------------------------------------------------------------------- -----------------------------------------------------------------------

@ -42,7 +42,8 @@ int main(int, char**)
printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
return -1; return -1;
} }
SDL_Renderer* renderer = SDL_CreateRenderer(window, nullptr, SDL_RENDERER_PRESENTVSYNC); SDL_Renderer* renderer = SDL_CreateRenderer(window, nullptr);
SDL_SetRenderVSync(renderer, 1);
if (renderer == nullptr) if (renderer == nullptr)
{ {
SDL_Log("Error: SDL_CreateRenderer(): %s\n", SDL_GetError()); SDL_Log("Error: SDL_CreateRenderer(): %s\n", SDL_GetError());

Loading…
Cancel
Save