diff src/video/directfb/SDL_DirectFB_video.c @ 1336:3692456e7b0f

Use SDL_ prefixed versions of C library functions. FIXME: Change #include <stdlib.h> to #include "SDL_stdlib.h" Change #include <string.h> to #include "SDL_string.h" Make sure nothing else broke because of this...
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 06:59:48 +0000
parents c9b51268668f
children 604d73db6802
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_video.c	Mon Feb 06 17:28:04 2006 +0000
+++ b/src/video/directfb/SDL_DirectFB_video.c	Tue Feb 07 06:59:48 2006 +0000
@@ -98,8 +98,8 @@
 
 static void DirectFB_DeleteDevice(SDL_VideoDevice *device)
 {
-  free(device->hidden);
-  free(device);
+  SDL_free(device->hidden);
+  SDL_free(device);
 }
 
 static SDL_VideoDevice *DirectFB_CreateDevice(int devindex)
@@ -107,7 +107,7 @@
   SDL_VideoDevice *device;
 
   /* Initialize all variables that we clean on shutdown */
-  device = (SDL_VideoDevice *)malloc(sizeof(SDL_VideoDevice));
+  device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice));
   if (device)
     {
       memset (device, 0, (sizeof *device));
@@ -467,7 +467,7 @@
   HIDDEN->layer       = layer;
   HIDDEN->eventbuffer = events;
 
-  if (getenv("SDL_DIRECTFB_MGA_CRTC2") != NULL)
+  if (SDL_getenv("SDL_DIRECTFB_MGA_CRTC2") != NULL)
     HIDDEN->enable_mga_crtc2 = 1;
   
   if (HIDDEN->enable_mga_crtc2)
@@ -541,10 +541,10 @@
       HIDDEN->c2layer->SetOpacity(HIDDEN->c2layer, 0xFF );
     
       /* Check if overscan is possibly set */
-      if (getenv("SDL_DIRECTFB_MGA_OVERSCAN") != NULL)
+      if (SDL_getenv("SDL_DIRECTFB_MGA_OVERSCAN") != NULL)
         {
 	    float overscan = 0;
-	    if (sscanf(getenv("SDL_DIRECTFB_MGA_OVERSCAN"), "%f", &overscan) == 1)
+	    if (SDL_sscanf(SDL_getenv("SDL_DIRECTFB_MGA_OVERSCAN"), "%f", &overscan) == 1)
                if (overscan > 0 && overscan < 2)
 		  HIDDEN->mga_crtc2_stretch_overscan = overscan;
 	}
@@ -714,7 +714,7 @@
 
       HIDDEN->mga_crtc2_stretch = 0;
 
-      if (getenv("SDL_DIRECTFB_MGA_STRETCH") != NULL)
+      if (SDL_getenv("SDL_DIRECTFB_MGA_STRETCH") != NULL)
         {
 	    /* Normally assume a picture aspect ratio of 4:3 */
 	    int zoom_aspect_x = 4, zoom_aspect_y = 3, i, j;