wined3d: Free the logo path when we're done with it.

This commit is contained in:
Henri Verbeet 2009-03-11 10:15:09 +01:00 committed by Alexandre Julliard
parent a75590343a
commit 3644a7f6d7
1 changed files with 241 additions and 220 deletions

View File

@ -92,11 +92,7 @@ static void CDECL wined3d_do_nothing(void)
{
}
/* At process attach */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
TRACE("WineD3D DLLMain Reason=%d\n", fdwReason);
if (fdwReason == DLL_PROCESS_ATTACH)
static BOOL wined3d_init(HINSTANCE hInstDLL)
{
HMODULE mod;
char buffer[MAX_PATH+10];
@ -317,6 +313,31 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
if (appkey) RegCloseKey( appkey );
if (hkey) RegCloseKey( hkey );
}
return TRUE;
}
static BOOL wined3d_destroy(void)
{
HeapFree(GetProcessHeap(), 0, wined3d_settings.logo);
return TRUE;
}
/* At process attach */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
TRACE("WineD3D DLLMain Reason=%u\n", fdwReason);
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
return wined3d_init(hInstDLL);
case DLL_PROCESS_DETACH:
return wined3d_destroy();
default:
return TRUE;
}
}