[Bug 34978] Display detection issue with the MacDriver

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Dec 20 01:51:32 CST 2013


http://bugs.winehq.org/show_bug.cgi?id=34978

--- Comment #5 from Ken Thomases <ken at codeweavers.com> ---
Created attachment 46935
  --> http://bugs.winehq.org/attachment.cgi?id=46935
Kludgy implementation of EnumDisplayDevicesW()

Here's an implementation of EnumDisplayDevicesW() and some supporting
functionality that gets DisplayFusion working properly with the Mac driver.  It
requires changes in the user driver, but I only made those changes in the Mac
driver, so it's very likely that this will break the X11 driver.

I'm not 100% sure that I understand how this is supposed to behave on Windows. 
I thought I knew, but DisplayFusion continued to behave oddly until I changed
some things.

I had thought that we could emulate a single video adapter and hang each
display off of that.  Like so for two displays:

EnumDisplayDevices(NULL, 0, ...) -> \\.\DISPLAY1 (adapter)
    EnumDisplayDevices("\\.\DISPLAY1", 0, ...) -> \\.\DISPLAY1\Monitor0
(display)
    EnumDisplayDevices("\\.\DISPLAY1", 1, ...) -> \\.\DISPLAY1\Monitor1
(display)
    EnumDisplayDevices("\\.\DISPLAY1", 2, ...) -> failure (no more displays)
EnumDisplayDevices(NULL, 1, ...) -> failure (no more adapters)

However, DisplayFusion insists on interpreting that as the displays being
mirrored/cloned.  I've found somebody else with that interpretation[1].

In order to get separate displays, I had to emulate an adapter for each:

EnumDisplayDevices(NULL, 0, ...) -> \\.\DISPLAY1 (adapter)
    EnumDisplayDevices("\\.\DISPLAY1", 0, ...) -> \\.\DISPLAY1\Monitor0
(display)
    EnumDisplayDevices("\\.\DISPLAY1", 1, ...) -> failure (no more displays)
EnumDisplayDevices(NULL, 1, ...) -> \\.\DISPLAY2 (adapter)
    EnumDisplayDevices("\\.\DISPLAY2", 0, ...) -> \\.\DISPLAY2\Monitor0
(display)
    EnumDisplayDevices("\\.\DISPLAY2", 1, ...) -> failure (no more displays)
EnumDisplayDevices(NULL, 2, ...) -> failure (no more adapters)

Anyway, this patch is mostly about exploring.  There will have to be a lot more
work before anything like this can be submitted.


[1]
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/9ce34fd2-1264-4225-9783-74b18cccaca8/changedisplaysettingsex-multiple-monitors-swapping-between-clone-and-extended?forum=windowsgeneraldevelopmentissues

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list