Alexandre Julliard : user.exe: Store the GDI instance when it' s first loaded.
Alexandre Julliard
julliard at winehq.org
Tue May 25 12:06:08 CDT 2010
Module: wine
Branch: master
Commit: a157959dbee696790b668142a9d5854066b3ee44
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a157959dbee696790b668142a9d5854066b3ee44
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon May 24 23:35:37 2010 +0200
user.exe: Store the GDI instance when it's first loaded.
---
dlls/user.exe16/user.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c
index c536a6d..710ed62 100644
--- a/dlls/user.exe16/user.c
+++ b/dlls/user.exe16/user.c
@@ -60,6 +60,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(user);
WORD USER_HeapSel = 0; /* USER heap selector */
+static HINSTANCE16 gdi_inst;
+
struct gray_string_info
{
GRAYSTRINGPROC16 proc;
@@ -1760,11 +1762,8 @@ WORD WINAPI GetFreeSystemResources16( WORD resType )
{
STACK16FRAME* stack16 = MapSL((SEGPTR)NtCurrentTeb()->WOW32Reserved);
HANDLE16 oldDS = stack16->ds;
- HINSTANCE16 gdi_inst;
int userPercent, gdiPercent;
- if ((gdi_inst = GetModuleHandle16( "gdi" )) < 32) return 0;
-
switch(resType)
{
case GFSR_USERRESOURCES:
@@ -2060,7 +2059,7 @@ BOOL WINAPI DllEntryPoint( DWORD reason, HINSTANCE16 inst, WORD ds,
USER_HeapSel = ds;
register_wow_handlers();
- LoadLibrary16( "gdi.exe" );
+ gdi_inst = LoadLibrary16( "gdi.exe" );
LoadLibrary16( "display.drv" );
LoadLibrary16( "keyboard.drv" );
LoadLibrary16( "mouse.drv" );
More information about the wine-cvs
mailing list