From 53033675ad661f506e094d8c5a6b2e25c19aba84 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Tue, 11 Feb 2020 21:01:48 +0800 Subject: [PATCH] cleanup and fix conditional compilation errors --- include/window.h | 6 +++--- src/newgal/video.c | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/window.h b/include/window.h index 7d970211..41b9378e 100644 --- a/include/window.h +++ b/include/window.h @@ -5893,7 +5893,7 @@ typedef struct _MAINWINCREATE { /** * The background color of the main window. * Note that under compositing schema, if you specify the main windows's - * surface type other than default, you must use this field + * surface type other than the default, you must use this field * to specify the background color of the main window instead of * the pixel value (\a iBkColor). * @@ -5901,7 +5901,7 @@ typedef struct _MAINWINCREATE { * You should use a value returned by \a MakeRGBA macro for this field. * Note that if you use the surface type \a ST_PIXEL_DEFAULT when creating * the main window, you can still use the pixel values which compliant - * to \a HDC_SCREEN, e.g., a values in \a SysPixelIndex array. + * to \a HDC_SCREEN, e.g., values in \a SysPixelIndex array. */ DWORD dwBkColor; #endif @@ -8452,7 +8452,7 @@ typedef struct _WNDCLASS { * * \code * #ifdef _MGSCHEMA_COMPOSITING - * MyClass.dwBkColor = COLOR_lightwhite; + * MyClass.dwBkColor = RGBA_lightwhite; * #else * MyClass.iBkColor = PIXEL_lightwhite; * #endif diff --git a/src/newgal/video.c b/src/newgal/video.c index 723a86f0..f87c25f7 100644 --- a/src/newgal/video.c +++ b/src/newgal/video.c @@ -801,6 +801,16 @@ static void mark_surface_dirty (GAL_Surface* surface, } #endif /* defined _MGSCHEMA_COMPOSITING */ +#ifdef _MGSCHEMA_COMPOSITING +#include +#include +#include + +#include "sharedres.h" +#include "ourhdr.h" +#include "drawsemop.h" +#endif + #ifdef _MGUSE_SYNC_UPDATE static inline void add_rects_to_update_region (CLIPRGN* region, @@ -885,16 +895,6 @@ int __mg_convert_region_to_rects (const CLIPRGN * rgn, return nr; } -#ifdef _MGSCHEMA_COMPOSITING -#include -#include -#include - -#include "sharedres.h" -#include "ourhdr.h" -#include "drawsemop.h" -#endif - BOOL GAL_SyncUpdate (GAL_Surface *surface) { GAL_VideoDevice *this = (GAL_VideoDevice *)surface->video; @@ -949,7 +949,7 @@ void GAL_UpdateRects (GAL_Surface *surface, int numrects, GAL_Rect *rects) #endif if (this) { - if (this->info.mlt_surfaces == 0 && this->UpdateRects) + if (this->info.mlt_surfaces == 0 && this->UpdateRects) { this->UpdateRects (this, numrects, rects); } else if (this->UpdateSurfaceRects) {