From 43c5417e5098ce5a6b8de87e31beeb1a30dd1556 Mon Sep 17 00:00:00 2001 From: Patrice Mandin Date: Sat, 12 Jan 2019 23:07:14 +0100 Subject: [PATCH] atari:xbios: On ST,STE, C2P routine has 4 bits planes as destination, calculate correct width --- src/video/xbios/SDL_xbios_st.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/xbios/SDL_xbios_st.c b/src/video/xbios/SDL_xbios_st.c index 65ab8a3a5..e56ed6cca 100644 --- a/src/video/xbios/SDL_xbios_st.c +++ b/src/video/xbios/SDL_xbios_st.c @@ -158,6 +158,10 @@ static void getScreenFormat(_THIS, int bpp, Uint32 *rmask, Uint32 *gmask, Uint32 static int getLineWidth(_THIS, xbiosmode_t *new_video_mode, int width, int bpp) { + if (bpp==4) { + return (width >> 1); + } + return (width * (((bpp==15) ? 16 : bpp)>>3)); }