ddraw: Don't bother to unregister classes at process exit.
This commit is contained in:
parent
1b4c1ab900
commit
0ad26e27f3
|
@ -848,13 +848,12 @@ static inline DWORD get_config_key(HKEY defkey, HKEY appkey, const char* name, c
|
||||||
* app didn't release them properly(Gothic 2, Diablo 2, Moto racer, ...)
|
* app didn't release them properly(Gothic 2, Diablo 2, Moto racer, ...)
|
||||||
*
|
*
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
BOOL WINAPI
|
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, LPVOID reserved)
|
||||||
DllMain(HINSTANCE hInstDLL,
|
|
||||||
DWORD Reason,
|
|
||||||
LPVOID lpv)
|
|
||||||
{
|
{
|
||||||
TRACE("(%p,%x,%p)\n", hInstDLL, Reason, lpv);
|
TRACE("(%p,%x,%p)\n", hInstDLL, reason, reserved);
|
||||||
if (Reason == DLL_PROCESS_ATTACH)
|
switch (reason)
|
||||||
|
{
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
{
|
{
|
||||||
static HMODULE ddraw_self;
|
static HMODULE ddraw_self;
|
||||||
char buffer[MAX_PATH+10];
|
char buffer[MAX_PATH+10];
|
||||||
|
@ -968,9 +967,10 @@ DllMain(HINSTANCE hInstDLL,
|
||||||
|
|
||||||
instance = hInstDLL;
|
instance = hInstDLL;
|
||||||
DisableThreadLibraryCalls(hInstDLL);
|
DisableThreadLibraryCalls(hInstDLL);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (Reason == DLL_PROCESS_DETACH)
|
|
||||||
{
|
case DLL_PROCESS_DETACH:
|
||||||
if(!list_empty(&global_ddraw_list))
|
if(!list_empty(&global_ddraw_list))
|
||||||
{
|
{
|
||||||
struct list *entry, *entry2;
|
struct list *entry, *entry2;
|
||||||
|
@ -1034,7 +1034,7 @@ DllMain(HINSTANCE hInstDLL,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unregister the window class. */
|
if (reserved) break;
|
||||||
UnregisterClassA(DDRAW_WINDOW_CLASS_NAME, hInstDLL);
|
UnregisterClassA(DDRAW_WINDOW_CLASS_NAME, hInstDLL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue