Ticket #33853: port-mednafen.diff

File port-mednafen.diff, 4.0 KB (added by anddam (Andrea D'Amore), 12 years ago)
  • files/patch-src_file_cpp.diff

     
     1--- src/file.cpp.orig   2012-04-01 10:41:21.000000000 +0200
     2+++ src/file.cpp        2012-04-01 10:42:58.000000000 +0200
     3@@ -229,7 +229,7 @@
     4    goto doret;
     5   }
     6 
     7-  while((howmany = gzread(tz, tmp->data + cur_size, cur_alloced - cur_size)) > 0)
     8+  while((howmany = gzread((gzFile) tz, tmp->data + cur_size, cur_alloced - cur_size)) > 0)
     9   {
     10    cur_size += howmany;
     11    cur_alloced <<= 1;
     12@@ -282,7 +282,7 @@
     13  }
     14  else if(type == MDFN_FILETYPE_GZIP)
     15  {
     16-  gzclose(tz);
     17+  gzclose((gzFile) tz);
     18  }
     19  else if(type == MDFN_FILETYPE_ZIP)
     20  {
     21@@ -444,7 +444,7 @@
     22 
     23    if(!(fceufp = MakeMemWrap(t, 1)))
     24    {
     25-    gzclose(t);
     26+    gzclose((gzFile) t);
     27     return(0);
     28    }
     29 
     30@@ -671,12 +671,12 @@
     31     int errnum;
     32 
     33     MDFN_PrintError(_("Error writing to \"%s\": %m"), filename, gzerror(gp, &errnum));
     34-    gzclose(gp);
     35+    gzclose((gzFile) gp);
     36     return(0);
     37    }
     38   }
     39 
     40-  if(gzclose(gp) != Z_OK) // FIXME: Huhm, how should we handle this?
     41+  if(gzclose((gzFile) gp) != Z_OK) // FIXME: Huhm, how should we handle this?
     42   {
     43    MDFN_PrintError(_("Error closing \"%s\""), filename);
     44    return(0);
  • files/patch-src_selblur.cpp

     
    1 --- src/selblur.cpp.orig        2007-05-18 12:56:11.000000000 -0400
    2 +++ src/selblur.cpp     2007-05-18 12:58:04.000000000 -0400
    3 @@ -32,8 +32,8 @@
    4  // spec->dest[x + y * spec->dest_pitch32] = (r << spec->red_shift) | (g << spec->green_shift) | (b << spec->blue_shift);
    5  //}
    6  
    7 -#define GetSourcePixel(_x, _y, _r, _g, _b) { uint32 __pixel = source[_x + _y * source_pitch32]; _r = (__pixel >> red_shift) & 0xFF;    \
    8 -       _g = (__pixel >> green_shift) & 0xFF; _b = (__pixel >> blue_shift) & 0xFF; }
    9 +#define GetSourcePixel(_x, _y, _r, _g, _b) { uint32 __mypixel = source[_x + _y * source_pitch32]; _r = (__mypixel >> red_shift) & 0xFF;        \
    10 +       _g = (__mypixel >> green_shift) & 0xFF; _b = (__mypixel >> blue_shift) & 0xFF; }
    11  
    12  #define SetDestPixel(_x, _y, _r, _g, _b) dest[_x + _y * dest_pitch32] = (_r << red_shift) | (_g << green_shift) | (_b << blue_shift);
    13  
  • files/patch-src_drivers_shader_cpp.diff

     
     1--- src/drivers/shader.cpp.orig 2012-04-01 11:03:00.000000000 +0200
     2+++ src/drivers/shader.cpp      2012-04-01 11:10:57.000000000 +0200
     3@@ -176,7 +176,7 @@
     4 }";
     5 
     6 
     7-static void ShaderErrorTest(GLenum moe)
     8+static void ShaderErrorTest(GLhandleARB moe)
     9 {
     10  char buf[1000];
     11  GLsizei buflen = 0;
  • Portfile

     
    33PortSystem 1.0
    44
    55name            mednafen
    6 version         0.8.1
    7 revision        2
     6version         0.8.D.3
     7epoch       1
    88platforms       darwin
    99categories      emulators games
    1010maintainers     freebsd.org:adamw
     
    2222homepage        http://mednafen.sourceforge.net/
    2323master_sites    sourceforge:project/${name}/Mednafen/${version}
    2424use_bzip2       yes
    25 checksums       md5 71067abd527d1e57f7124e31301a7201
     25checksums           md5     57d22805071becd81858b0c088a275e5 \
     26                    sha1    b19b92101853cb653506456fd8ab1c0bb0b6e636 \
     27                    rmd160  546f49a9541ba4d0367fe682aef23cdadf3d7325
     28
    2629depends_lib     path:lib/pkgconfig/sdl.pc:libsdl \
    2730                port:libsdl_net \
    2831                port:libsndfile \
     
    3235# Just an FYI: even though it takes a billion years to compile
    3336# src/gba/arm.cpp, it *does* finish eventually.
    3437
    35 patchfiles      patch-src_selblur.cpp
     38patchfiles  patch-src_file_cpp.diff \
     39            patch-src_drivers_shader_cpp.diff
    3640
    3741worksrcdir      ${name}
    3842