summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneonloop2021-04-03 00:20:48 +0000
committerneonloop2021-04-03 00:20:48 +0000
commit2c82fe36314eb865e0bb3344347e86f98f22b8f8 (patch)
tree3e7c44019b1ee148b608d6ada7dcd44d04dd8b76
parentf3062732940cf086e1961aa95ac62adfb6f031f5 (diff)
downloadsnes9x2002-2c82fe36314eb865e0bb3344347e86f98f22b8f8.tar.gz
snes9x2002-2c82fe36314eb865e0bb3344347e86f98f22b8f8.tar.bz2
snes9x2002-2c82fe36314eb865e0bb3344347e86f98f22b8f8.zip
Fixes overscan alignment in 240p mode
-rw-r--r--shell/video/sdl/video_blit.c3
-rw-r--r--src/gfx16.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/shell/video/sdl/video_blit.c b/shell/video/sdl/video_blit.c
index bf790bb..1652a8b 100644
--- a/shell/video/sdl/video_blit.c
+++ b/shell/video/sdl/video_blit.c
@@ -108,7 +108,8 @@ void Update_Video_Ingame(int width, int height)
else upscale_256x240_to_320x240_bilinearish((uint32_t*) sdl_screen->pixels + (160*8), (uint32_t*) GFX.Screen, GFX_PITCH / 2, 224);
break;
case 4: // Overscan
- upscale_240x208_to_320x240((uint16_t*) sdl_screen->pixels, (uint16_t*) GFX.Screen);
+ if (height == 240) upscale_240x208_to_320x240((uint16_t*) sdl_screen->pixels, (uint16_t*) GFX.Screen + (GFX_PITCH * 4));
+ else upscale_240x208_to_320x240((uint16_t*) sdl_screen->pixels, (uint16_t*) GFX.Screen);
break;
}
//bitmap_scale(0, 0, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, sdl_screen->w, sdl_screen->h, SNES_WIDTH*2, 0, GFX.Screen, sdl_screen->pixels);
diff --git a/src/gfx16.c b/src/gfx16.c
index 02ece3c..3333cdf 100644
--- a/src/gfx16.c
+++ b/src/gfx16.c
@@ -2542,7 +2542,10 @@ void S9xDisplayFrameRate()
char string[16];
uint8 *Screen = GFX.Screen;
#ifdef TRIMUI
- if (option.fullscreen == 4) Screen += GFX_PITCH *8 +16; // for Overscan
+ if (option.fullscreen == 4) { // for Overscan
+ Screen += GFX_PITCH * 8 +16;
+ if (IPPU.RenderedScreenHeight == SNES_HEIGHT_EXTENDED) Screen += GFX_PITCH * 8;
+ }
#endif
sprintf(string, "%02d/%02d", IPPU.DisplayedRenderedFrameCount, (int)Memory.ROMFramesPerSecond);