st/wgl: Fix argument of stw_pixelformat_get_info().
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 8 Feb 2012 15:46:28 +0000 (15:46 +0000)
committerBrian Paul <brianp@vmware.com>
Thu, 23 Feb 2012 14:49:08 +0000 (07:49 -0700)
stw_pixelformat_get_info takes zero based index, not a 1 based pixel
format number.

src/gallium/state_trackers/wgl/stw_ext_pbuffer.c

index 2c3555d5dbf22abeae87c870952323866ffd4274..085591a556076d4071e3ee2f536cddcda8b32d68 100644 (file)
@@ -85,7 +85,7 @@ wglCreatePbufferARB(HDC hCurrentDC,
    PIXELFORMATDESCRIPTOR pfd;
    BOOL bRet;
 
-   info = stw_pixelformat_get_info(iPixelFormat);
+   info = stw_pixelformat_get_info(iPixelFormat - 1);
    if (!info) {
       SetLastError(ERROR_INVALID_PIXEL_FORMAT);
       return 0;