Examples: Fixed SDL+OpenGL2 and SDL+Vulkan examples not processing SDL_WINDOWEVENT_CLOSE events which tends to be needed in multi-viewport setting.
This commit is contained in:
parent
b25756be4a
commit
6461fd40ab
@ -87,6 +87,8 @@ int main(int, char**)
|
|||||||
ImGui_ImplSDL2_ProcessEvent(&event);
|
ImGui_ImplSDL2_ProcessEvent(&event);
|
||||||
if (event.type == SDL_QUIT)
|
if (event.type == SDL_QUIT)
|
||||||
done = true;
|
done = true;
|
||||||
|
if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
|
||||||
|
done = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start the Dear ImGui frame
|
// Start the Dear ImGui frame
|
||||||
|
@ -454,6 +454,8 @@ int main(int, char**)
|
|||||||
ImGui_ImplSDL2_ProcessEvent(&event);
|
ImGui_ImplSDL2_ProcessEvent(&event);
|
||||||
if (event.type == SDL_QUIT)
|
if (event.type == SDL_QUIT)
|
||||||
done = true;
|
done = true;
|
||||||
|
if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
|
||||||
|
done = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resize swap chain?
|
// Resize swap chain?
|
||||||
|
Loading…
Reference in New Issue
Block a user