]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
patch from div0 that enables printf format warnings in gcc
[xonotic/darkplaces.git] / vid_wgl.c
index 6c58989553ea21bb69c1709b48b24612e9ae5cfc..d0954d01e4b4550da5611adc2a5bf0aefebb3cb2 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -865,7 +865,7 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp, int refreshrat
        mainwindow = CreateWindowEx (ExWindowStyle, "DarkPlacesWindowClass", gamename, WindowStyle, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, global_hInstance, NULL);
        if (!mainwindow)
        {
-               Con_Printf("CreateWindowEx(%d, %s, %s, %d, %d, %d, %d, %d, %p, %p, %d, %p) failed\n", ExWindowStyle, "DarkPlacesWindowClass", gamename, WindowStyle, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, global_hInstance, NULL);
+               Con_Printf("CreateWindowEx(%d, %s, %s, %d, %d, %d, %d, %d, %p, %p, %d, %p) failed\n", (int)ExWindowStyle, "DarkPlacesWindowClass", gamename, (int)WindowStyle, (int)(rect.left), (int)(rect.top), (int)(rect.right - rect.left), (int)(rect.bottom - rect.top), NULL, NULL, (int)global_hInstance, NULL);
                VID_Shutdown();
                return false;
        }
@@ -906,14 +906,14 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp, int refreshrat
        if ((pixelformat = ChoosePixelFormat(baseDC, &pfd)) == 0)
        {
                VID_Shutdown();
-               Con_Printf("ChoosePixelFormat(%d, %p) failed\n", baseDC, &pfd);
+               Con_Printf("ChoosePixelFormat(%d, %p) failed\n", (int)baseDC, &pfd);
                return false;
        }
 
        if (SetPixelFormat(baseDC, pixelformat, &pfd) == false)
        {
                VID_Shutdown();
-               Con_Printf("SetPixelFormat(%d, %d, %p) failed\n", baseDC, pixelformat, &pfd);
+               Con_Printf("SetPixelFormat(%d, %d, %p) failed\n", (int)baseDC, pixelformat, &pfd);
                return false;
        }
 
@@ -934,7 +934,7 @@ int VID_InitMode (int fullscreen, int width, int height, int bpp, int refreshrat
        if (!qwglMakeCurrent(baseDC, baseRC))
        {
                VID_Shutdown();
-               Con_Printf("wglMakeCurrent(%d, %d) failed\n", baseDC, baseRC);
+               Con_Printf("wglMakeCurrent(%d, %d) failed\n", (int)baseDC, (int)baseRC);
                return false;
        }