diff --git a/gfx/sdl.c b/gfx/sdl.c index f070f98a0d..62fa209c27 100644 --- a/gfx/sdl.c +++ b/gfx/sdl.c @@ -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; } }