Rémi Bernon
4573910acc
win32u: Move D3DKMT vulkan implementation out of winex11.
2024-03-26 22:46:05 +01:00
Rémi Bernon
eb38f7418a
win32u: Open adapters in NtGdiDdDDIEnumAdapters2 outside of the display devices lock.
2024-03-26 22:44:31 +01:00
Rémi Bernon
9f3f61283d
win32u: Avoid a crash when cleaning up a monitor without an adapter.
2024-03-20 23:05:06 +01:00
Zhiyi Zhang
d6ac41a9f4
win32u: Don't enumerate mirrored monitor clones when unnecessary.
...
These functions don't need to enumerate mirrored monitor clones.
2024-03-15 15:06:37 +01:00
Zhiyi Zhang
793e4640e4
win32u: Don't enumerate mirrored monitor clones for GetSystemMetrics(SM_CMONITORS).
...
Only one monitor in a mirrored monitor set contributes to the result of GetSystemMetrics(SM_CMONITORS).
Tested manually on Win7 and Win10.
2024-03-15 15:06:37 +01:00
Zhiyi Zhang
6505403e58
win32u: Fix a possible condition that makes EnumDisplayMonitors() not reporting any monitors.
...
When there are two monitors and they are mirrored, both of them are considered primary. When the
first primary monitor happens to be a clone, EnumDisplayMonitors() ends up not reporting any
monitors because should_enumerate_monitor() returns FALSE and we break out the loop to enumerate
primary monitors after that.
This is a regression from b59619d
and my review comments. My indent was to break out of the loop
after finding the *master* primary monitor, not cloned primary monitors, to avoid unnecessary
iterations. However, the primary monitor count is small and it's cleaner this way so let's break
when should_enumerate_monitor() returns TRUE.
2024-03-15 15:06:37 +01:00
Rémi Bernon
3944b36b98
win32u: Fix incorrect ascii key name in get_config_key.
...
Fixes 6b8b35f950
which incorrectly
replaced it with string literal, leading to the default setting being
used all the time.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56435
2024-03-14 18:41:42 +01:00
Rémi Bernon
b59619d2e4
win32u: Enumerate monitors from their device keys.
2024-03-14 18:41:42 +01:00
Rémi Bernon
b4e4921cb6
win32u: Get rid of the monitor flags.
2024-03-14 18:41:42 +01:00
Rémi Bernon
d77d36b1f4
win32u: Get rid of the adapter display_device.
2024-03-14 18:41:42 +01:00
Rémi Bernon
e6a8fc2448
win32u: Get rid of the monitor state_flags.
2024-03-14 18:41:42 +01:00
Rémi Bernon
caf9585c3c
win32u: Get rid of the monitor display_device.
2024-03-14 18:41:42 +01:00
Rémi Bernon
3bcd6f1aab
win32u: Split writing monitor to registry to a separate helper.
2024-03-14 18:41:42 +01:00
Rémi Bernon
737e9d7ffc
win32u: Add an adapter struct to the device manager context.
2024-03-14 18:41:42 +01:00
Rémi Bernon
0d8bdf392f
win32u: Keep the vulkan GUID on the gpu structure.
2024-03-07 22:56:12 +01:00
Rémi Bernon
c8d2955cdc
win32u: Split read / write of gpu to registry to separate helpers.
2024-03-07 22:56:12 +01:00
Rémi Bernon
c67726b3d0
win32u: Enumerate devices with a dedicated helper.
...
Which will allow us to enumerate monitor devices later as well.
2024-03-07 22:56:12 +01:00
Rémi Bernon
788ba75432
win32u: Lookup adapter gpus from their device paths.
2024-03-07 22:56:12 +01:00
Rémi Bernon
955ddc6ea6
win32u: Load gpus from registry before adapters.
2024-03-07 22:56:12 +01:00
Rémi Bernon
c179b269ab
win32u: Keep a reference on the adapters gpu.
2024-03-07 22:56:12 +01:00
Rémi Bernon
e614610aaf
win32u: Introduce and use new reg_(open|create)_ascii_key helpers.
2024-03-06 18:59:34 +01:00
Rémi Bernon
6b8b35f950
win32u: Use set_reg_ascii_value whenever possible.
2024-03-06 18:59:34 +01:00
Rémi Bernon
3909a93bc2
win32u: Remove unnecessary class_guidW double check.
2024-03-06 18:59:34 +01:00
Rémi Bernon
eaed90d9b4
win32u: Use REG_SZ instead of REG_BINARY for some adapter keys.
2024-03-06 18:59:34 +01:00
Rémi Bernon
20a09a3071
win32u: Remove unused wine_devpropkey_monitor_adapternameW property.
2024-03-06 18:59:34 +01:00
Rémi Bernon
ab5d9bb67b
win32u: Simplify adapter key path creation from gpu_guid.
2024-03-06 18:59:34 +01:00
Rémi Bernon
8fcc3c4efe
win32u: Use char array for the device manager context gpuid.
2024-03-06 18:59:34 +01:00
Fabian Maurer
8351a45cb2
win32u: Sync dpi awareness changes from user32.
2024-02-27 11:47:42 +01:00
Fabian Maurer
cbcf609108
win32u: Refactor get_thread_dpi_awareness to use get_awareness_from_dpi_awareness_context.
2024-02-27 11:47:26 +01:00
Fabian Maurer
d96754213c
win32u: Move get_awareness_from_dpi_awareness_context.
2024-02-27 11:42:20 +01:00
Rémi Bernon
a3686eeb5e
win32u: Don't assume that the primary adapter is always first.
2024-02-21 21:55:04 +01:00
Rémi Bernon
76326ed369
win32u: Only consider active monitors in monitor_from_rect.
2024-02-21 21:55:04 +01:00
Rémi Bernon
f7788fc7e7
win32u: Only consider active monitors for virtual screen rect.
2024-02-21 21:55:04 +01:00
Rémi Bernon
db391c37a9
win32u: Only consider active monitors for clone detection.
2024-02-21 21:55:04 +01:00
Rémi Bernon
e4ff578bcc
win32u: Deduce monitor device flags from their adapter.
2024-02-21 21:55:04 +01:00
Krzysztof Bogacki
223292da02
win32u: Implement NtGdiDdDDIEnumAdapters2.
...
Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
2024-02-15 20:39:48 +01:00
Krzysztof Bogacki
800b5e44fc
win32u: Maintain a list of GPUs in cache.
...
Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
2024-02-15 20:39:48 +01:00
Krzysztof Bogacki
10db5b67b8
gdi32: Add D3DKMTEnumAdapters2() stub.
...
Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
2024-02-15 20:39:46 +01:00
Alexandros Frantzis
26e3d2eced
win32u: Use consistent locking order for display related mutexes.
...
Most paths that hold both the display_lock and the display_devices_init
mutex acquire them in the order just mentioned. However, there are two
cases where these are acquired in the opposite order, which with
unfortunate thread interactions and timings can lead to a deadlock. Fix
these cases to use the same order as the rest of the code.
2024-02-08 23:31:24 +01:00
Alexandre Julliard
008f64557d
include: Include cfg.h from cfgmgr32.h.
2024-01-30 22:41:17 +01:00
Alexandre Julliard
3f9de12980
user32: Return result through NtCallbackReturn for the enum monitors callback.
2024-01-18 18:08:49 +01:00
Zhiyi Zhang
d91eab24d2
win32u: Fix a possible out-of-bounds write (Coverity).
2024-01-17 11:07:00 +01:00
Jon Doron
28ca56257e
win32u: Add registry data for GPU memory size.
...
Starcraft Remastered is looking up for the GPU physical memory size to
check for minimum requirements to enable RealTime Lighting.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46624
Signed-off-by: Jon Doron <arilou@gmail.com>
2023-12-04 22:10:23 +01:00
Rémi Bernon
8e4c196c14
win32u: Remove unnecessary config_key lazy initializations.
2023-11-27 22:39:52 +01:00
Rémi Bernon
c36b419344
winewayland.drv: Configure win32u keyboard repeat delay and speed.
2023-11-22 20:03:04 +01:00
Dmitry Timoshkov
cb80a25021
user32: Return DEFAULT_CHARSET from SPI_GETICONTITLELOGFONT and SPI_GETNONCLIENTMETRICS.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2023-11-15 23:03:51 +01:00
Alexandros Frantzis
a75e2b49ca
win32u: Assume thread dpi for rect in NtUserIsWindowRectFullScreen.
...
Assume that the window rect passed NtUserIsWindowRectFullScreen is
expressed in terms of thread dpi and convert monitor rects accordingly
for proper matching.
2023-11-14 22:25:01 +01:00
Alexandre Julliard
7710e37c47
win32u: Fix handling of process default DPI awareness.
...
It got broken by the conversion to NTUSER_DPI* values.
2023-11-09 23:00:40 +01:00
Alexandre Julliard
d76f5b4ab9
win32u: Use the correct length for kernel object names in object attributes.
2023-09-12 10:00:24 +02:00
Michael Skorokhodov
973ed25791
win32u: Add DriverVersion string for GPUs to registry.
...
Some applications (e.g. UE4) require the DriverVersion string in the registry.
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
2023-08-01 21:50:34 +09:00