diff options
author | P. J. McDermott <pjm@nac.net> | 2013-02-19 01:13:43 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-02-19 01:13:43 (EST) |
commit | 8aff6e6c8590c23f7935fef5085f683d95e24db0 (patch) | |
tree | cd8e1a18c159ba55d531d1431d6cf105ba6379f1 /src | |
parent | 9166c530c7dba3a572d6c762bc10ae25791acb1d (diff) | |
download | overworld-rpg-8aff6e6c8590c23f7935fef5085f683d95e24db0.zip overworld-rpg-8aff6e6c8590c23f7935fef5085f683d95e24db0.tar.gz overworld-rpg-8aff6e6c8590c23f7935fef5085f683d95e24db0.tar.bz2 |
Attempt to store surfaces in video memory.
This shouldn't noticably affect performance on any modern PC.
Diffstat (limited to 'src')
-rw-r--r-- | src/area.c | 2 | ||||
-rw-r--r-- | src/viewport.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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()); } |