# HG changeset patch # User Sam Lantinga # Date 1104177833 0 # Node ID 012af0b7e8e69e6f363cd9aa1d7223df32624938 # Parent c2f2370ac1e5f5b46f804856d6b6d98ffdb6322c Date: Fri, 24 Dec 2004 23:32:06 -0500 From: Mike Frysinger Subject: [SDL] minor fix for gcc-2.x building in src/video/directfb/SDL_DirectFB_video.c, some variables are not declared at the beginning of scope ... newer gcc's will accept this, but gcc-2.x does not find attached a simple patch by Matt Taylor to resolve this http://bugs.gentoo.org/show_bug.cgi?id=75392 diff -r c2f2370ac1e5 -r 012af0b7e8e6 src/video/directfb/SDL_DirectFB_video.c --- a/src/video/directfb/SDL_DirectFB_video.c Sun Dec 19 22:04:44 2004 +0000 +++ b/src/video/directfb/SDL_DirectFB_video.c Mon Dec 27 20:03:53 2004 +0000 @@ -468,6 +468,9 @@ if (HIDDEN->enable_mga_crtc2) { + DFBDisplayLayerConfig dlc; + DFBDisplayLayerConfigFlags failed; + ret = dfb->GetDisplayLayer (dfb, 2, &HIDDEN->c2layer); if (ret) { @@ -492,9 +495,6 @@ HIDDEN->c2layer->SetOpacity(HIDDEN->c2layer, 0x0); /* Init the surface here as it got a fixed size */ - DFBDisplayLayerConfig dlc; - DFBDisplayLayerConfigFlags failed; - dlc.flags = DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE | DLCONF_OPTIONS; dlc.buffermode = DLBM_BACKVIDEO; dlc.options = DLOP_FLICKER_FILTERING;