From ef0a6b952016417c867b77c7e9f720ee5e32995f Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Wed, 22 Jan 2020 16:16:14 +0800 Subject: [PATCH] make SyncUpdateDC and SyncUpdateSurface inline for not defined _MGUSE_SYNC_UPDATE and/or not defined _MGSCHEMA_COMPOSITING --- include/gdi.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/gdi.h b/include/gdi.h index 329ca304..f9c5fcd5 100644 --- a/include/gdi.h +++ b/include/gdi.h @@ -2096,7 +2096,12 @@ MG_EXPORT void GUIAPI DeleteSecondaryDC (HWND hwnd); * * \note This function only works when _MGUSE_SYNC_UPDATE defined. */ +#ifdef _MGUSE_SYNC_UPDATE MG_EXPORT BOOL GUIAPI SyncUpdateDC (HDC hdc); +#else +static inline BOOL GUIAPI SyncUpdateDC (HDC hdc) +{ return TRUE; } +#endif /** * \fn BOOL GUIAPI SyncUpdateSurface (HWND hwnd) @@ -2115,7 +2120,12 @@ MG_EXPORT BOOL GUIAPI SyncUpdateDC (HDC hdc); * \note This function only works when _MGSCHEMA_COMPOSITING and * _MGUSE_SYNC_UPDATE defined. */ +#if defined(_MGUSE_SYNC_UPDATE) && defined(_MGSCHEMA_COMPOSITING) MG_EXPORT BOOL GUIAPI SyncUpdateSurface (HWND hwnd); +#else +static inline BOOL GUIAPI SyncUpdateSurface (HWND hwnd) +{ return TRUE; } +#endif /** @} end of dc_fns */