First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v42: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open the desktop shared object in NtUserSetThreadDesktop.
server: Return the desktop object locator in (get|set)_thread_desktop.
server: Allocate shared session object for desktops.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v21: ntdll: Use PAGEMAP_SCAN to implement get_working_set_ex, if available.
kernel32: Add tests for large page mapping support.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
Adds the registry key
HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\rawinput
witch allows mouse raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing mouse DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
but sensitivity curves in libinput are more difficult
to calculate than mouse sensitivity in the games.
Implementation of ideas written in the comments: https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
--
v3: winewayland.drv: Add mouse rawinput support
server: Add send_hardware_message flags for rawinput translation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5869
Adds the registry key
HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\rawinput
witch allows mouse raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing mouse DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
but sensitivity curves in libinput are more difficult
to calculate than mouse sensitivity in the games.
Implementation of ideas written in the comments: https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
--
v2: winewayland.drv: Add mouse rawinput support
https://gitlab.winehq.org/wine/wine/-/merge_requests/5869
Adds the registry key
HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\rawinput
witch allows mouse raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing mouse DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
but sensitivity curves in libinput are more difficult
to calculate than mouse sensitivity in the games.
Implementation of ideas written in the comments: https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5869
Adds the registry key
`HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\unaccelerated_pointer`
witch allows raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
and sensitivity curves in libinput are more difficult
to calculate than in the games themselves.
Based on Proton and Wine-Staging patches by @rbernon.
--
v9: winewayland.drv: Add unaccelerated pointer support
server: Add send_hardware_message flags for rawinput translation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
This is the first step in moving the various D3DXCreateTextureFromFileInMemory functions over to using shared code.
--
v5: d3dx9: Add support for specifying which mip level to get pixel data from to d3dx_image_get_pixels().
d3dx9: Cleanup texture value argument handling in D3DXCreateTextureFromFileInMemoryEx().
d3dx9: Add support for specifying a starting mip level when initializing a d3dx_image structure.
d3dx9: Use struct volume inside of struct d3dx_image for storing dimensions.
d3dx9: Use d3dx_image structure inside of D3DXCreateTextureFromFileInMemoryEx().
d3dx9: Refactor texture creation and cleanup in D3DXCreateTextureFromFileInMemoryEx().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5801
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v18: ntdll: Use PAGEMAP_SCAN to implement get_working_set_ex, if available.
ntdll: Support mapping pages for views created with SEC_LARGE_PAGES.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
This is the part VI of the cmd engine rewrite.
It starts splitting FOR loop parsing from its execution.
This is done for numbers (/L) and filesets (/F) FOR loops.
It also extends support for delay expansion of various parts of these loops.
Next MR will tackle the tree oriented FOR loop handling.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5868
The Jet4 driver doesn't handle the DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO
property which is passed in SetProperties. On return that property is marked
as DBPROPSTATUS_NOTSUPPORTED and returns DB_S_ERRORSOCCURRED.
In this case, we dont care that isn't not supported and should allow
the DataSource to succeed.
--
v2: oledb32: When creating a Data Source, handle non fatal errors.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5864
The two tests sometimes fail on macOS and produce >8MB test reports, which fail to upload to the test results page.
--
v2: dwrite/tests: Ignore macOS specific "flip" sbix format.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5866
The Jet4 driver doesn't handle the DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO
property which is passed in SetProperties. On return that property is marked
as DBPROPSTATUS_NOTSUPPORTED and returns DB_S_ERRORSOCCURRED.
In this case, we dont care that isn't not supported and should allow
the DataSource to succeed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5864
Signed-off-by: Fan WenJie <fanwj(a)mail.ustc.edu.cn>
when get_char_dimensions failed, width not set, width may be undefined value and cause undefined behaviour
--
v2: win32u: memset 0 to metric in get_text_metr_size
https://gitlab.winehq.org/wine/wine/-/merge_requests/5854
These patches fix painting in an application that draws outside of a CS_PARENTDC child
client area in its WM_PAINT handler.
Comments and suggestions are welcome.
--
v4: win32u: Use parent rectangle for visible region calculations of a CS_PARENTDC child.
win32u: Don't clip update region to the window client rectangle.
win32u: GetUpdateRect() should clip update rectangle to the window client area.
win32u: GetUpdateRgn() should clip update region to the window client area.
win32u: Clip PAINTSTRUCT.rcPaint to the window client area.
server: For a CS_PARENTDC child use parent for visible region calculations.
server: If the being validated region covers whole window then validate everything.
user32/tests: Add a message test for listbox redrawing after LB_SETCOUNT.
user32/tests: Test BeginPaint() clipbox of cropped window with CS_PARENTDC.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5665
--
v6: win32u: Avoid changing thread DPI context in process_hardware_message.
win32u: Factor hardware message point DPI mapping together.
win32u: Use map_window_points with explicit DPI over screen_to_client.
win32u: Split hardware message window lookup to a separate helper.
win32u: Use per-monitor DPI window_from_point in process_mouse_message.
win32u: Parameterize window_from_point dpi.
server: Pass window's per-monitor DPI in set_window_pos.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5819
We need to look at the Setup key for the driver, as it can be different
compare to the actually driver.
For example, mysql uses the same Setup file to configure both the Ascii/Unicode
vession but has a different file for the actual ODBC functions.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5858
On Mon Jun 17 07:53:48 2024 +0000, darkblaze69 wrote:
> With this MR since 71ff81b apps don't launch with wayland driver,
> showing these errors after some timeouts.
> So we can't use wayland now.
> ```
> 0138:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0
> "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread
> 0138, blocked by 0134, retrying (60 sec)
> 0144:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0
> "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread
> 0144, blocked by 0134, retrying (60 sec)
> 014c:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0
> "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread
> 014c, blocked by 0134, retrying (60 sec)
> ```
Sorry about that, https://gitlab.winehq.org/wine/wine/-/merge_requests/5857 should fix the problem.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5833#note_73393
Overriding the SDL_VIDEODRIVER variable (for Wayland support as an example)
on the Linux side can lead to some games under Wine failing to load (so treat
that variable as special).
--
v4: ntdll: Add SDL_AUDIO*/SDL_VIDEO* to the special variables list.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5231
With this MR since 71ff81b apps don't launch with wayland driver, showing these errors after some timeouts.
So we can't use wayland now.
```
0138:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0 "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread 0138, blocked by 0134, retrying (60 sec)
0144:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0 "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread 0144, blocked by 0134, retrying (60 sec)
014c:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0 "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread 014c, blocked by 0134, retrying (60 sec)
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5833#note_73375
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v17: ntdll: mlock mapped pages for views created with SEC_LARGE_PAGES.
kernel32: Add tests for large page mapping support.
ntdll: Validate parameters to NtCreateSection if large pages are requested.
server: Use memfd to back anonymous mappings on Linux.
kernelbase: Implement GetLargePageMinimum by returning the value of LargePageMinimum in _KUSER_SHARED_DATA.
server: Set LargePageMinimum in _KUSER_SHARED_DATA on Linux.
server: Require SeLockMemoryPrivilege to create large page mappings.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
It turns out that message sequences with "wine_only" messages, although they don't cause a test failure on Windows, do cause `ok_sequence_` to log a failure, so that it dumps the sequence. We need `ok_sequence_` to treat these as skippable messages on Windows so that it ignores the failure to match them.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5853
Trace output with PulseAudio:
```
0144:trace:mmdevapi:adjust_timing Requested duration 1000000 and period 0
0144:trace:mmdevapi:adjust_timing Device periods: 26666 default and 26666 minimum
0144:trace:mmdevapi:adjust_timing Adjusted duration 1000000 and period 100000
```
--
v4: winepulse: Don't set a floor for the period(s).
mmdevapi: Set the default period to a minimum of 10 ms.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5810
Trace output with PulseAudio:
```
0144:trace:mmdevapi:adjust_timing Requested duration 1000000 and period 0
0144:trace:mmdevapi:adjust_timing Device periods: 26666 default and 26666 minimum
0144:trace:mmdevapi:adjust_timing Adjusted duration 1000000 and period 100000
```
--
v3: winepulse: Don't cap period(s).
mmdevapi: Cap default period to 10 ms.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5810
Instead of accessing the surface with macdrv_get_surface_display_image.
--
v5: winemac: Remove now unnecessary cocoa window surface pointer.
winemac: Push window surface image updates to the main thread.
winemac: Create window surface CGImageRef on surface flush.
winemac: Create a provider for the surface and a HBITMAP wrapping it.
winemac: Remove unused macdrv_get_surface_display_image copy_data parameter.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5798
Trace output with PulseAudio:
```
0144:trace:mmdevapi:adjust_timing Requested duration 1000000 and period 0
0144:trace:mmdevapi:adjust_timing Device periods: 26666 default and 26666 minimum
0144:trace:mmdevapi:adjust_timing Adjusted duration 1000000 and period 100000
```
--
v2: winepulse: Don't cap period(s).
mmdevapi: Cap default period to 10 ms.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5810
Instead of accessing the surface with macdrv_get_surface_display_image.
--
v4: winemac: Remove now unnecessary cocoa window surface pointer.
winemac: Push window surface image updates to the main thread.
winemac: Create window surface CGImageRef on surface flush.
winemac: Create a provider for the surface and a HBITMAP wrapping it.
winemac: Remove unused macdrv_get_surface_display_image copy_data parameter.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5798
The aim of this serie is to split FOR loop instruction parsing from
it's execution.
In more details:
- introduces CMD_FOR_CONTROL structure to hold parsed FOR instruction
- improves the support of FOR loop variables (%0-%9 are now available)
- fixes a couple of issues in FOR instruction parsing (missing \t detection
in a couple of places, quotes management),
- fixes a couple of issues in FOR execution (mainly missing delayed
substitution of some constructs)
- code refactoring with helpers
--
v2: programs/cmd: Introduce helpers to handle directory walk.
programs/cmd: Enable '%0' through '%9' as valid FOR loop variables.
programs/cmd: Introduce helpers to save and restore FOR loop contexts.
programs/cmd: Introduce helpers to handle FOR variables.
programs/cmd: Add more tests about FOR loops.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5794
Adds the registry key
`HKEY_CURRENT_USER\\Software\\Wine\\Wayland Driver\\unaccelerated_pointer`
witch allows raw input. This makes it easier
to calculate the same sensitivity in different games,
use sensitivity calculators, and easily change values
when changing DPI and do not depend on the compositor or OS.
For example, you want to set the sensitivity to half as much,
and sensitivity curves in libinput are more difficult
to calculate than in the games themselves.
Based on Proton and Wine-Staging patches by @rbernon.
--
v8: winewayland.drv: Add unaccelerated pointer support
server: Add send_hardware_message flags for rawinput translation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4698
This MR extends the `wgl_pixel_format` struct with extra fields required to implement `wglGetPixelFormatAttribivARB` in opengl32.dll. I have added only fields that are relevant to the current needs of the drivers. The default implementation will be used automatically if the driver populates the extra fields, which this MR does for the winex11 driver.
The new winex11 implementation tries to remain faithful to the previous behavior in terms of error handling and fallbacks. To achieve this the `wgl_pixel_format` extra fields can be marked as invalid in order for the default implementation to return errors accordingly. Note, however, that error handling around `glXGetFBConfigAttrib` is not very consistent (e.g., the parts of `describe_pixel_format` dealing with PIXELFORMATDESCRIPTOR generally disregard errors).
The MR also adds a default implementation for `wglGetPixelFormatAttribfvARB` which piggy-backs on the integer variant of this function, and removes the need for the corresponding code in the drivers. Note that we could potentially remove this function completely from `struct opengl_funcs` (i.e., place it in `manual_win_functions` in `make_opengl`), but it seems the pattern is to maintain a complete list of extension functions (and wined3d also populates the field internally, although it doesn't seem to do anything with it).
Finally, the `winex11.drv/opengl.c` file contains a mix of coding styles. I chose to be consistent with the style of the closest context (e.g., the function) I was making changes/additions in.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5844
The aim of this serie is to split FOR loop instruction parsing from
it's execution.
In more details:
- introduces CMD_FOR_CONTROL structure to hold parsed FOR instruction
- improves the support of FOR loop variables (%0-%9 are now available)
- fixes a couple of issues in FOR instruction parsing (missing \t detection
in a couple of places, quotes management),
- fixes a couple of issues in FOR execution (mainly missing delayed
substitution of some constructs)
- code refactoring with helpers
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5794
This MR lets conhost support IME input window mode.
Note: this MR doesn't include support for properly displaying
the glyphs when they fall out of charset of current code page.
It also lets some diacritics to work.
Note: for these, the generated INPUT_RECORD sequence still widely
differs from native:
- it matches the key down INPUT_RECORD + unicode char (which is what
most app will use)
- it differs on the rest (no key-up, no dead char...) but that shouldn't
matter too much
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5850
Trace output with PulseAudio:
```
0144:trace:mmdevapi:adjust_timing Requested duration 1000000 and period 0
0144:trace:mmdevapi:adjust_timing Device periods: 26666 default and 26666 minimum
0144:trace:mmdevapi:adjust_timing Adjusted duration 1000000 and period 100000
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5810
On Fri Jun 14 00:42:35 2024 +0000, Danyil Blyschak wrote:
> Should I change them? I did it this way since that's what
> `dlls/cabinet/fci.c` does (it similarly provides these functions to zlib).
No, that's fine.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5845#note_73146
If a DSN is System wide, we need to write to the HKEY_LOCAL_MACHINE
part of the registry not HKEY_CURRENT_USER which it's currently doing.
--
v4: odbccp32: SQLWritePrivateProfileStringW check for existing DSN first
odbccp32: Support System wide ODBC DSN keys
https://gitlab.winehq.org/wine/wine/-/merge_requests/5812
Provide memory allocator functions to zlib so that it is able to allocate memory and then deflate later.
Also, some minor error-handling things.
--
v2: opcservices: Check for memory allocation failure before deflating.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5845
Instead of accessing the surface with macdrv_get_surface_display_image.
--
v3: winemac: Remove now unnecessary cocoa window surface pointer.
winemac: Push window surface image updates to the main thread.
winemac: Create window surface CGImageRef on surface flush.
winemac: Create a provider for the surface and a HBITMAP wrapping it.
winemac: Remove unused macdrv_get_surface_display_image copy_data parameter.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5798
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56698
--
v7: quartz/tests: Test that avi_decompressor_source_qc_Notify does not deadlock if called from a foreign thread during IMemInput_Receive.
quartz: Allow concurrent calls to AVI decoder qc_Notify and Receive.
msvfw32/tests: Test that Cinepak rejects unsupported output types.
iccvid: Reject unsupported output types.
quartz/tests: Add Cinepak test to avi splitter.
winegstreamer: Make AVI splitter use end of previous frame if the current frame doesn't have a timestamp.
winegstreamer: Implement AM_MEDIA_TYPE to wg_format converter for Cinepak video.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5744
Alex Henrie (@alexhenrie) commented about dlls/ntdll/unix/env.c:
> STARTS_WITH( var, "TEMP=" ) ||
> STARTS_WITH( var, "TMP=" ) ||
> STARTS_WITH( var, "QT_" ) ||
> - STARTS_WITH( var, "VK_" ));
> + STARTS_WITH( var, "VK_" ) ||
> + STARTS_WITH( var, "XDG_SESSION_TYPE=" ));
I suspect we should treat any variable that starts with `XDG_` specially, not just `XDG_SESSION_TYPE`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5839#note_73092
A game creates a vmr7 filter, inserts it in a IFilterGraph2 and
calls put_FullScreenMode(OAFALSE) on the graph's IVideoWindow.
This currently returns E_NOTIMPL in Wine and the game quits
on that error code.
A full solution would likely require to implement IFullScreenVideoEx
filter, and other bits, but this simpler approach let the game move
forward.
Also tested & fixed calling put_FullScreenMode on the current mode
returns S_FALSE instead of S_OK.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5823
This is the first step in moving the various D3DXCreateTextureFromFileInMemory functions over to using shared code.
--
v4: d3dx9: Add support for specifying which mip level to get pixel data from to d3dx_image_get_pixels().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5801
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v16: kernel32: Add tests for large page mapping support.
ntdll: Validate parameters to NtCreateSection if large pages are requested.
server: Use memfd to back anonymous mappings on Linux.
kernelbase: Implement GetLargePageMinimum by returning the value of LargePageMinimum in _KUSER_SHARED_DATA.
server: Set LargePageMinimum in _KUSER_SHARED_DATA on Linux.
server: Require SeLockMemoryPrivilege to create large page mappings.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
This is the first step in moving the various D3DXCreateTextureFromFileInMemory functions over to using shared code.
--
v3: d3dx9: Add support for specifying which mip level to get pixel data from to d3dx_image_get_pixels().
d3dx9: Cleanup texture value argument handling in D3DXCreateTextureFromFileInMemoryEx().
d3dx9: Add support for specifying a starting mip level when initializing a d3dx_image structure.
d3dx9: Use struct volume inside of struct d3dx_image for storing dimensions.
d3dx9: Use d3dx_image structure inside of D3DXCreateTextureFromFileInMemoryEx().
d3dx9: Refactor texture creation and cleanup in D3DXCreateTextureFromFileInMemoryEx().
d3dx9/tests: Add more tests for loading files with multiple mip levels into textures.
d3dx9/tests: Add tests for the source info argument of D3DXCreateTextureFromFileInMemoryEx().
https://gitlab.winehq.org/wine/wine/-/merge_requests/5801
--
v5: win32u: Avoid changing thread DPI context in process_hardware_message.
win32u: Factor hardware message point DPI mapping together.
win32u: Use map_window_points with explicit DPI over screen_to_client.
win32u: Split hardware message window lookup to a separate helper.
win32u: Use per-monitor DPI window_from_point in process_mouse_message.
win32u: Parameterize window_from_point dpi.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5819