diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-01-06 16:45:12 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-01-06 18:23:17 +0000 |
commit | 5da0401398239a2b445e11945144d073d77f0f03 (patch) | |
tree | f27d6b2e9b60f4548a51b2e35c04e7a607601560 /src/mesa/state_tracker/wgl/stw_device.c | |
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/mesa/state_tracker/wgl/stw_device.c')
-rw-r--r-- | src/mesa/state_tracker/wgl/stw_device.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/mesa/state_tracker/wgl/stw_device.c b/src/mesa/state_tracker/wgl/stw_device.c index 52907f1a79..e2a17d83ac 100644 --- a/src/mesa/state_tracker/wgl/stw_device.c +++ b/src/mesa/state_tracker/wgl/stw_device.c @@ -37,8 +37,8 @@ struct stw_device *stw_dev = NULL; -static BOOL -st_init(void) +boolean +st_init(const struct stw_winsys *stw_winsys) { static struct stw_device stw_dev_storage; @@ -47,7 +47,9 @@ st_init(void) stw_dev = &stw_dev_storage; memset(stw_dev, 0, sizeof(*stw_dev)); - stw_dev->screen = stw_winsys.create_screen(); + stw_dev->stw_winsys = stw_winsys; + + stw_dev->screen = stw_winsys->create_screen(); if(!stw_dev->screen) goto error1; @@ -61,7 +63,7 @@ error1: } -static void +void st_cleanup(void) { DHGLRC dhglrc; @@ -76,18 +78,3 @@ st_cleanup(void) stw_dev = NULL; } - - -BOOL WINAPI -DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) -{ - switch (fdwReason) { - case DLL_PROCESS_ATTACH: - return st_init(); - - case DLL_PROCESS_DETACH: - st_cleanup(); - break; - } - return TRUE; -} |