[9/10] WineD3D: Pretend to support event queries

Stefan Dösinger stefan at codeweavers.com
Fri Feb 16 12:14:46 CST 2007


I think Battlefield 2 depends on them too
-------------- next part --------------
From 98813ba4d5892cb30272842d15c5340731310b99 Mon Sep 17 00:00:00 2001
From: Stefan Doesinger <stefan at codeweavers.com>
Date: Thu, 15 Feb 2007 16:01:15 +0100
Subject: [PATCH] WineD3D: Pretend to support event queries

Half-Life 2 requires this query to display the main menu correctly when started with the "-console"
parameter.
---
 dlls/wined3d/device.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 3ad864e..30771b0 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1088,10 +1088,18 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface, WINE
         else
             WARN("Unsupported in local OpenGL implementation: ARB_OCCLUSION_QUERY/NV_OCCLUSION_QUERY\n");
         break;
+
+    case WINED3DQUERYTYPE_EVENT:
+        /* Half-Life 2 needs this query. It does not render the main menu correctly otherwise
+         * Pretend to support it, faking this query does not do much harm except potentially lowering performance
+         */
+        FIXME("(%p) Event query: Unimplemented, but pretending to be supported\n", This);
+        hr = WINED3D_OK;
+        break;
+
     case WINED3DQUERYTYPE_VCACHE:
     case WINED3DQUERYTYPE_RESOURCEMANAGER:
     case WINED3DQUERYTYPE_VERTEXSTATS:
-    case WINED3DQUERYTYPE_EVENT:
     case WINED3DQUERYTYPE_TIMESTAMP:
     case WINED3DQUERYTYPE_TIMESTAMPDISJOINT:
     case WINED3DQUERYTYPE_TIMESTAMPFREQ:
-- 
1.4.4.3



More information about the wine-patches mailing list