1.1 --- a/src/video/directfb/SDL_DirectFB_video.c Mon Feb 06 17:28:04 2006 +0000
1.2 +++ b/src/video/directfb/SDL_DirectFB_video.c Tue Feb 07 06:59:48 2006 +0000
1.3 @@ -98,8 +98,8 @@
1.4
1.5 static void DirectFB_DeleteDevice(SDL_VideoDevice *device)
1.6 {
1.7 - free(device->hidden);
1.8 - free(device);
1.9 + SDL_free(device->hidden);
1.10 + SDL_free(device);
1.11 }
1.12
1.13 static SDL_VideoDevice *DirectFB_CreateDevice(int devindex)
1.14 @@ -107,7 +107,7 @@
1.15 SDL_VideoDevice *device;
1.16
1.17 /* Initialize all variables that we clean on shutdown */
1.18 - device = (SDL_VideoDevice *)malloc(sizeof(SDL_VideoDevice));
1.19 + device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice));
1.20 if (device)
1.21 {
1.22 memset (device, 0, (sizeof *device));
1.23 @@ -467,7 +467,7 @@
1.24 HIDDEN->layer = layer;
1.25 HIDDEN->eventbuffer = events;
1.26
1.27 - if (getenv("SDL_DIRECTFB_MGA_CRTC2") != NULL)
1.28 + if (SDL_getenv("SDL_DIRECTFB_MGA_CRTC2") != NULL)
1.29 HIDDEN->enable_mga_crtc2 = 1;
1.30
1.31 if (HIDDEN->enable_mga_crtc2)
1.32 @@ -541,10 +541,10 @@
1.33 HIDDEN->c2layer->SetOpacity(HIDDEN->c2layer, 0xFF );
1.34
1.35 /* Check if overscan is possibly set */
1.36 - if (getenv("SDL_DIRECTFB_MGA_OVERSCAN") != NULL)
1.37 + if (SDL_getenv("SDL_DIRECTFB_MGA_OVERSCAN") != NULL)
1.38 {
1.39 float overscan = 0;
1.40 - if (sscanf(getenv("SDL_DIRECTFB_MGA_OVERSCAN"), "%f", &overscan) == 1)
1.41 + if (SDL_sscanf(SDL_getenv("SDL_DIRECTFB_MGA_OVERSCAN"), "%f", &overscan) == 1)
1.42 if (overscan > 0 && overscan < 2)
1.43 HIDDEN->mga_crtc2_stretch_overscan = overscan;
1.44 }
1.45 @@ -714,7 +714,7 @@
1.46
1.47 HIDDEN->mga_crtc2_stretch = 0;
1.48
1.49 - if (getenv("SDL_DIRECTFB_MGA_STRETCH") != NULL)
1.50 + if (SDL_getenv("SDL_DIRECTFB_MGA_STRETCH") != NULL)
1.51 {
1.52 /* Normally assume a picture aspect ratio of 4:3 */
1.53 int zoom_aspect_x = 4, zoom_aspect_y = 3, i, j;