Instead of after sending the WM_MACDRV_UPDATE_DESKTOP_RECT
message. Specifically ddraw reacts to the followup messages and
expects to get the new display rects inside the message handler.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
EnumDisplaySettings() on Wine does not write beyond the end of DEVMODE because it doesn't use
dmDriverExtra currently, but this implementation detail should not be relied on.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
0 or 1 in dmDisplayFrequency means to use the default frequency.
Fix Disgaea PC and Ostriv failing to launch in exclusive fullscreen mode.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Set DM_POSITION and DM_DISPLAYORIENTATION when calling
EnumDisplaySettings(ENUM_REGISTRY_SETTINGS). DM_DISPLAYFIXEDOUTPUT
is not set because it is not necessarily reported according to tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
It is currently unsupported. This helps later patches so that
settings handlers using a new interface can be introduced without
detaching adapter support, making patches smaller.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Changing non-primary adapter settings is currently unsupported. Return
success for non-primary adapter settings changes so that the primary
adapter settings don't get changed unintentionally.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
NULL device and mode parameters mean to restore all adapters to their
registry settings. Since all user graphics drivers only support a
primary adapter now, it's okay to restore only the primary adapter.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
When this Retina mode is enabled and the primary display is in the user's
default configuration, Wine gets told that screen and window sizes and mouse
coordinates are twice what Cocoa reports them as in its virtual coordinate
system ("points"). The Windows apps then renders at that high resolution and
the Mac driver blits it to screen. If the screen is actually a Retina display
in a high-DPI mode, then this extra detail will be preserved. Otherwise, the
rendering will be downsampled and blurry.
This is intended to be combined with increasing the Windows DPI, as via winecfg.
If that is doubled to 192, then, in theory, graphical elements will remain the
same visual size on screen but be rendered with finer detail. Unfortunately,
many Windows programs don't correctly handle non-standard DPI so the results
are not always perfect.
The registry setting to enable Retina mode is:
[HKEY_CURRENT_USER\Software\Wine\Mac Driver]
"RetinaMode"="y"
Note that this setting is not looked for in the AppDefaults\<exe name> key
because it doesn't make sense for only some processes in a Wine session to see
the high-resolution sizes and coordinates.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
On Macs with dual GPUs that automatically switch, the display ID is not stable.
It changes when the active GPU changes. The resulted in the lookup of the
initial display mode failing and games not being able to restore it properly.
The display unit number should be more reliable, although still not perfect.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The code had been checking the kDisplayModeDefaultFlag in the mode's IOFlags,
but that doesn't do what I thought. That indicates which mode the driver
considers to be the default for the hardware. It turns out there's no way to
query the user's default mode.
So, at the first opportunity during a given Wine session, the Mac driver
queries the current display mode and assumes that's the user's default mode.
It records that in a volatile registry key for use by subsequent processes
during that same session.
This doesn't use the existing registry key under
HKEY_CURRENT_CONFIG\System\CurrentControlSet\Control\Video that records the
mode when CDS_UPDATEREGISTRY is used with ChangeDisplaySettingsEx() -- which
explorer.exe does during start-up -- because a) that doesn't support the
distinction between pixel size and point size for Retina modes, and b) in
theory, apps could overwrite that.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>