From 8aff6e6c8590c23f7935fef5085f683d95e24db0 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 19 Feb 2013 01:13:43 -0500 Subject: Attempt to store surfaces in video memory. This shouldn't noticably affect performance on any modern PC. --- diff --git a/src/area.c b/src/area.c index 674a81c..111a1a8 100644 --- a/src/area.c +++ b/src/area.c @@ -45,7 +45,7 @@ blit_map_layer(struct map *map, enum map_layer_id map_layer, SDL_Rect tilerect, layerrect; area->map_layers[area_layer] = SDL_CreateRGBSurface( - SDL_SWSURFACE | SDL_SRCCOLORKEY | SDL_SRCALPHA, + SDL_HWSURFACE | SDL_SRCCOLORKEY | SDL_SRCALPHA, map->width * map->tilewidth, map->height * map->tileheight, 32, diff --git a/src/viewport.c b/src/viewport.c index 97e73dd..1a6e9dc 100644 --- a/src/viewport.c +++ b/src/viewport.c @@ -19,7 +19,7 @@ init_viewport(int width, int height, int bpp) debug("Setting video mode..."); vp->screen = SDL_SetVideoMode(width, height, bpp, - SDL_SWSURFACE | SDL_ANYFORMAT); + SDL_HWSURFACE | SDL_ANYFORMAT); if (vp->screen == NULL) { err(1, "Failed to set video mode (%s)", SDL_GetError()); } -- cgit v0.9.1