wined3d: print the architecture when showing driver problems

Austin English austinenglish at gmail.com
Tue Jun 25 20:53:47 CDT 2013


On Mon, Jun 24, 2013 at 12:20 AM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 23 June 2013 07:10, Austin English <austinenglish at gmail.com> wrote:
>> Please consider applying before the release of 1.6. It has no
>> functional changes, but would really help when diagnosing user
>> problems.
>>
> This is not really a wined3d patch. That said, while I agree that
> printing the architecture would be useful here, you can probably avoid
> the #ifdef by using something along the lines of sizeof(void *) == 8 ?
> "64-bit" : "32-bit", although ideally we'd probably get the actual
> architecture from somewhere like ntdll.

My understanding was that using the _WIN64 macro was preferred. I can
certainly do that instead. How's this?

--
-Austin
-------------- next part --------------
From 0cc848b88f98f7da67671bbedb0a28c16cad2d66 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish at gmail.com>
Date: Tue, 25 Jun 2013 18:52:02 -0700
Subject: [PATCH] wined3d: print the architecture when showing driver problems (try 2)

---
 dlls/winex11.drv/opengl.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index cd24575..a3199cb 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -464,7 +464,8 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
 
     if(pglXMakeCurrent(gdi_display, win, ctx) == 0)
     {
-        ERR_(winediag)( "Unable to activate OpenGL context, most likely your OpenGL drivers haven't been installed correctly\n" );
+        ERR_(winediag)( "Unable to activate OpenGL context, most likely your %s OpenGL drivers haven't been "
+                        "installed correctly\n", sizeof(void *) == 4 ? "32-bit":"64-bit" );
         goto done;
     }
     gl_renderer = (const char *)opengl_funcs.gl.p_glGetString(GL_RENDERER);
@@ -506,9 +507,10 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
          * Detect a local X11 server by checking whether the X11 socket is a Unix socket.
          */
         if(!getsockname(fd, (struct sockaddr *)&uaddr, &uaddrlen) && uaddr.sun_family == AF_UNIX)
-            ERR_(winediag)("Direct rendering is disabled, most likely your OpenGL drivers "
+            ERR_(winediag)("Direct rendering is disabled, most likely your %s OpenGL drivers "
                            "haven't been installed correctly (using GL renderer %s, version %s).\n",
-                           debugstr_a(gl_renderer), debugstr_a(WineGLInfo.glVersion));
+                           sizeof(void *) == 4 ? "32-bit":"64-bit", debugstr_a(gl_renderer),
+                           debugstr_a(WineGLInfo.glVersion));
     }
     else
     {
@@ -522,9 +524,10 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
          * it shows 'Mesa X11'.
          */
         if(!strcmp(gl_renderer, "Software Rasterizer") || !strcmp(gl_renderer, "Mesa X11"))
-            ERR_(winediag)("The Mesa OpenGL driver is using software rendering, most likely your OpenGL "
+            ERR_(winediag)("The Mesa OpenGL driver is using software rendering, most likely your %s OpenGL "
                            "drivers haven't been installed correctly (using GL renderer %s, version %s).\n",
-                           debugstr_a(gl_renderer), debugstr_a(WineGLInfo.glVersion));
+                           sizeof(void *) == 4 ? "32-bit":"64-bit", debugstr_a(gl_renderer),
+                           debugstr_a(WineGLInfo.glVersion));
     }
     ret = TRUE;
 
-- 
1.8.2.1


More information about the wine-devel mailing list