From e3a167002d30c0b0b8714a7bf74f2eb8e1ecfe97 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Wed, 11 Mar 2020 18:02:58 +0800 Subject: [PATCH] fix conditional compilation errors --- src/include/newgal.h | 9 ++------- src/newgal/shadow-screen.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/include/newgal.h b/src/include/newgal.h index 6cfddfd2..03c53001 100644 --- a/src/include/newgal.h +++ b/src/include/newgal.h @@ -531,8 +531,6 @@ GAL_Surface *GAL_CreateRGBSurfaceFrom (void *pixels, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); void GAL_FreeSurface (GAL_Surface *surface); -#ifdef _MGRM_PROCESSES - typedef struct REQ_HWSURFACE { /* for allocation */ Uint32 w; @@ -581,6 +579,7 @@ typedef struct _REP_SIGMA8654_GETSURFACE { #endif void GAL_RequestHWSurface (const REQ_HWSURFACE* request, REP_HWSURFACE* reply); + #ifdef _MGSCHEMA_COMPOSITING /* Allocate a shared RGB surface from the specific video device. */ @@ -628,11 +627,7 @@ void GAL_SetCursor (GAL_Surface* surface, int hot_x, int hot_y); /* Move cursor. */ void GAL_MoveCursor (GAL_Surface* surface, int x, int y); -#else /* defined _MGSCHEMA_COMPOSITING */ - -#endif /* not defined _MGSCHEMA_COMPOSITING */ - -#endif /* _MGRM_PROCESSES */ +#endif /* defined _MGSCHEMA_COMPOSITING */ #if 0 /* diff --git a/src/newgal/shadow-screen.c b/src/newgal/shadow-screen.c index 55823434..840abad9 100644 --- a/src/newgal/shadow-screen.c +++ b/src/newgal/shadow-screen.c @@ -67,6 +67,16 @@ #define CURRENT_VERSION 0 +#define CHECK_VERSION_RETVAL(this, retval) \ + if (this->hidden->magic != MAGIC_SHADOW_SCREEN_HEADER || \ + this->hidden->version != CURRENT_VERSION) \ + return retval + +#define CHECK_VERSION_NORETVAL(this) \ + if (this->hidden->magic != MAGIC_SHADOW_SCREEN_HEADER || \ + this->hidden->version != CURRENT_VERSION) \ + return + /* To use the helpers in this file, please: - put the fields at the header of your GAL_PrivateVideoData structure. - make sure to use the correct magic and version numbers. @@ -113,16 +123,6 @@ static inline int boxtop (_THIS) #include "cursor.h" -#define CHECK_VERSION_RETVAL(this, retval) \ - if (this->hidden->magic != MAGIC_SHADOW_SCREEN_HEADER || \ - this->hidden->version != CURRENT_VERSION) \ - return retval - -#define CHECK_VERSION_NORETVAL(this) \ - if (this->hidden->magic != MAGIC_SHADOW_SCREEN_HEADER || \ - this->hidden->version != CURRENT_VERSION) \ - return - int shadowScreen_SetCursor (_THIS, GAL_Surface *surface, int hot_x, int hot_y) { GAL_Rect rect;