Parcourir la source

SDL_render_vita_gxm.c: Fixed the black screen due to zero cliprect

Wohlstand il y a 3 semaines
Parent
commit
87a81bd09d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/render/vitagxm/SDL_render_vita_gxm.c

+ 1 - 1
src/render/vitagxm/SDL_render_vita_gxm.c

@@ -1049,7 +1049,7 @@ static bool VITA_GXM_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *
                 }
             }
 
-            if (SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) {
+            if ((data->drawstate.cliprect_enabled || !data->drawstate.viewport_is_set) && SDL_memcmp(&data->drawstate.cliprect, rect, sizeof(*rect)) != 0) {
                 SDL_copyp(&data->drawstate.cliprect, rect);
                 data->drawstate.cliprect_dirty = true;
             }