Skip to content

Commit c54e9d4

Browse files
committed
vdisp/sdl3: fixed running with size=
When pixel format changes - which is almost always if CS doesn't match the splashscreen and some conversion is needed, the cs_data member needs to be updated to contain curremt conversion data).
1 parent 1fb1fbe commit c54e9d4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/video_display/sdl3.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
* 3. p010 works just on macOS/Metal, crashes on Vulkan (see previous point)
5151
* 4. p010 corrupted on d3d[12] - pixfmts skipped in query*() as a workaround
5252
* 5. see todo in @ref ../audio/capture/sdl_mixer.c
53-
* 6. size= option doesn't seem to work with YCbCr formats
5453
*/
5554

5655
#include <SDL3/SDL.h>
@@ -775,10 +774,7 @@ display_sdl3_reconfigure_real(void *state, struct video_desc desc)
775774
MSG(NOTICE, "Reconfigure to size %dx%d\n", desc.width, desc.height);
776775

777776
if (s->fixed_size && s->window) {
778-
SDL_SetRenderLogicalPresentation(
779-
s->renderer, desc.width, desc.height,
780-
SDL_LOGICAL_PRESENTATION_LETTERBOX);
781-
return recreate_textures(s, desc);
777+
goto skip_window_creation;
782778
}
783779

784780
if (s->window) {
@@ -841,6 +837,7 @@ display_sdl3_reconfigure_real(void *state, struct video_desc desc)
841837
vulkan_warn(s->req_renderers_name, renderer_name);
842838
}
843839
query_renderer_supported_fmts(s->renderer, s->supp_fmts, is_d3d);
840+
skip_window_creation:
844841
s->cs_data = get_ug_to_sdl_format(s->supp_fmts, desc.color_spec);
845842
if (s->cs_data == NULL) {
846843
return false;

0 commit comments

Comments
 (0)