Fix 32-bit

This commit is contained in:
Themaister 2011-04-21 14:30:54 +02:00
parent 6713272809
commit a6c08a24d7

View File

@ -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;
}
}