mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-18 16:28:51 +00:00
Fix 32-bit
This commit is contained in:
parent
6713272809
commit
a6c08a24d7
@ -60,7 +60,7 @@ static void* sdl_gfx_init(const video_info_t *video, const input_driver_t **inpu
|
||||
unsigned full_y = video_info->current_h;
|
||||
SSNES_LOG("Detecting desktop resolution %ux%u.\n", full_x, full_y);
|
||||
|
||||
vid->screen = SDL_SetVideoMode(video->width, video->height, (g_settings.video.force_16bit || !video->rgb32) ? 15 : 32, SDL_HWSURFACE | SDL_DOUBLEBUF | (video->fullscreen ? SDL_FULLSCREEN : 0));
|
||||
vid->screen = SDL_SetVideoMode(video->width, video->height, (g_settings.video.force_16bit || !video->rgb32) ? 15 : 32, SDL_HWSURFACE | SDL_HWACCEL | SDL_DOUBLEBUF | (video->fullscreen ? SDL_FULLSCREEN : 0));
|
||||
if (!vid->screen)
|
||||
{
|
||||
SSNES_ERR("Failed to init SDL surface.\n");
|
||||
@ -153,7 +153,8 @@ static bool sdl_gfx_frame(void *data, const void* frame, unsigned width, unsigne
|
||||
{
|
||||
uint32_t *dest = (uint32_t*)vid->buffer->pixels + ((y * vid->buffer->pitch) >> 2);
|
||||
const uint32_t *src = (const uint32_t*)frame + ((y * pitch) >> 2);
|
||||
memcpy(dest, src, width * sizeof(uint32_t));
|
||||
for (unsigned x = 0; x < width; x++)
|
||||
dest[x] = (src[x] >> 8) | 0xff000000;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user