diff options
author | Wolfgang Draxinger <Wolfgang.Draxinger@draxit.de> | 2014-08-19 12:18:24 +0200 |
---|---|---|
committer | Wolfgang Draxinger <Wolfgang.Draxinger@draxit.de> | 2014-08-19 12:18:24 +0200 |
commit | d51dd7ca82cb65a10fcd7a3c0a0dc7420198986b (patch) | |
tree | 13e0ac0f18102d9105b640d704c2cae8f06bd064 | |
parent | 2ac132dacc2f242fbc95742e75086f9bbcf5e7d0 (diff) | |
download | wglarb-d51dd7ca82cb65a10fcd7a3c0a0dc7420198986b.tar.gz wglarb-d51dd7ca82cb65a10fcd7a3c0a0dc7420198986b.tar.bz2 |
WIP
-rw-r--r-- | test/Makefile | 8 | ||||
-rw-r--r-- | wglarb.c | 13 |
2 files changed, 14 insertions, 7 deletions
diff --git a/test/Makefile b/test/Makefile index 6882ab5..8c2092a 100644 --- a/test/Makefile +++ b/test/Makefile @@ -12,10 +12,10 @@ WINDRES32=$(TARGET32)-windres all: layered64.exe layered32.exe shared64.exe shared32.exe -layered64.exe: layered.c layered64_rc.o +layered64.exe: layered.c layered64_rc.o ../wglarb.c $(CC64) $(CFLAGS) -o layered64.exe layered.c layered64_rc.o ../wglarb.c $(LIBS) -Wl,--subsystem,windows -layered32.exe: layered.c layered32_rc.o +layered32.exe: layered.c layered32_rc.o ../wglarb.c $(CC32) -march=i686 $(CFLAGS) -o layered32.exe layered.c layered32_rc.o ../wglarb.c $(LIBS) -Wl,--subsystem,windows @@ -26,10 +26,10 @@ layered32_rc.o: layered.rc manifest.xml $(WINDRES32) --input layered.rc --output layered32_rc.o -shared64.exe: shared.c shared64_rc.o +shared64.exe: shared.c shared64_rc.o ../wglarb.c $(CC64) $(CFLAGS) -o shared64.exe shared.c shared64_rc.o ../wglarb.c $(LIBS) -Wl,--subsystem,windows -shared32.exe: shared.c shared32_rc.o +shared32.exe: shared.c shared32_rc.o ../wglarb.c $(CC32) -march=i686 $(CFLAGS) -o shared32.exe shared.c shared32_rc.o ../wglarb.c $(LIBS) -Wl,--subsystem,windows @@ -216,9 +216,16 @@ BOOL WINAPI wglarb_ChoosePixelFormatARB( return FALSE; } - PFNWGLCHOOSEPIXELFORMATARBPROC impl = - (PFNWGLCHOOSEPIXELFORMATARBPROC) wglGetProcAddress( - "wglChoosePixelFormatARB"); + PFNWGLCHOOSEPIXELFORMATARBPROC impl = NULL; + + impl = (PFNWGLCHOOSEPIXELFORMATARBPROC) wglGetProcAddress( + "wglChoosePixelFormatARB"); + if( !impl ) { + /* WGL_EXT_pixel_format uses the same function prototypes + * as the WGL_ARB_pixel_format extension */ + impl = (PFNWGLCHOOSEPIXELFORMATARBPROC) wglGetProcAddress( + "wglChoosePixelFormatEXT"); + } BOOL ret = FALSE; if( impl ) { |