File gpupeopssoft.dif of Package psx-plugins

--- src/cfg.c
+++ src/cfg.c
@@ -72,6 +72,7 @@
 //
 //*************************************************************************//
 
+#include <gtk/gtk.h>
 #include "stdafx.h"
 
 #ifdef _WINDOWS
@@ -1299,7 +1300,6 @@
 
 #define _IN_CFG
 
-#include <gtk/gtk.h>
 #undef FALSE
 #undef TRUE
 
--- src/draw.c
+++ src/draw.c
@@ -1253,7 +1253,7 @@
 ////////////////////////////////////////////////////////////////////////
 
 #ifdef USE_XF86VM
-
+#undef BOOL
 #include <X11/extensions/xf86vmode.h>
 static XF86VidModeModeInfo **modes=0;
 static int           iOldMode=0;
@@ -2462,7 +2462,7 @@
  unsigned short * pSrc=(unsigned short *)pBackBuffer;
  unsigned short * pSrcR=NULL;
  unsigned short * pDst=(unsigned short *)pBB;
- unsigned long * pDstR=NULL;
+ unsigned long * pDstR=NULL, *pDst_ul;
  int x,y,cyo=-1,cy;
  int xpos, xinc;unsigned short pixel;
  int ypos, yinc,ddx2=ddx>>1;
@@ -2493,7 +2493,9 @@
 #else
      pDstR=(unsigned long *)(pDst-(ddx+dga2Fix));
 #endif
-     for(x=0;x<ddx2;x++) *((unsigned long*)pDst)++=*pDstR++;
+     pDst_ul = pDst;
+     for(x=0;x<ddx2;x++) *(pDst_ul)++=*pDstR++;
+     pDst = pDst_ul;
     }
    else
     {
--- src/makes/mk.x11
+++ src/makes/mk.x11
@@ -4,7 +4,7 @@
 
 XF86VM = TRUE
 XF86DGA2 = FALSE
-CPU = i386
+#CPU = i386
 
 CC = gcc
 LD = gcc
@@ -17,7 +17,7 @@
 LIBS +=  `gtk-config --libs`
 
 ifeq ($(XF86VM), TRUE)
-        OBJECTS+= /usr/X11R6/lib/libXxf86vm.a
+        LIBS+= -lXxf86vm
         CFLAGS+= -DUSE_XF86VM
 endif
 ifeq ($(XF86DGA2), TRUE)
--- src/makes/plg.mk
+++ src/makes/plg.mk
@@ -4,7 +4,7 @@
 
 PLUGIN = libgpuPeops$(VERSION).so
 PLUGINTYPE = libgpu.so
-CFLAGS = -g -Wall -fPIC -O4 -fomit-frame-pointer -ffast-math $(INCLUDE)
+CFLAGS = -g -Wall -fPIC $(RPM_OPT_FLAGS) -fomit-frame-pointer -ffast-math $(INCLUDE)
 #CFLAGS = -g -Wall -fPIC -O3 -mpentium -fomit-frame-pointer -ffast-math $(INCLUDE)
 INCLUDE = -I/usr/local/include
 OBJECTS = gpu.o cfg.o draw.o fps.o key.o menu.o prim.o soft.o
--- src/stdafx.h
+++ src/stdafx.h
@@ -56,8 +56,10 @@
 #include <stdlib.h> 
 #include <string.h>
 #include <sys/time.h> 
-#include <GL/gl.h>  
-#include <GL/glx.h>  
+//#include <GL/gl.h>  
+//#include <GL/glx.h>  
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
 #include <math.h> 
 #include <X11/cursorfont.h> 
 
openSUSE Build Service is sponsored by