Re: [hatari-devel] Less dark doubled TV-monitor mode for 32-bit output |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi Thomas,
On 11/5/19 2:00 AM, Eero Tamminen wrote:
On 11/4/19 11:51 AM, Thomas Huth wrote:
....
This code is likely not endianess safe:
....
You have to use the values from SDL_PixelFormat if you want to make it
run properly everywhere.
With all the 8-bit channels getting the same treatment, it doesn't
matter in which order they are. See attached updated patch.
Note that screen.c requests specific 32-bit and 16-bit screen types
in Screen_SetSDLVideoSize():
-----------------------------------------------------
if (bitdepth == 16)
{
rm = 0xF800;
gm = 0x07E0;
bm = 0x001F;
pfmt = SDL_PIXELFORMAT_RGB565;
}
else
{
rm = 0x00FF0000;
gm = 0x0000FF00;
bm = 0x000000FF;
pfmt = SDL_PIXELFORMAT_RGB888;
}
-----------------------------------------------------
and ST screen conversion macros in src/convert/macros.h rely
on them, they don't use SDL_PixelFormat.
It seems that only AVI recording and screenshot functionality
use SDL_PixelFormat (through PixelConvert_* functions).
- Eero