Commit a157959d authored by Alexandre Julliard's avatar Alexandre Julliard

user.exe: Store the GDI instance when it's first loaded.

parent 598a25de
...@@ -60,6 +60,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(user); ...@@ -60,6 +60,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(user);
WORD USER_HeapSel = 0; /* USER heap selector */ WORD USER_HeapSel = 0; /* USER heap selector */
static HINSTANCE16 gdi_inst;
struct gray_string_info struct gray_string_info
{ {
GRAYSTRINGPROC16 proc; GRAYSTRINGPROC16 proc;
...@@ -1760,11 +1762,8 @@ WORD WINAPI GetFreeSystemResources16( WORD resType ) ...@@ -1760,11 +1762,8 @@ WORD WINAPI GetFreeSystemResources16( WORD resType )
{ {
STACK16FRAME* stack16 = MapSL((SEGPTR)NtCurrentTeb()->WOW32Reserved); STACK16FRAME* stack16 = MapSL((SEGPTR)NtCurrentTeb()->WOW32Reserved);
HANDLE16 oldDS = stack16->ds; HANDLE16 oldDS = stack16->ds;
HINSTANCE16 gdi_inst;
int userPercent, gdiPercent; int userPercent, gdiPercent;
if ((gdi_inst = GetModuleHandle16( "gdi" )) < 32) return 0;
switch(resType) switch(resType)
{ {
case GFSR_USERRESOURCES: case GFSR_USERRESOURCES:
...@@ -2060,7 +2059,7 @@ BOOL WINAPI DllEntryPoint( DWORD reason, HINSTANCE16 inst, WORD ds, ...@@ -2060,7 +2059,7 @@ BOOL WINAPI DllEntryPoint( DWORD reason, HINSTANCE16 inst, WORD ds,
USER_HeapSel = ds; USER_HeapSel = ds;
register_wow_handlers(); register_wow_handlers();
LoadLibrary16( "gdi.exe" ); gdi_inst = LoadLibrary16( "gdi.exe" );
LoadLibrary16( "display.drv" ); LoadLibrary16( "display.drv" );
LoadLibrary16( "keyboard.drv" ); LoadLibrary16( "keyboard.drv" );
LoadLibrary16( "mouse.drv" ); LoadLibrary16( "mouse.drv" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment