From 2c41876dd9913c2a49cd044a805df54915b95f0f Mon Sep 17 00:00:00 2001 From: gameblabla Date: Sat, 26 Dec 2020 08:53:03 +0100 Subject: Fix issue wit pitch being doubled by 2. Change all of the code accordingly and simplify it. This was made as to allocate less memory than needed, improve the speed of the scaler code and make it more suitable for IPU mode. --- shell/video/retrostone/video_blit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'shell/video/retrostone') diff --git a/shell/video/retrostone/video_blit.c b/shell/video/retrostone/video_blit.c index 7dcdce1..fd189cc 100644 --- a/shell/video/retrostone/video_blit.c +++ b/shell/video/retrostone/video_blit.c @@ -78,6 +78,7 @@ void Video_Close() void Update_Video_Menu() { + SDL_SoftStretch(backbuffer, NULL, sdl_screen, NULL); SDL_Flip(sdl_screen); } @@ -92,11 +93,11 @@ void Update_Video_Ingame() switch(option.fullscreen) { case 0: - bitmap_scale(0,0,IPPU.RenderedScreenWidth,IPPU.RenderedScreenHeight,IPPU.RenderedScreenWidth*2,sdl_screen->h, SNES_WIDTH*2, sdl_screen->w - (IPPU.RenderedScreenWidth*2),(uint16_t* restrict)GFX.Screen,(uint16_t* restrict)sdl_screen->pixels+(HOST_WIDTH_RESOLUTION-(IPPU.RenderedScreenWidth*2))/2+(HOST_HEIGHT_RESOLUTION-((HOST_HEIGHT_RESOLUTION)))/2*HOST_WIDTH_RESOLUTION); + bitmap_scale(0,0,IPPU.RenderedScreenWidth,IPPU.RenderedScreenHeight,IPPU.RenderedScreenWidth*2,sdl_screen->h, SNES_WIDTH, sdl_screen->w - (IPPU.RenderedScreenWidth*2),(uint16_t* restrict)GFX.Screen,(uint16_t* restrict)sdl_screen->pixels+(HOST_WIDTH_RESOLUTION-(IPPU.RenderedScreenWidth*2))/2+(HOST_HEIGHT_RESOLUTION-((HOST_HEIGHT_RESOLUTION)))/2*HOST_WIDTH_RESOLUTION); break; case 1: case 2: - bitmap_scale(0, 0, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, sdl_screen->w, sdl_screen->h, SNES_WIDTH*2, 0, GFX.Screen, sdl_screen->pixels); + bitmap_scale(0, 0, IPPU.RenderedScreenWidth, IPPU.RenderedScreenHeight, sdl_screen->w, sdl_screen->h, SNES_WIDTH, 0, GFX.Screen, sdl_screen->pixels); break; } -- cgit v1.2.3