From ce8f66bc071f153e2a55d696a0cafa6f2b5787f6 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 17 Dec 2021 03:30:13 +0100 Subject: [PATCH] Reduced the texture size back 2048x2048. --- src/unix/unix_sdl.c | 6 +++--- src/video/video.c | 2 +- src/win/win_sdl.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/unix/unix_sdl.c b/src/unix/unix_sdl.c index 4c309144f..356305d1c 100644 --- a/src/unix/unix_sdl.c +++ b/src/unix/unix_sdl.c @@ -134,9 +134,9 @@ sdl_blit_shim(int x, int y, int w, int h) 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))) - video_copy(interpixels, &(buffer32->line[y][x]), h * (2048 + 64) * sizeof(uint32_t)); + video_copy(interpixels, &(buffer32->line[y][x]), h * 2048 * sizeof(uint32_t)); if (screenshots) - video_screenshot(interpixels, 0, 0, (2048 + 64)); + video_screenshot(interpixels, 0, 0, 2048); blitreq = 1; video_blit_complete(); } @@ -198,7 +198,7 @@ sdl_blit(int x, int y, int w, int h) r_src.y = y; r_src.w = w; r_src.h = h; - SDL_UpdateTexture(sdl_tex, &r_src, interpixels, (2048 + 64) * 4); + SDL_UpdateTexture(sdl_tex, &r_src, interpixels, 2048 * 4); blitreq = 0; sdl_real_blit(&r_src); diff --git a/src/video/video.c b/src/video/video.c index 5118b886f..e3ff2200c 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -831,7 +831,7 @@ video_init(void) } /* Account for overscan. */ - buffer32 = create_bitmap(2048 + 64, 2048 + 64); + buffer32 = create_bitmap(2048, 2048); for (c = 0; c < 64; c++) { cgapal[c + 64].r = (((c & 4) ? 2 : 0) | ((c & 0x10) ? 1 : 0)) * 21; diff --git a/src/win/win_sdl.c b/src/win/win_sdl.c index af876540d..3a898f43c 100644 --- a/src/win/win_sdl.c +++ b/src/win/win_sdl.c @@ -244,10 +244,10 @@ sdl_blit(int x, int y, int w, int h) SDL_LockTexture(sdl_tex, 0, &pixeldata, &pitch); - video_copy(pixeldata, &(buffer32->line[y][x]), h * (2048 + 64) * sizeof(uint32_t)); + video_copy(pixeldata, &(buffer32->line[y][x]), h * 2048 * sizeof(uint32_t)); if (screenshots) - video_screenshot((uint32_t *) pixeldata, 0, 0, (2048 + 64)); + video_screenshot((uint32_t *) pixeldata, 0, 0, 2048); SDL_UnlockTexture(sdl_tex); @@ -358,7 +358,7 @@ sdl_init_texture(void) sdl_render = SDL_CreateRenderer(sdl_win, -1, SDL_RENDERER_SOFTWARE); sdl_tex = SDL_CreateTexture(sdl_render, SDL_PIXELFORMAT_ARGB8888, - SDL_TEXTUREACCESS_STREAMING, (2048 + 64), (2048 + 64)); + SDL_TEXTUREACCESS_STREAMING, 2048, 2048); }