Skip to content

Commit

Permalink
(Dingux) Fix black screens when triggering gfx driver reinitialisatio…
Browse files Browse the repository at this point in the history
…n via menu actions (#12521)
  • Loading branch information
jdgleaver authored Jun 12, 2021
1 parent 3c2e3f1 commit d40d7c3
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions gfx/drivers/sdl_dingux_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ static bool sdl_dingux_gfx_frame(void *data, const void *frame,
{
sdl_dingux_video_t* vid = (sdl_dingux_video_t*)data;

if (unlikely(!vid || !frame))
if (unlikely(!vid))
return true;

/* If fast forward is currently active, we may
Expand Down Expand Up @@ -805,13 +805,16 @@ static bool sdl_dingux_gfx_frame(void *data, const void *frame,

if (likely(vid->mode_valid))
{
/* Blit frame to SDL surface */
if (vid->rgb32)
sdl_dingux_blit_frame32(vid, (uint32_t*)frame,
width, height, pitch);
else
sdl_dingux_blit_frame16(vid, (uint16_t*)frame,
width, height, pitch);
if (likely(frame))
{
/* Blit frame to SDL surface */
if (vid->rgb32)
sdl_dingux_blit_frame32(vid, (uint32_t*)frame,
width, height, pitch);
else
sdl_dingux_blit_frame16(vid, (uint16_t*)frame,
width, height, pitch);
}
}
/* If current display mode is invalid,
* just display an error message */
Expand Down

0 comments on commit d40d7c3

Please sign in to comment.