diff tools/64vw.c @ 1947:8896d5676f1b

Architectural change: remove some duplicated variables from DMC64Image structure and replace them with a pointer to DMC64ImageCommonFormat.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 29 Jun 2018 17:17:14 +0300
parents 410679d2fe8a
children 0d19d0a47faf
line wrap: on
line diff
--- a/tools/64vw.c	Fri Jun 29 04:05:32 2018 +0300
+++ b/tools/64vw.c	Fri Jun 29 17:17:14 2018 +0300
@@ -464,7 +464,8 @@
 
             // Create surface (we are lazy and ugly)
             if ((surf = SDL_CreateRGBSurfaceWithFormat(0,
-                cimage->width, cimage->height, 8, SDL_PIXELFORMAT_INDEX8)) == NULL)
+                cimage->fmt->width, cimage->fmt->height,
+                8, SDL_PIXELFORMAT_INDEX8)) == NULL)
             {
                 dmC64ImageFree(cimage);
                 dmErrorMsg("Could not allocate surface.\n");
@@ -478,7 +479,7 @@
                     currIndex + 1,
                     noptFilenames2,
                     filename,
-                    cimage->width, cimage->height,
+                    cimage->fmt->width, cimage->fmt->height,
                     fmt->name);
 
                 if (dmVerbosity >= 1)