Fixed the problem of infinite screenshots being taken with the Win32 GUI.

This commit is contained in:
OBattler
2022-07-12 05:45:50 +02:00
parent 5a787bcd8c
commit 30479fc3b9
4 changed files with 5 additions and 5 deletions

View File

@@ -315,7 +315,7 @@ sdl_blit(int x, int y, int w, int h)
video_copy(pixeldata, &(buffer32->line[y][x]), h * (2048) * sizeof(uint32_t));
if (screenshots)
if (monitors[m_monitor_index].mon_screenshots)
video_screenshot((uint32_t *) pixeldata, 0, 0, (2048));
SDL_UnlockTexture(sdl_tex);

View File

@@ -1271,7 +1271,7 @@ void
take_screenshot(void)
{
startblit();
screenshots++;
monitors[0].mon_screenshots++;
endblit();
device_force_redraw();
}

View File

@@ -885,7 +885,7 @@ static void opengl_blit(int x, int y, int w, int h, int monitor_index)
for (row = 0; row < h; ++row)
video_copy(&(((uint8_t *) blit_info[write_pos].buffer)[row * ROW_LENGTH * sizeof(uint32_t)]), &(buffer32->line[y + row][x]), w * sizeof(uint32_t));
if (screenshots)
if (monitors[0].mon_screenshots)
video_screenshot(blit_info[write_pos].buffer, 0, 0, ROW_LENGTH);
video_blit_complete();

View File

@@ -247,7 +247,7 @@ sdl_blit(int x, int y, int w, int h, int monitor_index)
r_src.h = h;
SDL_UpdateTexture(sdl_tex, &r_src, &(buffer32->line[y][x]), 2048 * sizeof(uint32_t));
if (screenshots)
if (monitors[0].mon_screenshots)
video_screenshot((uint32_t *) buffer32->dat, x, y, 2048);
video_blit_complete();
@@ -288,7 +288,7 @@ sdl_blit_ex(int x, int y, int w, int h, int monitor_index)
for (row = 0; row < h; ++row)
video_copy(&(((uint8_t *) pixeldata)[row * 2048 * sizeof(uint32_t)]), &(buffer32->line[y + row][x]), w * sizeof(uint32_t));
if (screenshots)
if (monitors[0].mon_screenshots)
video_screenshot((uint32_t *) pixeldata, 0, 0, 2048);
SDL_UnlockTexture(sdl_tex);