Module: wine Branch: master Commit: fadc2cda1c107d41dd59d8f8215780e31c691f85 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fadc2cda1c107d41dd59d8f821...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 28 16:27:26 2009 +0100
gdi32: Load the 32-bit gdi.exe module wrapper from the 32-bit side.
Get rid of the empty gdi_main.c file.
---
dlls/gdi.exe16/gdi.c | 11 +++++++++++ dlls/gdi32/Makefile.in | 1 - dlls/gdi32/gdi_main.c | 38 -------------------------------------- dlls/gdi32/gdi_private.h | 1 - dlls/gdi32/gdiobj.c | 9 +++++++-- 5 files changed, 18 insertions(+), 42 deletions(-)
diff --git a/dlls/gdi.exe16/gdi.c b/dlls/gdi.exe16/gdi.c index e62b711..59cec0f 100644 --- a/dlls/gdi.exe16/gdi.c +++ b/dlls/gdi.exe16/gdi.c @@ -428,6 +428,17 @@ static void free_segptr_bits( HBITMAP16 bmp ) } }
+ +/********************************************************************** + * DllMain + */ +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) +{ + if (reason == DLL_PROCESS_ATTACH) LoadLibrary16( "gdi.exe" ); + return TRUE; +} + + /*********************************************************************** * SetBkColor (GDI.1) */ diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in index 16ea5b4..18dbdef 100644 --- a/dlls/gdi32/Makefile.in +++ b/dlls/gdi32/Makefile.in @@ -27,7 +27,6 @@ C_SRCS = \ enhmfdrv/objects.c \ font.c \ freetype.c \ - gdi_main.c \ gdiobj.c \ icm.c \ mapping.c \ diff --git a/dlls/gdi32/gdi_main.c b/dlls/gdi32/gdi_main.c deleted file mode 100644 index b757ac0..0000000 --- a/dlls/gdi32/gdi_main.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * GDI initialization code - * - * Copyright 2000 Alexandre Julliard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include <stdarg.h> -#include <string.h> -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "wine/winbase16.h" -#include "gdi_private.h" - -/*********************************************************************** - * GDI initialisation routine - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID lpvReserved) -{ - if (reason != DLL_PROCESS_ATTACH) return TRUE; - DisableThreadLibraryCalls(hinstDLL); - LoadLibrary16( "gdi.exe" ); - return GDI_Init(); -} diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index d5f9112..de00eb4 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -438,7 +438,6 @@ extern BOOL WineEngRealizationInfo(GdiFont*, realization_info_t*) DECLSPEC_HIDDE extern BOOL WineEngRemoveFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
/* gdiobj.c */ -extern BOOL GDI_Init(void) DECLSPEC_HIDDEN; extern HGDIOBJ alloc_gdi_handle( GDIOBJHDR *obj, WORD type, const struct gdi_obj_funcs *funcs ) DECLSPEC_HIDDEN; extern void *free_gdi_handle( HGDIOBJ handle ) DECLSPEC_HIDDEN; extern void *GDI_GetObjPtr( HGDIOBJ, WORD ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/gdiobj.c b/dlls/gdi32/gdiobj.c index d32450a..7d03792 100644 --- a/dlls/gdi32/gdiobj.c +++ b/dlls/gdi32/gdiobj.c @@ -565,16 +565,21 @@ BOOL GDI_dec_ref_count( HGDIOBJ handle )
/*********************************************************************** - * GDI_Init + * DllMain * * GDI initialization. */ -BOOL GDI_Init(void) +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) { LOGFONTW default_gui_font; const struct DefaultFontInfo* deffonts; int i;
+ if (reason != DLL_PROCESS_ATTACH) return TRUE; + + DisableThreadLibraryCalls( inst ); + LoadLibraryA( "gdi.exe16" ); + WineEngInit();
/* create stock objects */