Rewritten renderer blitting, fixes flickering when inversion or grayscale is used.

This commit is contained in:
OBattler
2021-10-06 02:26:30 +02:00
parent 7fc111584d
commit 46807540ed
8 changed files with 76 additions and 61 deletions

View File

@@ -133,7 +133,10 @@ sdl_blit_shim(int x, int y, int w, int h)
params.y = y;
params.w = w;
params.h = h;
if (!(!sdl_enabled || (x < 0) || (y < 0) || (w <= 0) || (h <= 0) || (w > 2048) || (h > 2048) || (buffer32 == NULL) || (sdl_render == NULL) || (sdl_tex == NULL))) memcpy(interpixels, &(buffer32->line[y][x]), h * (2048 + 64) * sizeof(uint32_t));
if (!(!sdl_enabled || (x < 0) || (y < 0) || (w <= 0) || (h <= 0) || (w > 2048) || (h > 2048) || (buffer32 == NULL) || (sdl_render == NULL) || (sdl_tex == NULL)))
video_copy(interpixels, &(buffer32->line[y][x]), h * (2048 + 64) * sizeof(uint32_t));
if (screenshots)
video_screenshot(interpixels, 0, 0, (2048 + 64));
blitreq = 1;
video_blit_complete();
}