diff options
author | José Fonseca <[email protected]> | 2009-01-06 16:45:12 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-01-06 18:23:17 +0000 |
commit | 5da0401398239a2b445e11945144d073d77f0f03 (patch) | |
tree | f27d6b2e9b60f4548a51b2e35c04e7a607601560 /src/gallium | |
parent | a40ad7ded44e8331ccd9a6d477a2f1716baf6d16 (diff) |
wgl: Do not provide DllMain inside the state tracker.
MS CRT libraries already provide a default DllMain entrypoint, and
MS Linker will complain if it finds the same symbol in two different
libraries. Therefore the DllMain has to be in (each) winsys.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/winsys/gdi/gdi_softpipe_winsys.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c index cb74b54742a..e981b4c5cd3 100644 --- a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c +++ b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c @@ -337,8 +337,23 @@ gdi_softpipe_flush_frontbuffer(struct pipe_winsys *winsys, } -const struct stw_winsys stw_winsys = { +static const struct stw_winsys stw_winsys = { &gdi_softpipe_screen_create, &gdi_softpipe_context_create, &gdi_softpipe_flush_frontbuffer }; + + +BOOL WINAPI +DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) +{ + switch (fdwReason) { + case DLL_PROCESS_ATTACH: + return st_init(&stw_winsys); + + case DLL_PROCESS_DETACH: + st_cleanup(); + break; + } + return TRUE; +}
\ No newline at end of file |