PKGBUILDs/extra/dgen-sdl/sdl-use-stdint.patch
2009-10-09 21:23:22 -05:00

36 lines
1.1 KiB
Diff

Index: dgen-1.23/sdl/sdl.cpp
===================================================================
--- dgen-1.23.orig/sdl/sdl.cpp 2007-12-09 20:27:27.000000000 -0200
+++ dgen-1.23/sdl/sdl.cpp 2007-12-09 20:27:46.000000000 -0200
@@ -7,6 +7,7 @@
#include <string.h>
#include <unistd.h>
#include <signal.h>
+#include <stdint.h>
#include <SDL.h>
#include <SDL_audio.h>
@@ -576,12 +577,12 @@
break;
case 4:
{
- long *pp = (long*)p, *qq = (long*)q;
+ int32_t *pp = (int32_t*)p, *qq = (int32_t*)q;
for(j = 0; j < 320; ++j, ++qq)
for(k = 0; k < x_scale; ++k)
*(pp++) = *qq;
if(y_scale != 1)
- for(pp = (long*)p, j = 1; j < y_scale; ++j)
+ for(pp = (int32_t*)p, j = 1; j < y_scale; ++j)
{
p += screen->pitch;
memcpy(p, pp, xs*4);
@@ -1085,7 +1086,7 @@
inline void pd_clear_message()
{
int i, j;
- long *p = (long*)((char*)screen->pixels + (screen->pitch * ys));
+ int32_t *p = (int32_t*)((char*)screen->pixels + (screen->pitch * ys));
#ifdef SDL_OPENGL_SUPPORT
if(opengl)
{