mirror of
https://github.com/reactos/reactos.git
synced 2024-11-28 14:03:37 +08:00
4067eb1454
- Get rid of the TLS based implementation CORE-14024
40 lines
1020 B
C
40 lines
1020 B
C
/*
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
* PROJECT: ReactOS
|
|
* FILE: dll/opengl/opengl32/dllmain.c
|
|
* PURPOSE: OpenGL32 DLL
|
|
*/
|
|
|
|
#include "opengl32.h"
|
|
|
|
BOOL WINAPI
|
|
DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
|
|
{
|
|
switch ( Reason )
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
/* Initialize Context list */
|
|
InitializeListHead(&ContextListHead);
|
|
/* no break */
|
|
case DLL_THREAD_ATTACH:
|
|
break;
|
|
|
|
case DLL_THREAD_DETACH:
|
|
/* Set NULL context for this thread */
|
|
wglMakeCurrent(NULL, NULL);
|
|
break;
|
|
case DLL_PROCESS_DETACH:
|
|
/* Clean up */
|
|
if (!Reserved)
|
|
{
|
|
/* The process is not shutting down: release everything */
|
|
wglMakeCurrent(NULL, NULL);
|
|
IntDeleteAllContexts();
|
|
IntDeleteAllICDs();
|
|
}
|
|
break;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|