Examples: SDL3: Update for API changes: SDL_Init() returns 0 on failure.
This commit is contained in:
parent
6a7319543c
commit
4832027eb6
@ -2,7 +2,7 @@
|
|||||||
// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
|
// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
|
||||||
// (Info: SDL3 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.)
|
// (Info: SDL3 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.)
|
||||||
|
|
||||||
// (**IMPORTANT: SDL 3.0.0 is NOT YET RELEASED AND CURRENTLY HAS A FAST CHANGING API. THIS CODE BREAKS OFTEN**)
|
// (**IMPORTANT: SDL 3.0.0 is NOT YET RELEASED AND CURRENTLY HAS A FAST CHANGING API. THIS CODE BREAKS OFTEN AS SDL3 CHANGES.**)
|
||||||
|
|
||||||
// Implemented features:
|
// Implemented features:
|
||||||
// [X] Platform: Clipboard support.
|
// [X] Platform: Clipboard support.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
|
// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
|
||||||
// (Info: SDL3 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.)
|
// (Info: SDL3 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.)
|
||||||
|
|
||||||
// (**IMPORTANT: SDL 3.0.0 is NOT YET RELEASED AND CURRENTLY HAS A FAST CHANGING API. THIS CODE BREAKS OFTEN**)
|
// (**IMPORTANT: SDL 3.0.0 is NOT YET RELEASED AND CURRENTLY HAS A FAST CHANGING API. THIS CODE BREAKS OFTEN AS SDL3 CHANGES.**)
|
||||||
|
|
||||||
// Implemented features:
|
// Implemented features:
|
||||||
// [X] Platform: Clipboard support.
|
// [X] Platform: Clipboard support.
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
// dear imgui: Renderer Backend for SDL_Renderer for SDL3
|
// dear imgui: Renderer Backend for SDL_Renderer for SDL3
|
||||||
// (Requires: SDL 3.0.0+)
|
// (Requires: SDL 3.0.0+)
|
||||||
|
|
||||||
|
// (**IMPORTANT: SDL 3.0.0 is NOT YET RELEASED AND CURRENTLY HAS A FAST CHANGING API. THIS CODE BREAKS OFTEN AS SDL3 CHANGES.**)
|
||||||
|
|
||||||
// Note how SDL_Renderer is an _optional_ component of SDL3.
|
// Note how SDL_Renderer is an _optional_ component of SDL3.
|
||||||
// For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX.
|
// For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX.
|
||||||
// If your application will want to render any non trivial amount of graphics other than UI,
|
// If your application will want to render any non trivial amount of graphics other than UI,
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
// dear imgui: Renderer Backend for SDL_Renderer for SDL3
|
// dear imgui: Renderer Backend for SDL_Renderer for SDL3
|
||||||
// (Requires: SDL 3.0.0+)
|
// (Requires: SDL 3.0.0+)
|
||||||
|
|
||||||
|
// (**IMPORTANT: SDL 3.0.0 is NOT YET RELEASED AND CURRENTLY HAS A FAST CHANGING API. THIS CODE BREAKS OFTEN AS SDL3 CHANGES.**)
|
||||||
|
|
||||||
// Note how SDL_Renderer is an _optional_ component of SDL3.
|
// Note how SDL_Renderer is an _optional_ component of SDL3.
|
||||||
// For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX.
|
// For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX.
|
||||||
// If your application will want to render any non trivial amount of graphics other than UI,
|
// If your application will want to render any non trivial amount of graphics other than UI,
|
||||||
|
@ -92,18 +92,21 @@ Other changes:
|
|||||||
a drag and drop source or target: a SetNextWindowPos() call won't be overriden. (#6973)
|
a drag and drop source or target: a SetNextWindowPos() call won't be overriden. (#6973)
|
||||||
- Style: added PushStyleVarX(), PushStyleVarY() helpers to modify only one component of a ImVec2 var.
|
- Style: added PushStyleVarX(), PushStyleVarY() helpers to modify only one component of a ImVec2 var.
|
||||||
- Fonts: made it possible to use PushFont()/PopFont() calls accross Begin() calls. (#3224, #3875, #6398, #7903)
|
- Fonts: made it possible to use PushFont()/PopFont() calls accross Begin() calls. (#3224, #3875, #6398, #7903)
|
||||||
- Backends: GLFW: added ImGui_ImplGlfw_Sleep() helper function because GLFW does not
|
- Backends:
|
||||||
provide a way to do a portable sleep. (#7844)
|
- Backends: GLFW: added ImGui_ImplGlfw_Sleep() helper function because GLFW does not
|
||||||
- Backends: SDL2, SDL3: ignore events of other SDL windows. (#7853) [@madebr, @ocornut]
|
provide a way to do a portable sleep. (#7844)
|
||||||
- Backends: SDL2, SDL3: storing SDL_WindowID inside ImGuiViewport::PlatformHandle instead of SDL_Window*.
|
- Backends: SDL2, SDL3: ignore events of other SDL windows. (#7853) [@madebr, @ocornut]
|
||||||
- Backends: SDL3: Update for API changes: SDL_GetGamepads() memory ownership logic was reverted back
|
- Backends: SDL2, SDL3: storing SDL_WindowID inside ImGuiViewport::PlatformHandle instead of SDL_Window*.
|
||||||
by SDL3 on July 27. (#7918, #7898, #7807) [@cheyao, @MattGuerrette]
|
- Backends: SDL3: Update for API changes: SDL_GetGamepads() memory ownership logic was reverted back
|
||||||
- Backends: GLFW: passing null window to glfwGetClipboardString()/glfwSetClipboardString()
|
by SDL3 on July 27. (#7918, #7898, #7807) [@cheyao, @MattGuerrette]
|
||||||
since GLFW own tests are doing that and it seems unnecessary.
|
- Backends: GLFW: passing null window to glfwGetClipboardString()/glfwSetClipboardString()
|
||||||
- Backends: SDL2, SDL3, GLFW, OSX, Allegro: update to set function handlers in ImGuiPlatformIO
|
since GLFW own tests are doing that and it seems unnecessary.
|
||||||
instead of ImGuiIO.
|
- Backends: SDL2, SDL3, GLFW, OSX, Allegro: update to set function handlers in ImGuiPlatformIO
|
||||||
- Examples: GLFW (all), SDL2 (all), SDL3 (all), Win32+OpenGL3: rework examples main loop
|
instead of ImGuiIO.
|
||||||
to handle minimization without burning CPU or GPU by running unthrottled code. (#7844)
|
- Examples:
|
||||||
|
- Examples: GLFW (all), SDL2 (all), SDL3 (all), Win32+OpenGL3: rework examples main loop
|
||||||
|
to handle minimization without burning CPU or GPU by running unthrottled code. (#7844)
|
||||||
|
- Examples: SDL3: Update for API changes: SDL_Init() returns 0 on failure.
|
||||||
|
|
||||||
Backends: SDL3: following SDL3 reverting their change, result of SDL_GetGamepads must be freed. (#7918, #7898)
|
Backends: SDL3: following SDL3 reverting their change, result of SDL_GetGamepads must be freed. (#7918, #7898)
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
// Setup SDL
|
// Setup SDL
|
||||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0)
|
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD))
|
||||||
{
|
{
|
||||||
printf("Error: SDL_Init(): %s\n", SDL_GetError());
|
printf("Error: SDL_Init(): %s\n", SDL_GetError());
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
// Setup SDL
|
// Setup SDL
|
||||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0)
|
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD))
|
||||||
{
|
{
|
||||||
printf("Error: SDL_Init(): %s\n", SDL_GetError());
|
printf("Error: SDL_Init(): %s\n", SDL_GetError());
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user