[WINED3D 6] Improve GetAdapterMonitor stub
Ivan Gyurdiev
ivg231 at gmail.com
Mon Jul 10 21:32:47 CDT 2006
Don't return WINED3D_OK, that's completely invalid.
Returning something like...the primary monitor [ lacking multi-monitor
support, or multi-device support at the moment ].
This fixes 2 demos for the most part (from humus.ca):
SelectiveSuperSampling
Hair
..because they were computing window dimensions based on monitor
properties obtained from our invalid handle.
-------------- next part --------------
---
dlls/wined3d/directx.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index ae0ea82..5b1325c 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -820,11 +820,14 @@ static HRESULT WINAPI IWineD3DImpl_Regi
static HMONITOR WINAPI IWineD3DImpl_GetAdapterMonitor(IWineD3D *iface, UINT Adapter) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
- FIXME_(d3d_caps)("(%p)->(Adptr:%d)\n", This, Adapter);
+ POINT pt = { -1, -1 };
+
if (Adapter >= IWineD3DImpl_GetAdapterCount(iface)) {
return NULL;
}
- return WINED3D_OK;
+
+ FIXME_(d3d_caps)("(%p): returning the primary monitor for adapter %d\n", This, Adapter);
+ return MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY);
}
/* FIXME: GetAdapterModeCount and EnumAdapterModes currently only returns modes
--
1.4.0
More information about the wine-patches
mailing list