Mercurial > hg > dmlib
changeset 1566:3b53b289df0e
Use SDL_CreateRGBSurfaceWithFormat().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 13 May 2018 07:36:37 +0300 |
parents | 58aa34bb4f03 |
children | e81c8c7a348f |
files | tools/64vw.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/64vw.c Sun May 13 07:33:05 2018 +0300 +++ b/tools/64vw.c Sun May 13 07:36:37 2018 +0300 @@ -394,7 +394,8 @@ } // Create surface (we are lazy and ugly) - if ((surf = SDL_CreateRGBSurface(SDL_SWSURFACE, cimage->width, cimage->height, 8, 0, 0, 0, 0)) == NULL) + if ((surf = SDL_CreateRGBSurfaceWithFormat(0, + cimage->width, cimage->height, 8, SDL_PIXELFORMAT_INDEX8)) == NULL) { dmC64ImageFree(cimage); dmErrorMsg("Could not allocate surface.\n"); @@ -418,7 +419,8 @@ fail: dmC64ImageFree(cimage); - if (surf == NULL && (surf = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 200, 8, 0, 0, 0, 0)) == NULL) + if (surf == NULL && (surf = SDL_CreateRGBSurfaceWithFormat(0, + 320, 200, 8, SDL_PIXELFORMAT_INDEX8)) == NULL) { dmErrorMsg("Could not allocate surface.\n"); goto exit;