src/video/sdlgenblit.pl
changeset 5426 7a3982c50af8
parent 5184 d976b67150c5
child 5535 96594ac5fd1a
     1.1 --- a/src/video/sdlgenblit.pl	Sun Mar 06 21:15:46 2011 -0800
     1.2 +++ b/src/video/sdlgenblit.pl	Sun Mar 06 21:17:09 2011 -0800
     1.3 @@ -274,8 +274,12 @@
     1.4      output_copyfuncname("static void", $src, $dst, $modulate, $blend, $scale, 1, "\n");
     1.5      print FILE <<__EOF__;
     1.6  {
     1.7 +__EOF__
     1.8 +    if ( $modulate || $blend ) {
     1.9 +        print FILE <<__EOF__;
    1.10      const int flags = info->flags;
    1.11  __EOF__
    1.12 +    }
    1.13      if ( $modulate ) {
    1.14          print FILE <<__EOF__;
    1.15      const Uint32 modulateR = info->r;
    1.16 @@ -309,7 +313,7 @@
    1.17      incx = (info->src_w << 16) / info->dst_w;
    1.18  
    1.19      while (info->dst_h--) {
    1.20 -        $format_type{$src} *src;
    1.21 +        $format_type{$src} *src = 0;
    1.22          $format_type{$dst} *dst = ($format_type{$dst} *)info->dst;
    1.23          int n = info->dst_w;
    1.24          srcx = -1;