You've apparently added it to console-gl.c ... your original description was about sdl2-2d.c, so please add the code there. In console-gl.c, you could use this statement instead:
printf("gl Surface format is: %x\n", surface->format); -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1568356 Title: ERROR:ui/sdl2-2d.c:120:sdl2_2d_switch: Status in QEMU: New Bug description: when display sdl is selected in display switch resolution qemu exit with a core dump with this message ERROR:ui/sdl2-2d.c:120:sdl2_2d_switch: code should not be reached My Machine is a Cyrus+ PowerPc P5020 4gb ram Radeon 6570 2Gb This issue affected PowerMac G5 quad too . My distro is Mate 16.04 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1568356/+subscriptions