qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ui/sdl2: Support multiple OpenGL-enabled windows
@ 2023-06-07  9:12 Antonio Caggiano
  2023-06-07 10:29 ` Marc-André Lureau
  0 siblings, 1 reply; 4+ messages in thread
From: Antonio Caggiano @ 2023-06-07  9:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Marc-André Lureau

Multiple graphics devices can be defined with an associated OpenGL
enabled SDL console, hence make sure to not destroy their shaders and
windows.

Signed-off-by: Antonio Caggiano <quic_acaggian@quicinc.com>
---
 ui/sdl2-gl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c
index bbfa70eac3..795fb1afc9 100644
--- a/ui/sdl2-gl.c
+++ b/ui/sdl2-gl.c
@@ -89,7 +89,7 @@ void sdl2_gl_switch(DisplayChangeListener *dcl,
 
     scon->surface = new_surface;
 
-    if (is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) {
+    if (is_placeholder(new_surface) && !scon->opengl) {
         qemu_gl_fini_shader(scon->gls);
         scon->gls = NULL;
         sdl2_window_destroy(scon);
-- 
2.40.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-08 13:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-07  9:12 [PATCH] ui/sdl2: Support multiple OpenGL-enabled windows Antonio Caggiano
2023-06-07 10:29 ` Marc-André Lureau
2023-06-07 11:24   ` Akihiko Odaki
2023-06-08 12:59     ` Antonio Caggiano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).