├── VERSION ├── .gitignore ├── patches ├── wine-hotfixes │ ├── staging │ │ ├── ntdll-ext4-case-folder │ │ │ ├── definition │ │ │ └── 0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch │ │ ├── wineboot-ProxySettings │ │ │ ├── definition │ │ │ └── 0001-wineboot-Initialize-proxy-settings-registry-key.patch │ │ ├── ddraw-GetPickRecords │ │ │ ├── definition │ │ │ └── 0001-ddraw-Implement-Pick-and-GetPickRecords.patch │ │ ├── loader-KeyboardLayouts │ │ │ ├── definition │ │ │ ├── 0002-user32-Improve-GetKeyboardLayoutList.patch │ │ │ └── 0001-loader-Add-Keyboard-Layouts-registry-enteries.patch │ │ ├── user32-FlashWindowEx │ │ │ ├── definition │ │ │ └── 0001-user32-Improve-FlashWindowEx-message-and-return-valu.patch │ │ ├── winex11-Vulkan_support │ │ │ ├── definition │ │ │ └── 0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch │ │ ├── winex11-Fixed-scancodes │ │ │ ├── definition │ │ │ ├── 0009-winex11-Disable-keyboard-scancode-auto-detection-by-.patch │ │ │ ├── 0007-winex11-Use-scancode-high-bit-to-set-KEYEVENTF_EXTEN.patch │ │ │ ├── 0006-winecfg-Add-a-keyboard-scancode-detection-toggle-opt.patch │ │ │ ├── 0003-winex11-Write-supported-keyboard-layout-list-in-regi.patch │ │ │ ├── 0002-winex11-Always-create-the-HKCU-configuration-registr.patch │ │ │ ├── 0005-winex11-Use-the-user-configured-keyboard-layout-if-a.patch │ │ │ ├── 0004-winecfg-Add-a-keyboard-layout-selection-config-optio.patch │ │ │ ├── 0008-winex11-Support-fixed-X11-keycode-to-scancode-conver.patch │ │ │ └── 0001-winecfg-Move-input-config-options-to-a-dedicated-tab.patch │ │ ├── ntdll-WRITECOPY │ │ │ ├── definition │ │ │ └── 0007-ntdll-Report-unmodified-WRITECOPY-pages-as-shared.patch │ │ └── Staging │ │ │ ├── 0002-winelib-Append-Staging-at-the-end-of-the-version-s.patch │ │ │ └── 0001-ntdll-Print-a-warning-message-specifying-the-wine-st.patch │ └── pending │ │ ├── unity_crash_hotfix.patch │ │ ├── support_for_DXGI_FORMAT_R8G8B8A8_UNORM.patch │ │ ├── NCryptDecrypt_implementation.patch │ │ ├── hotfix-guild_wars_2.patch │ │ ├── wine-bug-56653.patch │ │ ├── ntdll_add_wine_disable_sfn.patch │ │ ├── add-envvar-to-gate-media-converter.patch │ │ └── 5671.patch ├── proton │ ├── 71-invert-fsr-logic.patch │ ├── WINE_NO_WM_DECORATION.patch │ ├── 0001-ntdll-Downgrade-using-kernel-write-watches-from-MESS.patch │ ├── 0001-shell32-Add-WINEUSERSANDBOX-environment-variable.patch │ ├── 0001-winex11.drv-Add-the-ability-to-set-custom-wmclass-fo.patch │ ├── 0001-wine.inf-fix-non-steam-controller-input.patch │ ├── PREFER_SDL.patch │ └── 83-nv_low_latency_wine.patch ├── game-patches │ ├── vgsoh.patch │ ├── xdefiant.patch │ ├── pso2_hack.patch │ ├── assettocorsa-hud.patch │ ├── uplay-fsync-proton-wine-hotfix.patch │ ├── killer-instinct-winevulkan_fix.patch │ └── dai_xinput.patch └── protonprep-valve-staging.sh ├── .gitmodules ├── makebuild.sh └── README.md /VERSION: -------------------------------------------------------------------------------- 1 | Lutris Wine GE-Proton8-26 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.vagrant/ 2 | /vagrant_share/ 3 | /builds 4 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/ntdll-ext4-case-folder/definition: -------------------------------------------------------------------------------- 1 | Fixes: [47099] Support for EXT4 case folding per directory. 2 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/wineboot-ProxySettings/definition: -------------------------------------------------------------------------------- 1 | Fixes: [42024] Create ProxyEnable key on wineprefix update 2 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/ddraw-GetPickRecords/definition: -------------------------------------------------------------------------------- 1 | Fixes: [10729] ddraw: Implement Pick() and GetPickRecords(). 2 | 3 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/loader-KeyboardLayouts/definition: -------------------------------------------------------------------------------- 1 | Fixes: [47439] loader: Add Keyboard Layouts registry enteries. 2 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/user32-FlashWindowEx/definition: -------------------------------------------------------------------------------- 1 | Fixes: [43124] FlashWindowEx: WM_NCACTIVATE behavior is incorrect 2 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Vulkan_support/definition: -------------------------------------------------------------------------------- 1 | Fixes: [44775] Allow vulkan support to be detected at runtime. 2 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Fixed-scancodes/definition: -------------------------------------------------------------------------------- 1 | Fixes: [30984] Improve key translation. 2 | Fixes: [45605] Letter keys doesn't work in DirectX aplications 3 | Depends: winecfg-Staging 4 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "wine"] 2 | path = wine 3 | url = https://github.com/ValveSoftware/wine.git 4 | [submodule "wine-staging"] 5 | path = wine-staging 6 | url = https://github.com/wine-staging/wine-staging.git 7 | [submodule "buildbot"] 8 | path = buildbot 9 | url = https://github.com/lutris/buildbot/ 10 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/ntdll-WRITECOPY/definition: -------------------------------------------------------------------------------- 1 | Fixes: [29384] Multiple applications expect correct handling of WRITECOPY memory protection (Voobly fails to launch Age of Empires II, MSYS2) 2 | #Depends: ntdll-ForceBottomUpAlloc 3 | # Causes regressions? 4 | # https://bugs.wine-staging.com/show_bug.cgi?id=207 5 | # https://bugs.wine-staging.com/show_bug.cgi?id=521 6 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/pending/unity_crash_hotfix.patch: -------------------------------------------------------------------------------- 1 | --- a/dlls/dxgi/dxgi_main.c 2 | +++ a/dlls/dxgi/dxgi_main.c 3 | @@ -268,8 +268,6 @@ HRESULT WINAPI DXGID3D10RegisterLayers(const struct dxgi_device_layer *layers, UINT layer_count) 4 | 5 | HRESULT WINAPI DXGIGetDebugInterface1(UINT flags, REFIID iid, void **debug) 6 | { 7 | - TRACE("flags %#x, iid %s, debug %p.\n", flags, debugstr_guid(iid), debug); 8 | - 9 | WARN("Returning DXGI_ERROR_SDK_COMPONENT_MISSING.\n"); 10 | return DXGI_ERROR_SDK_COMPONENT_MISSING; 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/pending/support_for_DXGI_FORMAT_R8G8B8A8_UNORM.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/d2d1/wic_render_target.c b/dlls/d2d1/wic_render_target.c 2 | index 858c187e3bc..77d2adb705e 100644 3 | --- a/dlls/d2d1/wic_render_target.c 4 | +++ b/dlls/d2d1/wic_render_target.c 5 | @@ -197,6 +197,7 @@ HRESULT d2d_wic_render_target_init(struct d2d_wic_render_target *render_target, 6 | switch (texture_desc.Format) 7 | { 8 | case DXGI_FORMAT_B8G8R8A8_UNORM: 9 | + case DXGI_FORMAT_R8G8B8A8_UNORM: 10 | render_target->bpp = 4; 11 | break; 12 | 13 | -------------------------------------------------------------------------------- /patches/proton/71-invert-fsr-logic.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/winex11.drv/fs.c b/dlls/winex11.drv/fs.c 2 | index d689bddb327..2be7bac053c 100644 3 | --- a/dlls/winex11.drv/fs.c 4 | +++ b/dlls/winex11.drv/fs.c 5 | @@ -769,12 +769,12 @@ BOOL fs_hack_is_integer(void) 6 | 7 | BOOL fs_hack_is_fsr(float *sharpness) 8 | { 9 | - static int is_fsr = -1; 10 | + static int is_fsr = 1; 11 | int sharpness_int = 2; 12 | - if (is_fsr < 0) 13 | + const char *e = getenv("WINE_FULLSCREEN_FSR"); 14 | + if (e && !strcmp(e, "0")) 15 | { 16 | - const char *e = getenv("WINE_FULLSCREEN_FSR"); 17 | - is_fsr = e && strcmp(e, "0"); 18 | + is_fsr = 0; 19 | } 20 | if (sharpness) 21 | { 22 | -------------------------------------------------------------------------------- /patches/game-patches/vgsoh.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c 2 | index f4f9d14518f..69005607224 100644 3 | --- a/dlls/kernelbase/file.c 4 | +++ b/dlls/kernelbase/file.c 5 | @@ -2918,6 +2918,21 @@ BOOL WINAPI DECLSPEC_HOTPATCH SetCurrentDirectoryW( LPCWSTR dir ) 6 | { 7 | UNICODE_STRING dirW; 8 | 9 | + char str[MAX_PATH]; 10 | + DWORD size = GetEnvironmentVariableA(L"SteamGameId", str, sizeof(str)); 11 | + 12 | + if (size > 0) { 13 | + if (wcscmp(str, L"218210") == 0) { 14 | + SIZE_T len = wcslen(dir); 15 | + 16 | + if (len > 0 && dir[len - 1] == '.') { 17 | + WCHAR *p = (WCHAR *)dir + len - 1; 18 | + *p = '\0'; 19 | + FIXME("%s . fixed\n", debugstr_w(dir)); 20 | + } 21 | + } 22 | + } 23 | + 24 | RtlInitUnicodeString( &dirW, dir ); 25 | return set_ntstatus( RtlSetCurrentDirectory_U( &dirW )); 26 | } 27 | -------------------------------------------------------------------------------- /patches/game-patches/xdefiant.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/shlwapi/wsprintf.c b/dlls/shlwapi/wsprintf.c 2 | index fbd2a7e75bf..e352131bc79 100644 3 | --- a/dlls/shlwapi/wsprintf.c 4 | +++ b/dlls/shlwapi/wsprintf.c 5 | @@ -32,6 +32,7 @@ 6 | #include "shlwapi.h" 7 | 8 | #include "wine/debug.h" 9 | +#include "wine/exception.h" 10 | 11 | WINE_DEFAULT_DEBUG_CHANNEL(string); 12 | 13 | @@ -604,10 +605,20 @@ int WINAPIV wnsprintfA(LPSTR lpOut, int cchLimitIn, LPCSTR lpFmt, ...) 14 | { 15 | va_list valist; 16 | INT res; 17 | + 18 | + __TRY 19 | + { 20 | + va_start( valist, lpFmt ); 21 | + res = wvnsprintfA( lpOut, cchLimitIn, lpFmt, valist ); 22 | + va_end( valist ); 23 | + } 24 | + __EXCEPT_PAGE_FAULT 25 | + { 26 | + FIXME("wsprintf page fault!\n"); 27 | + return -1; 28 | + } 29 | + __ENDTRY 30 | 31 | - va_start( valist, lpFmt ); 32 | - res = wvnsprintfA( lpOut, cchLimitIn, lpFmt, valist ); 33 | - va_end( valist ); 34 | return res; 35 | } 36 | -------------------------------------------------------------------------------- /patches/proton/WINE_NO_WM_DECORATION.patch: -------------------------------------------------------------------------------- 1 | From d39679f2ad7c4824d96fc89de740610b7117230f Mon Sep 17 00:00:00 2001 2 | From: Stelios Tsampas 3 | Date: Sat, 16 Nov 2024 14:45:36 +0200 4 | Subject: [PATCH] winex11.drv: add env switch to disable wm decorations 5 | 6 | WINE_WM_DECORATIONS=0 disables decorations from the window manager 7 | Works around issues with the mouse clicking through borderless window 8 | edges. 9 | --- 10 | dlls/winex11.drv/window.c | 4 ++++ 11 | 1 file changed, 4 insertions(+) 12 | 13 | diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c 14 | index b8075aeb5a9..53505162033 100644 15 | --- a/dlls/winex11.drv/window.c 16 | +++ b/dlls/winex11.drv/window.c 17 | @@ -405,6 +405,10 @@ static unsigned long get_mwm_decorations( struct x11drv_win_data *data, 18 | const RECT *client_rect ) 19 | { 20 | unsigned long ret = 0; 21 | + const char *decorate = NULL; 22 | + 23 | + decorate = getenv( "WINE_NO_WM_DECORATION" ); 24 | + if (decorate && decorate[0] == '1') decorated_mode = FALSE; 25 | 26 | if (!decorated_mode) return 0; 27 | 28 | -------------------------------------------------------------------------------- /makebuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # usage: ./makebuild.sh name winerepo branch 4 | # example: ./makebuild.sh lutris-GE https://github.com/GloriousEggroll/proton-wine Proton8-15 5 | # build name output: builds/runners/wine/wine-lutris-GE-Proton8-15-x86_64.tar.xz 6 | 7 | if [[ ! -d builds ]]; then 8 | mkdir -p builds 9 | fi 10 | if [[ -z $(podman container list -a | grep buildbot) ]]; then 11 | docker create --interactive --name buildbot --mount type=bind,source="$PWD"/builds,destination=/builds,readonly=false --mount type=bind,source="$PWD"/buildbot,destination=/home/vagrant/buildbot,readonly=false docker.io/gloriouseggroll/lutris_buildbot:bullseye 12 | fi 13 | 14 | docker start buildbot 15 | 16 | # cleanup any old builds first 17 | docker exec buildbot bash -c "rm -Rf /home/vagrant/buildbot/runners/wine/wine-src/" 18 | 19 | # start build 20 | docker exec buildbot bash -c "cd /home/vagrant/buildbot/runners/wine && ./build.sh --as $1 --version $3 --with $2 --branch $3" 21 | 22 | docker stop buildbot 23 | 24 | cd builds/runners/wine 25 | export SHA512NAME=$(ls | grep tar.xz | sed -r 's/tar.xz/sha512sum/g'); sha512sum $(ls | grep tar.xz) > $SHA512NAME 26 | -------------------------------------------------------------------------------- /patches/game-patches/pso2_hack.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c 2 | index eb526f6aa9a..2925252b6c8 100644 3 | --- a/dlls/ntdll/unix/file.c 4 | +++ b/dlls/ntdll/unix/file.c 5 | @@ -3457,6 +3457,7 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer 6 | struct stat st; 7 | char *unix_name = *buffer; 8 | const WCHAR *ptr, *end; 9 | + static char *skip_search = NULL; 10 | 11 | /* check syntax of individual components */ 12 | 13 | @@ -3503,6 +3504,13 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer 14 | if (is_unix && (disposition == FILE_OPEN || disposition == FILE_OVERWRITE)) 15 | return STATUS_OBJECT_NAME_NOT_FOUND; 16 | 17 | + if (skip_search == NULL) 18 | + { 19 | + skip_search = getenv("WINE_NO_OPEN_FILE_SEARCH"); 20 | + WARN("Disabling case insensitive search for opening files"); 21 | + } 22 | + if (skip_search && strcasestr(unix_name, skip_search) && disposition == FILE_OPEN) 23 | + return STATUS_OBJECT_NAME_NOT_FOUND; 24 | /* now do it component by component */ 25 | 26 | while (name_len) 27 | -------------------------------------------------------------------------------- /patches/proton/0001-ntdll-Downgrade-using-kernel-write-watches-from-MESS.patch: -------------------------------------------------------------------------------- 1 | From ff045a9a10273c018680f0107095eff74fa9c4b3 Mon Sep 17 00:00:00 2001 2 | From: William Horvath 3 | Date: Mon, 23 Sep 2024 11:03:23 -0700 4 | Subject: [PATCH] ntdll: Downgrade 'using kernel write watches' from MESSAGE to 5 | TRACE. 6 | 7 | It's overly verbose to be helpful, and clutters the log output. 8 | --- 9 | dlls/ntdll/unix/virtual.c | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c 13 | index 53db5a354c8..7887a2fa67f 100644 14 | --- a/dlls/ntdll/unix/virtual.c 15 | +++ b/dlls/ntdll/unix/virtual.c 16 | @@ -3772,7 +3772,7 @@ void virtual_init(void) 17 | kernel_writewatch_init(); 18 | 19 | if (use_kernel_writewatch) 20 | - MESSAGE( "wine: using kernel write watches, use_kernel_writewatch %d.\n", use_kernel_writewatch ); 21 | + TRACE( "wine: using kernel write watches, use_kernel_writewatch %d.\n", use_kernel_writewatch ); 22 | 23 | if (preload_info && *preload_info) 24 | for (i = 0; (*preload_info)[i].size; i++) 25 | -- 26 | 2.46.1 27 | 28 | -------------------------------------------------------------------------------- /patches/proton/0001-shell32-Add-WINEUSERSANDBOX-environment-variable.patch: -------------------------------------------------------------------------------- 1 | From 872fc98fdb32537f69f58bfc24b0a9c7057669e0 Mon Sep 17 00:00:00 2001 2 | From: Stelios Tsampas 3 | Date: Sat, 25 May 2024 15:35:25 +0300 4 | Subject: [PATCH] shell32: Add WINEUSERSANDBOX environment variable 5 | 6 | Setting 'WINEUSERSANDBOX=1' stops Wine from creating 7 | links to the $HOME folders from the respective Wine folders. 8 | --- 9 | dlls/shell32/shellpath.c | 5 +++++ 10 | 1 file changed, 5 insertions(+) 11 | 12 | diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c 13 | index 4330ee367b3..1d04dd96ced 100644 14 | --- a/dlls/shell32/shellpath.c 15 | +++ b/dlls/shell32/shellpath.c 16 | @@ -3015,7 +3015,12 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW( 17 | 18 | /* create symbolic links rather than directories for specific 19 | * user shell folders */ 20 | + const WCHAR *sandbox = _wgetenv( L"WINEUSERSANDBOX" ); 21 | + int isolate = 0; 22 | + isolate = sandbox && !strcmp(sandbox, "1"); 23 | + if(!isolate) { 24 | _SHCreateSymbolicLink(folder, szBuildPath); 25 | + } 26 | 27 | /* create directory/directories */ 28 | ret = SHCreateDirectoryExW(hwndOwner, szBuildPath, NULL); 29 | -- 30 | 2.47.0 31 | 32 | -------------------------------------------------------------------------------- /patches/game-patches/assettocorsa-hud.patch: -------------------------------------------------------------------------------- 1 | From 0b242db6d63ec466c09d47020596ba941ce7cdf2 Mon Sep 17 00:00:00 2001 2 | From: GloriousEggroll 3 | Date: Sat, 16 May 2020 20:05:38 -0600 4 | Subject: [PATCH] Revert "dwrite: Release file streams when building 5 | collections." 6 | 7 | This reverts commit d19e34d8f072514cb903bda89767996ba078bae4. 8 | --- 9 | dlls/dwrite/font.c | 2 -- 10 | 1 file changed, 2 deletions(-) 11 | 12 | diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c 13 | index c473a306720..dbf6c611f86 100644 14 | --- a/dlls/dwrite/font.c 15 | +++ b/dlls/dwrite/font.c 16 | @@ -4659,6 +4659,7 @@ HRESULT create_font_collection(IDWriteFactory7 *factory, IDWriteFontFileEnumerat 17 | BOOL current = FALSE; 18 | HRESULT hr = S_OK; 19 | size_t i; 20 | + const char *sgi = getenv("SteamGameId"); 21 | 22 | *ret = NULL; 23 | 24 | @@ -4785,7 +4786,9 @@ HRESULT create_font_collection(IDWriteFactory7 *factory, IDWriteFontFileEnumerat 25 | } 26 | } 27 | 28 | - IDWriteFontFileStream_Release(stream); 29 | + if ((!sgi) | (sgi && strcmp(sgi, "244210"))) { 30 | + IDWriteFontFileStream_Release(stream); 31 | + } 32 | } 33 | 34 | LIST_FOR_EACH_ENTRY_SAFE(fileenum, fileenum2, &scannedfiles, struct fontfile_enum, entry) 35 | -- 36 | 2.26.2 37 | 38 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/pending/NCryptDecrypt_implementation.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/ncrypt/main.c b/dlls/ncrypt/main.c 2 | index 3511f8f2d3f..656c80a5cb9 100644 3 | --- a/dlls/ncrypt/main.c 4 | +++ b/dlls/ncrypt/main.c 5 | @@ -212,9 +212,22 @@ SECURITY_STATUS WINAPI NCryptCreatePersistedKey(NCRYPT_PROV_HANDLE provider, NCR 6 | SECURITY_STATUS WINAPI NCryptDecrypt(NCRYPT_KEY_HANDLE key, BYTE *input, DWORD insize, void *padding, 7 | BYTE *output, DWORD outsize, DWORD *result, DWORD flags) 8 | { 9 | - FIXME("(%#Ix, %p, %lu, %p, %p, %lu, %p, %#lx): stub\n", key, input, insize, padding, 10 | + struct object *key_object = (struct object *)key; 11 | + 12 | + FIXME("(%#Ix, %p, %lu, %p, %p, %lu, %p, %#lx):\n", key, input, insize, padding, 13 | output, outsize, result, flags); 14 | - return NTE_NOT_SUPPORTED; 15 | + 16 | + if (flags & ~(NCRYPT_NO_PADDING_FLAG | NCRYPT_PAD_OAEP_FLAG 17 | + | NCRYPT_PAD_PKCS1_FLAG | NCRYPT_SILENT_FLAG)) 18 | + { 19 | + FIXME("Flags %lx not supported\n", flags); 20 | + return NTE_BAD_FLAGS; 21 | + } 22 | + 23 | + if (key_object->type != KEY) return NTE_INVALID_HANDLE; 24 | + 25 | + return map_ntstatus(BCryptDecrypt(key_object->key.bcrypt_key, input, insize, padding, 26 | + NULL, 0, output, outsize, result, flags)); 27 | } 28 | 29 | SECURITY_STATUS WINAPI NCryptDeleteKey(NCRYPT_KEY_HANDLE key, DWORD flags) 30 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/Staging/0002-winelib-Append-Staging-at-the-end-of-the-version-s.patch: -------------------------------------------------------------------------------- 1 | From 8aa6fb73e3142d86ba354c204313b8a74a5fa43d Mon Sep 17 00:00:00 2001 2 | From: Sebastian Lackner 3 | Date: Thu, 2 Oct 2014 19:53:46 +0200 4 | Subject: [PATCH] winelib: Append '(Staging)' at the end of the version string. 5 | 6 | --- 7 | configure.ac | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/configure.ac b/configure.ac 11 | index f86a5decb07..3d7f9cc96e6 100644 12 | --- a/configure.ac 13 | +++ b/configure.ac 14 | @@ -3910,7 +3910,7 @@ dnl Rules for generated source files 15 | 16 | WINE_APPEND_RULE( 17 | [dlls/ntdll/unix/version.c: dummy 18 | - @version=\`(GIT_DIR=${wine_srcdir}.git git describe HEAD 2>/dev/null || echo \"wine-\$(PACKAGE_VERSION)\") | sed -n -e '\$\$s/\(.*\)/const char wine_build[[]] = \"\\1\";/p'\` && (echo \$\$version | cmp -s - \$[@]) || echo \$\$version >\$[@] || (rm -f \$[@] && exit 1) 19 | + @version=\`(GIT_DIR=${wine_srcdir}.git git describe HEAD 2>/dev/null || echo \"wine-\$(PACKAGE_VERSION)\") | sed -n -e '\$\$s/\(.*\)/const char wine_build[[]] = \"\\1 (Staging)\";/p'\` && (echo \$\$version | cmp -s - \$[@]) || echo \$\$version >\$[@] || (rm -f \$[@] && exit 1) 20 | programs/winetest/build.rc: dummy 21 | @build=\"STRINGTABLE { 1 \\\"\`GIT_DIR=${wine_srcdir}.git git rev-parse HEAD 2>/dev/null\`\\\" }\" && (echo \$\$build | cmp -s - \$[@]) || echo \$\$build >\$[@] || (rm -f \$[@] && exit 1) 22 | programs/winetest/build.nfo: 23 | -- 24 | 2.33.0 25 | 26 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/ntdll-WRITECOPY/0007-ntdll-Report-unmodified-WRITECOPY-pages-as-shared.patch: -------------------------------------------------------------------------------- 1 | From 52baf4b2f68a78a2d0a0ad16fac8e25af70400ff Mon Sep 17 00:00:00 2001 2 | From: Andrew Wesie 3 | Date: Fri, 24 Apr 2020 14:55:17 -0500 4 | Subject: [PATCH] ntdll: Report unmodified WRITECOPY pages as shared. 5 | 6 | We also need to clear the modified bit after we clear memory in map_image to 7 | match the behavior of Windows. 8 | 9 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48665 10 | Signed-off-by: Andrew Wesie 11 | --- 12 | dlls/ntdll/unix/virtual.c | 4 +++- 13 | 1 file changed, 3 insertions(+), 1 deletion(-) 14 | 15 | diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c 16 | index 9c265db365e..08b37e185bd 100644 17 | --- a/dlls/ntdll/unix/virtual.c 18 | +++ b/dlls/ntdll/unix/virtual.c 19 | @@ -5841,7 +5841,7 @@ static void fill_working_set_info( struct fill_working_set_info_data *d, struct 20 | pagemap = d->pm_buffer[page - d->buffer_start]; 21 | 22 | p->VirtualAttributes.Valid = !(vprot & VPROT_GUARD) && (vprot & 0x0f) && (pagemap >> 63); 23 | - p->VirtualAttributes.Shared = !is_view_valloc( view ) && ((pagemap >> 61) & 1); 24 | + p->VirtualAttributes.Shared = (!is_view_valloc( view ) && ((pagemap >> 61) & 1)) || ((view->protect & VPROT_WRITECOPY) && !(vprot & VPROT_COPIED)); 25 | if (p->VirtualAttributes.Shared && p->VirtualAttributes.Valid) 26 | p->VirtualAttributes.ShareCount = 1; /* FIXME */ 27 | if (p->VirtualAttributes.Valid) 28 | -- 29 | 2.35.1 30 | 31 | -------------------------------------------------------------------------------- /patches/game-patches/uplay-fsync-proton-wine-hotfix.patch: -------------------------------------------------------------------------------- 1 | From eda0bee9e9916938fff6ef6813a1f33df1f93ef7 Mon Sep 17 00:00:00 2001 2 | From: GloriousEggroll 3 | Date: Mon, 04 May 2023 09:52:56 +0200 4 | Subject: [PATCH] ntdll: GAMEFIX: Uplay fsync wine hotfix 5 | 6 | --- 7 | dlls/ntdll/unix/loader.c | 5 ++++- 8 | 1 file changed, 4 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c 11 | index 993bd61b0..f8326d508 100644 12 | --- a/dlls/ntdll/unix/loader.c 13 | +++ b/dlls/ntdll/unix/loader.c 14 | @@ -1907,6 +1907,8 @@ long long ram_reporting_bias; 15 | 16 | static void hacks_init(void) 17 | { 18 | + static const char upc_exe[] = "Ubisoft Game Launcher\\upc.exe"; 19 | + static const char upc2_exe[] = "upc.exe"; 20 | const char *sgi = getenv( "SteamGameId" ); 21 | const char *env_str; 22 | if ((env_str = getenv("WINE_RAM_REPORTING_BIAS"))) 23 | @@ -1929,7 +1931,8 @@ static void hacks_init(void) 24 | fsync_simulate_sched_quantum = !!atoi(env_str); 25 | else if (main_argc > 1) 26 | { 27 | - fsync_simulate_sched_quantum = !!strstr(main_argv[1], "Ubisoft Game Launcher\\upc.exe"); 28 | + fsync_simulate_sched_quantum = !!strstr(main_argv[1], upc_exe); 29 | + fsync_simulate_sched_quantum = !!strstr(main_argv[1], upc2_exe); 30 | fsync_simulate_sched_quantum = fsync_simulate_sched_quantum || !!strstr(main_argv[1], "PlanetZoo.exe"); 31 | fsync_simulate_sched_quantum = fsync_simulate_sched_quantum || !!strstr(main_argv[1], "GTA5.exe"); 32 | } 33 | -- 34 | 2.44.0 35 | 36 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/pending/hotfix-guild_wars_2.patch: -------------------------------------------------------------------------------- 1 | From 7bc7829db283134946d1c7ae0468ddc1bbf993a0 Mon Sep 17 00:00:00 2001 2 | From: deltaconnected 3 | Date: Thu, 26 Aug 2021 03:06:23 +0200 4 | Subject: [PATCH] ntdll: Use a critical section for setting the newly created timer in RtlCreateTimer 5 | 6 | In RtlCreateTimer, NewTimer is being set after RtlLeaveCriticalSection, which 7 | seems to allow callbacks created with DueTime == 0 to execute and finish and 8 | delete an invalid timer before the scheduling thread is switched back. 9 | 10 | Fixes crashes inside DeleteTimerQueueEx and DeleteTimerQueueTimer for 11 | Guild Wars 2 with Arcdps (https://www.deltaconnected.com/arcdps/) 12 | 13 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51683 14 | --- 15 | dlls/ntdll/threadpool.c | 7 ++++--- 16 | 1 file changed, 4 insertions(+), 3 deletions(-) 17 | 18 | diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c 19 | index ca323919d05..20096573c2b 100644 20 | --- a/dlls/ntdll/threadpool.c 21 | +++ b/dlls/ntdll/threadpool.c 22 | @@ -936,12 +936,13 @@ NTSTATUS WINAPI RtlCreateTimer(PHANDLE NewTimer, HANDLE TimerQueue, 23 | if (q->quit) 24 | status = STATUS_INVALID_HANDLE; 25 | else 26 | + { 27 | + *NewTimer = t; 28 | queue_add_timer(t, queue_current_time() + DueTime, TRUE); 29 | + } 30 | RtlLeaveCriticalSection(&q->cs); 31 | 32 | - if (status == STATUS_SUCCESS) 33 | - *NewTimer = t; 34 | - else 35 | + if (status != STATUS_SUCCESS) 36 | RtlFreeHeap(GetProcessHeap(), 0, t); 37 | 38 | return status; 39 | -- 40 | 2.33.0 41 | 42 | 43 | -------------------------------------------------------------------------------- /patches/proton/0001-winex11.drv-Add-the-ability-to-set-custom-wmclass-fo.patch: -------------------------------------------------------------------------------- 1 | From 53d2f7fe9b12cdfe871515608e0d222af497d3e2 Mon Sep 17 00:00:00 2001 2 | From: Stelios Tsampas 3 | Date: Sat, 25 May 2024 15:38:24 +0300 4 | Subject: [PATCH] winex11.drv: Add the ability to set custom wmclass for Wine 5 | windows 6 | 7 | Wine's wmclass can be controlled through the WINE_WMCLASS environment 8 | variable. 9 | --- 10 | dlls/winex11.drv/window.c | 13 +++++++++++-- 11 | 1 file changed, 11 insertions(+), 2 deletions(-) 12 | 13 | diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c 14 | index 53bcc3b8211..a99be83bf78 100644 15 | --- a/dlls/winex11.drv/window.c 16 | +++ b/dlls/winex11.drv/window.c 17 | @@ -1060,8 +1060,17 @@ static void set_initial_wm_hints( Display *display, Window window ) 18 | /* class hints */ 19 | if ((class_hints = XAllocClassHint())) 20 | { 21 | - class_hints->res_name = process_name; 22 | - class_hints->res_class = process_name; 23 | + const char *wine_wmclass = getenv("WINE_WMCLASS"); 24 | + char window_class[128]; 25 | + 26 | + if (wine_wmclass && *wine_wmclass){ 27 | + snprintf(window_class, sizeof(window_class), "%s", wine_wmclass); 28 | + class_hints->res_name = window_class; 29 | + class_hints->res_class = window_class; 30 | + } else { 31 | + class_hints->res_name = process_name; 32 | + class_hints->res_class = process_name; 33 | + } 34 | XSetClassHint( display, window, class_hints ); 35 | XFree( class_hints ); 36 | } 37 | -- 38 | 2.47.0 39 | 40 | -------------------------------------------------------------------------------- /patches/game-patches/killer-instinct-winevulkan_fix.patch: -------------------------------------------------------------------------------- 1 | From 252d6abc7b52a5f506c7fc621c4469d7fd0252f7 Mon Sep 17 00:00:00 2001 2 | From: Paul Gofman 3 | Date: Fri, 23 Oct 2020 17:11:18 +0300 4 | Subject: [PATCH] winevulkan: HACK: Set default mxcsr for 5 | vkEnumeratePhysicalDevices() call. 6 | 7 | Workaround Killer Instinct crash on start with AMD GPU. 8 | --- 9 | dlls/winevulkan/vulkan.c | 6 ++++++ 10 | 1 file changed, 6 insertions(+) 11 | 12 | diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c 13 | index 6e2a5b01359..ca080798f64 100644 14 | --- a/dlls/winevulkan/vulkan.c 15 | +++ b/dlls/winevulkan/vulkan.c 16 | @@ -1042,6 +1042,7 @@ VkResult wine_vkCreateInstance(const VkInstanceCreateInfo *create_info, 17 | VkInstance client_instance = client_ptr; 18 | VkInstanceCreateInfo create_info_host; 19 | const VkApplicationInfo *app_info; 20 | + uint32_t new_mxcsr, old_mxcsr; 21 | struct conversion_context ctx; 22 | struct wine_instance *object; 23 | VkResult res; 24 | @@ -694,7 +695,12 @@ VkResult WINAPI wine_vkCreateInstance(const VkInstanceCreateInfo *create_info, 25 | * the native physical devices and present those to the application. 26 | * Cleanup happens as part of wine_vkDestroyInstance. 27 | */ 28 | + __asm__ volatile("stmxcsr %0" : "=m"(old_mxcsr)); 29 | + new_mxcsr = 0x1f80; 30 | + __asm__ volatile("ldmxcsr %0" : : "m"(new_mxcsr)); 31 | res = wine_vk_instance_load_physical_devices(object); 32 | + __asm__ volatile("ldmxcsr %0" : : "m"(old_mxcsr)); 33 | + TRACE("old_mxcsr %#x.\n", old_mxcsr); 34 | if (res != VK_SUCCESS) 35 | { 36 | ERR("Failed to load physical devices, res=%d\n", res); 37 | -- 38 | 2.26.2 39 | 40 | -------------------------------------------------------------------------------- /patches/proton/0001-wine.inf-fix-non-steam-controller-input.patch: -------------------------------------------------------------------------------- 1 | From 25b995bdbae8a95a88802625ed4cb7ef841f8c81 Mon Sep 17 00:00:00 2001 2 | From: GloriousEggroll 3 | Date: Mon, 13 May 2024 12:19:07 +0300 4 | Subject: [PATCH] wine.inf: fix non-steam controller input 5 | 6 | --- 7 | loader/wine.inf.in | 7 +++++++ 8 | 1 file changed, 7 insertions(+) 9 | 10 | diff --git a/loader/wine.inf.in b/loader/wine.inf.in 11 | index b663725ba19..0fdf24b8af6 100644 12 | --- a/loader/wine.inf.in 13 | +++ b/loader/wine.inf.in 14 | @@ -100,6 +100,7 @@ AddReg=\ 15 | VersionInfo,\ 16 | LicenseInformation,\ 17 | NVIDIANGX, \ 18 | + WineNonSteamController, \ 19 | ProtonOverrides 20 | 21 | [DefaultInstall.ntamd64] 22 | @@ -129,6 +130,7 @@ AddReg=\ 23 | VersionInfo,\ 24 | LicenseInformation,\ 25 | NVIDIANGX, \ 26 | + WineNonSteamController, \ 27 | ProtonOverrides 28 | 29 | [DefaultInstall.ntarm64] 30 | @@ -174,6 +176,7 @@ AddReg=\ 31 | VersionInfo,\ 32 | LicenseInformation,\ 33 | NVIDIANGX, \ 34 | + WineNonSteamController, \ 35 | ProtonOverrides 36 | 37 | [Wow64Install.ntarm] 38 | @@ -3049,6 +3052,10 @@ SortFiles = 10,globalization\sorting 39 | [NVIDIANGX] 40 | HKLM,Software\NVIDIA Corporation\Global\NGXCore,"FullPath",,"C:\Windows\System32" 41 | 42 | +[WineNonSteamController] 43 | +HKLM,System\CurrentControlSet\Services\winebus,"DisableHidraw",0x10001,"1" 44 | +HKLM,System\CurrentControlSet\Services\winebus,"Enable SDL",0x10001,"1" 45 | + 46 | [ProtonOverrides] 47 | HKLM,Software\Khronos\OpenXR\1,"ActiveRuntime",,"C:\openxr\wineopenxr64.json" 48 | ;;Likely want *80 and *90 too, but those require removing Wine's manifest files. 49 | -- 50 | 2.47.0 51 | 52 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0009-winex11-Disable-keyboard-scancode-auto-detection-by-.patch: -------------------------------------------------------------------------------- 1 | From cdb9c20dfeede2240d102ac2f407f58591b3ec2d Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Fri, 6 Jan 2023 11:31:36 +0100 4 | Subject: [PATCH] winex11: Disable keyboard scancode auto-detection by default. 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30984 7 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605 8 | --- 9 | dlls/winex11.drv/x11drv_main.c | 2 +- 10 | programs/winecfg/input.c | 2 +- 11 | 2 files changed, 2 insertions(+), 2 deletions(-) 12 | 13 | diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c 14 | index 782989dab4b..3bee214e09b 100644 15 | --- a/dlls/winex11.drv/x11drv_main.c 16 | +++ b/dlls/winex11.drv/x11drv_main.c 17 | @@ -76,7 +76,7 @@ BOOL use_primary_selection = FALSE; 18 | BOOL use_system_cursors = TRUE; 19 | BOOL grab_fullscreen = FALSE; 20 | int keyboard_layout = -1; 21 | -BOOL keyboard_scancode_detect = TRUE; 22 | +BOOL keyboard_scancode_detect = FALSE; 23 | BOOL managed_mode = TRUE; 24 | BOOL decorated_mode = TRUE; 25 | BOOL private_color_map = FALSE; 26 | diff --git a/programs/winecfg/input.c b/programs/winecfg/input.c 27 | index a9d83b45f00..3ee20d49874 100644 28 | --- a/programs/winecfg/input.c 29 | +++ b/programs/winecfg/input.c 30 | @@ -65,7 +65,7 @@ static void init_dialog( HWND dialog ) 31 | else SendMessageW( layouts, CB_SELECTSTRING, -1, (LPARAM)buffer ); 32 | free( buffer ); 33 | 34 | - buffer = get_reg_key( config_key, keypath( L"X11 Driver" ), L"KeyboardScancodeDetect", L"Y" ); 35 | + buffer = get_reg_key( config_key, keypath( L"X11 Driver" ), L"KeyboardScancodeDetect", L"N" ); 36 | if (IS_OPTION_TRUE( *buffer )) CheckDlgButton( dialog, IDC_KEYBOARD_SCANCODE_DETECT, BST_CHECKED ); 37 | else CheckDlgButton( dialog, IDC_KEYBOARD_SCANCODE_DETECT, BST_UNCHECKED ); 38 | free( buffer ); 39 | -- 40 | 2.42.0 41 | 42 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch: -------------------------------------------------------------------------------- 1 | From 584eecc73a8cba537b8f50932769729a29fe7d3d Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Michael=20M=C3=BCller?= 3 | Date: Mon, 26 Dec 2016 16:37:40 +0100 4 | Subject: [PATCH] wineboot: Initialize proxy settings registry key. 5 | 6 | --- 7 | programs/wineboot/Makefile.in | 2 +- 8 | programs/wineboot/wineboot.c | 9 +++++++++ 9 | 2 files changed, 10 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/programs/wineboot/Makefile.in b/programs/wineboot/Makefile.in 12 | index 667f8f48702..4a1747ad047 100644 13 | --- a/programs/wineboot/Makefile.in 14 | +++ b/programs/wineboot/Makefile.in 15 | @@ -1,6 +1,6 @@ 16 | MODULE = wineboot.exe 17 | IMPORTS = uuid advapi32 ws2_32 kernelbase 18 | -DELAYIMPORTS = shell32 shlwapi version user32 setupapi newdev crypt32 19 | +DELAYIMPORTS = shell32 shlwapi version user32 setupapi newdev crypt32 wininet 20 | 21 | EXTRADLLFLAGS = -mconsole 22 | 23 | diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c 24 | index 14943b005ef..9aab3b68e5b 100644 25 | --- a/programs/wineboot/wineboot.c 26 | +++ b/programs/wineboot/wineboot.c 27 | @@ -77,6 +77,7 @@ 28 | #include 29 | #include 30 | #include 31 | +#include 32 | #include 33 | #include "resource.h" 34 | 35 | @@ -1002,6 +1003,13 @@ static void create_volatile_environment_registry_key(void) 36 | RegCloseKey( hkey ); 37 | } 38 | 39 | +static void create_proxy_settings(void) 40 | +{ 41 | + HINTERNET inet; 42 | + inet = InternetOpenA( "Wine", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 ); 43 | + if (inet) InternetCloseHandle( inet ); 44 | +} 45 | + 46 | /* Performs the rename operations dictated in %SystemRoot%\Wininit.ini. 47 | * Returns FALSE if there was an error, or otherwise if all is ok. 48 | */ 49 | @@ -1812,6 +1820,7 @@ int __cdecl main( int argc, char *argv[] ) 50 | if (init || update) update_wineprefix( update ); 51 | 52 | create_volatile_environment_registry_key(); 53 | + create_proxy_settings(); 54 | 55 | ProcessRunKeys( HKEY_LOCAL_MACHINE, L"RunOnce", TRUE, TRUE ); 56 | 57 | -- 58 | 2.33.0 59 | 60 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/pending/wine-bug-56653.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c 2 | index 461922db7b0..1df4e2f3356 100644 3 | --- a/dlls/ntdll/unix/system.c 4 | +++ b/dlls/ntdll/unix/system.c 5 | @@ -35,6 +35,7 @@ 6 | #include 7 | #include 8 | #include 9 | +#include 10 | #include 11 | #include 12 | #ifdef HAVE_SYS_PARAM_H 13 | @@ -1148,6 +1149,7 @@ static NTSTATUS create_logical_proc_info(void) 14 | { 15 | static const char core_info[] = "/sys/devices/system/cpu/cpu%u/topology/%s"; 16 | static const char cache_info[] = "/sys/devices/system/cpu/cpu%u/cache/index%u/%s"; 17 | + static const char cache_info_dir[] = "/sys/devices/system/cpu/cpu%u/cache"; 18 | static const char numa_info[] = "/sys/devices/system/node/node%u/cpumap"; 19 | const char *env_fake_logical_cores = getenv("WINE_LOGICAL_CPUS_AS_CORES"); 20 | BOOL fake_logical_cpus_as_cores = env_fake_logical_cores && atoi(env_fake_logical_cores); 21 | @@ -1156,6 +1158,7 @@ static NTSTATUS create_logical_proc_info(void) 22 | char op, name[MAX_PATH]; 23 | ULONG_PTR all_cpus_mask = 0; 24 | unsigned int cpu_id; 25 | + struct stat cache_dir_stat; 26 | 27 | /* On systems with a large number of CPU cores (32 or 64 depending on 32-bit or 64-bit), 28 | * we have issues parsing processor information: 29 | @@ -1262,6 +1265,18 @@ static NTSTATUS create_logical_proc_info(void) 30 | } 31 | 32 | cpu_id = cpu_override.mapping.cpu_count ? cpu_override.mapping.host_cpu_id[i] : i; 33 | + 34 | + snprintf(name, sizeof(name), cache_info_dir, cpu_id); 35 | + if(stat(name, &cache_dir_stat) != 0){ 36 | + // Adding cache will fail in the next block so we add a fake one 37 | + CACHE_DESCRIPTOR fake_cache = { .Associativity = 8, .LineSize = 64, .Type = CacheUnified, .Size = 64 * 1024, .Level = 1 }; 38 | + if (!logical_proc_info_add_cache( all_cpus_mask, &fake_cache )) 39 | + { 40 | + fclose(fcpu_list); 41 | + return STATUS_NO_MEMORY; 42 | + } 43 | + } 44 | + 45 | 46 | for(j = 0; j < 4; j++) 47 | { 48 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0007-winex11-Use-scancode-high-bit-to-set-KEYEVENTF_EXTEN.patch: -------------------------------------------------------------------------------- 1 | From 495e0f49611f79291bf95f9236030dd331dff67f Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Wed, 30 Nov 2022 18:46:00 +0100 4 | Subject: [PATCH 7/9] winex11: Use scancode high bit to set 5 | KEYEVENTF_EXTENDEDKEY flag. 6 | 7 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30984 8 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605 9 | --- 10 | dlls/winex11.drv/keyboard.c | 12 ++++++------ 11 | 1 file changed, 6 insertions(+), 6 deletions(-) 12 | 13 | diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c 14 | index 26548c9256e..5065d8048d1 100644 15 | --- a/dlls/winex11.drv/keyboard.c 16 | +++ b/dlls/winex11.drv/keyboard.c 17 | @@ -1363,7 +1363,7 @@ BOOL X11DRV_KeyEvent( HWND hwnd, XEvent *xev ) 18 | char buf[24]; 19 | char *Str = buf; 20 | KeySym keysym = 0; 21 | - WORD vkey = 0, bScan; 22 | + WORD vkey = 0, scan; 23 | DWORD dwFlags; 24 | int ascii_chars; 25 | XIC xic = X11DRV_get_ic( hwnd ); 26 | @@ -1434,10 +1434,10 @@ BOOL X11DRV_KeyEvent( HWND hwnd, XEvent *xev ) 27 | vkey = EVENT_event_to_vkey(xic,event); 28 | /* X returns keycode 0 for composed characters */ 29 | if (!vkey && ascii_chars) vkey = VK_NONAME; 30 | - bScan = keyc2scan[event->keycode] & 0xFF; 31 | + scan = keyc2scan[event->keycode]; 32 | 33 | - TRACE_(key)("keycode %u converted to vkey 0x%X scan %02x\n", 34 | - event->keycode, vkey, bScan); 35 | + TRACE_(key)("keycode %u converted to vkey 0x%X scan %04x\n", 36 | + event->keycode, vkey, scan); 37 | 38 | pthread_mutex_unlock( &kbd_mutex ); 39 | 40 | @@ -1445,11 +1445,11 @@ BOOL X11DRV_KeyEvent( HWND hwnd, XEvent *xev ) 41 | 42 | dwFlags = 0; 43 | if ( event->type == KeyRelease ) dwFlags |= KEYEVENTF_KEYUP; 44 | - if ( vkey & 0x100 ) dwFlags |= KEYEVENTF_EXTENDEDKEY; 45 | + if ( scan & 0x100 ) dwFlags |= KEYEVENTF_EXTENDEDKEY; 46 | 47 | update_lock_state( hwnd, vkey, event->state, event_time ); 48 | 49 | - X11DRV_send_keyboard_input( hwnd, vkey & 0xff, bScan, dwFlags, event_time ); 50 | + X11DRV_send_keyboard_input( hwnd, vkey & 0xff, scan & 0xff, dwFlags, event_time ); 51 | return TRUE; 52 | } 53 | 54 | -- 55 | 2.39.1 56 | 57 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/user32-FlashWindowEx/0001-user32-Improve-FlashWindowEx-message-and-return-valu.patch: -------------------------------------------------------------------------------- 1 | From 04c565bea63d13790703f4823b6719d45e376076 Mon Sep 17 00:00:00 2001 2 | From: James Coonradt 3 | Date: Tue, 19 Sep 2017 12:28:50 -0600 4 | Subject: [PATCH] user32: Improve FlashWindowEx message and return value. 5 | 6 | --- 7 | dlls/user32/tests/win.c | 4 ++-- 8 | dlls/win32u/window.c | 5 ++--- 9 | 2 files changed, 4 insertions(+), 5 deletions(-) 10 | 11 | diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c 12 | index 8464a9f02d8..f2cedc30980 100644 13 | --- a/dlls/user32/tests/win.c 14 | +++ b/dlls/user32/tests/win.c 15 | @@ -9851,7 +9851,7 @@ static void test_FlashWindowEx(void) 16 | 17 | SetLastError(0xdeadbeef); 18 | ret = pFlashWindowEx(&finfo); 19 | - todo_wine ok(!ret, "previous window state should not be active\n"); 20 | + ok(!ret, "previous window state should not be active\n"); 21 | 22 | finfo.cbSize = sizeof(FLASHWINFO) - 1; 23 | SetLastError(0xdeadbeef); 24 | @@ -9902,7 +9902,7 @@ static void test_FlashWindowEx(void) 25 | finfo.dwFlags = FLASHW_STOP; 26 | SetLastError(0xdeadbeef); 27 | ret = pFlashWindowEx(&finfo); 28 | - ok(prev != ret, "previous window state should be different\n"); 29 | + todo_wine ok(prev != ret, "previous window state should be different\n"); 30 | 31 | DestroyWindow( hwnd ); 32 | } 33 | diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c 34 | index f008735f2e3..e8245684b0c 100644 35 | --- a/dlls/win32u/window.c 36 | +++ b/dlls/win32u/window.c 37 | @@ -4532,8 +4532,7 @@ BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info ) 38 | if (!win || win == WND_OTHER_PROCESS || win == WND_DESKTOP) return FALSE; 39 | hwnd = win->obj.handle; /* make it a full handle */ 40 | 41 | - if (info->dwFlags) wparam = !(win->flags & WIN_NCACTIVATED); 42 | - else wparam = (hwnd == NtUserGetForegroundWindow()); 43 | + wparam = (win->flags & WIN_NCACTIVATED) != 0; 44 | 45 | release_win_ptr( win ); 46 | 47 | @@ -4541,7 +4540,7 @@ BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info ) 48 | send_notify_message( hwnd, WM_NCACTIVATE, wparam, 0, 0 ); 49 | 50 | user_driver->pFlashWindowEx( info ); 51 | - return wparam; 52 | + return (info->dwFlags & FLASHW_CAPTION) ? TRUE : wparam; 53 | } 54 | } 55 | 56 | -- 57 | 2.40.1 58 | 59 | -------------------------------------------------------------------------------- /patches/proton/PREFER_SDL.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c 2 | index f7627fb3bb8..9611cc037fe 100644 3 | --- a/dlls/winebus.sys/main.c 4 | +++ b/dlls/winebus.sys/main.c 5 | @@ -19,6 +19,7 @@ 6 | */ 7 | 8 | #include 9 | +#include 10 | #include 11 | 12 | #include "ntstatus.h" 13 | @@ -357,8 +358,15 @@ static DEVICE_OBJECT *bus_find_unix_device(UINT64 unix_device) 14 | 15 | static DEVICE_OBJECT *bus_find_device_from_vid_pid(const WCHAR *bus_name, struct device_desc *desc) 16 | { 17 | + static int once; 18 | struct device_extension *ext; 19 | 20 | + if (desc->prefer_sdl) { 21 | + 22 | + if (!once++) FIXME("Preferring SDL for inputs!\n"); 23 | + return NULL; 24 | + } 25 | + 26 | LIST_FOR_EACH_ENTRY(ext, &device_list, struct device_extension, entry) 27 | if (!wcscmp(ext->bus_name, bus_name) && ext->desc.vid == desc->vid && 28 | ext->desc.pid == desc->pid) return ext->device; 29 | diff --git a/dlls/winebus.sys/unixlib.c b/dlls/winebus.sys/unixlib.c 30 | index c3407e39b3f..2dd478b3888 100644 31 | --- a/dlls/winebus.sys/unixlib.c 32 | +++ b/dlls/winebus.sys/unixlib.c 33 | @@ -490,6 +490,7 @@ BOOL bus_event_queue_device_created(struct list *queue, struct unix_device *devi 34 | { 35 | ULONG size = sizeof(struct bus_event_entry); 36 | struct bus_event_entry *entry = malloc(size); 37 | + const char* prefer_sdl = NULL; 38 | if (!entry) return FALSE; 39 | 40 | if (unix_device_incref(device) == 1) /* being destroyed */ 41 | @@ -498,6 +499,10 @@ BOOL bus_event_queue_device_created(struct list *queue, struct unix_device *devi 42 | return FALSE; 43 | } 44 | 45 | + desc->prefer_sdl = FALSE; 46 | + prefer_sdl = getenv("WINE_PREFER_SDL"); 47 | + if (prefer_sdl && prefer_sdl[0] == '1') desc->prefer_sdl = TRUE; 48 | + 49 | entry->event.type = BUS_EVENT_TYPE_DEVICE_CREATED; 50 | entry->event.device = (UINT_PTR)device; 51 | entry->event.device_created.desc = *desc; 52 | diff --git a/dlls/winebus.sys/unixlib.h b/dlls/winebus.sys/unixlib.h 53 | index 731745bb9a4..3a0fc21ea0c 100644 54 | --- a/dlls/winebus.sys/unixlib.h 55 | +++ b/dlls/winebus.sys/unixlib.h 56 | @@ -38,6 +38,7 @@ struct device_desc 57 | UINT input; 58 | UINT uid; 59 | BOOL is_gamepad; 60 | + BOOL prefer_sdl; /* getenv must be called in unix code */ 61 | 62 | WCHAR manufacturer[MAX_PATH]; 63 | WCHAR product[MAX_PATH]; 64 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/Staging/0001-ntdll-Print-a-warning-message-specifying-the-wine-st.patch: -------------------------------------------------------------------------------- 1 | From 09ae5713ee29184ff4f295b04674ca0f9f815d39 Mon Sep 17 00:00:00 2001 2 | From: Sebastian Lackner 3 | Date: Thu, 2 Oct 2014 19:44:31 +0200 4 | Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging 5 | branch name and version. 6 | 7 | --- 8 | dlls/ntdll/loader.c | 15 +++++++++++++++ 9 | 1 file changed, 15 insertions(+) 10 | 11 | diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c 12 | index 105a7420dcc..e437bde4e8c 100644 13 | --- a/dlls/ntdll/loader.c 14 | +++ b/dlls/ntdll/loader.c 15 | @@ -43,6 +43,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay); 16 | WINE_DECLARE_DEBUG_CHANNEL(snoop); 17 | WINE_DECLARE_DEBUG_CHANNEL(loaddll); 18 | WINE_DECLARE_DEBUG_CHANNEL(imports); 19 | +WINE_DECLARE_DEBUG_CHANNEL(winediag); 20 | 21 | #ifdef _WIN64 22 | #define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232) 23 | @@ -4121,6 +4122,7 @@ void WINAPI LdrShutdownProcess(void) 24 | process_detach(); 25 | } 26 | 27 | +extern const char * CDECL wine_get_version(void); 28 | 29 | /****************************************************************** 30 | * RtlExitUserProcess (NTDLL.@) 31 | @@ -4604,6 +4606,9 @@ static void release_address_space(void) 32 | */ 33 | void loader_init( CONTEXT *context, void **entry ) 34 | { 35 | + OBJECT_ATTRIBUTES staging_event_attr; 36 | + UNICODE_STRING staging_event_string; 37 | + HANDLE staging_event; 38 | static int attach_done; 39 | NTSTATUS status; 40 | ULONG_PTR cookie; 41 | @@ -4702,6 +4707,16 @@ void loader_init( CONTEXT *context, void **entry ) 42 | if (NtCurrentTeb()->WowTebOffset) init_wow64( context ); 43 | #endif 44 | 45 | + RtlInitUnicodeString( &staging_event_string, L"\\__wine_staging_warn_event" ); 46 | + InitializeObjectAttributes( &staging_event_attr, &staging_event_string, OBJ_OPENIF, NULL, NULL ); 47 | + if (NtCreateEvent( &staging_event, EVENT_ALL_ACCESS, &staging_event_attr, NotificationEvent, FALSE ) == STATUS_SUCCESS) 48 | + { 49 | + FIXME_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version()); 50 | + FIXME_(winediag)("Please mention your exact version when filing bug reports on winehq.org.\n"); 51 | + } 52 | + else 53 | + WARN_(winediag)("wine-staging %s is a testing version containing experimental patches.\n", wine_get_version()); 54 | + 55 | NtCurrentTeb()->FlsSlots = fls_alloc_data(); 56 | 57 | if (!attach_done) /* first time around */ 58 | -- 59 | 2.46.2 60 | 61 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/pending/ntdll_add_wine_disable_sfn.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c 2 | index 870c5e39271..3162d36a803 100644 3 | --- a/dlls/ntdll/unix/file.c 4 | +++ b/dlls/ntdll/unix/file.c 5 | @@ -1511,16 +1511,20 @@ static BOOL append_entry( struct dir_data *data, const char *long_name, 6 | if (long_len == ARRAY_SIZE(long_nameW)) return TRUE; 7 | long_nameW[long_len] = 0; 8 | 9 | - if (short_name) 10 | - { 11 | - short_len = ntdll_umbstowcs( short_name, strlen(short_name), 12 | - short_nameW, ARRAY_SIZE( short_nameW ) - 1 ); 13 | - } 14 | - else /* generate a short name if necessary */ 15 | + short_len = 0; 16 | + 17 | + if (!disable_sfn) 18 | { 19 | - short_len = 0; 20 | - if (!is_legal_8dot3_name( long_nameW, long_len )) 21 | - short_len = hash_short_file_name( long_nameW, long_len, short_nameW ); 22 | + if (short_name) 23 | + { 24 | + short_len = ntdll_umbstowcs( short_name, strlen(short_name), 25 | + short_nameW, ARRAY_SIZE( short_nameW ) - 1 ); 26 | + } 27 | + else /* generate a short name if necessary */ 28 | + { 29 | + if (!is_legal_8dot3_name( long_nameW, long_len )) 30 | + short_len = hash_short_file_name( long_nameW, long_len, short_nameW ); 31 | + } 32 | } 33 | short_nameW[short_len] = 0; 34 | wcsupr( short_nameW ); 35 | diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c 36 | index 5f7f114b286..cbea0dc5d2d 100644 37 | --- a/dlls/ntdll/unix/loader.c 38 | +++ b/dlls/ntdll/unix/loader.c 39 | @@ -2152,6 +2152,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] = 40 | debugstr_pc, 41 | }; 42 | 43 | +BOOL disable_sfn; 44 | BOOL ac_odyssey; 45 | BOOL fsync_simulate_sched_quantum; 46 | BOOL alert_simulate_sched_quantum; 47 | @@ -2175,6 +2176,12 @@ static void hacks_init(void) 48 | ERR( "HACK: ram_reporting_bias %lldMB.\n", ram_reporting_bias / (1024 * 1024) ); 49 | } 50 | 51 | + env_str = getenv("WINE_DISABLE_SFN"); 52 | + if (env_str) 53 | + disable_sfn = !!atoi(env_str); 54 | + else if (main_argc > 1 && (strstr(main_argv[1], "Yakuza5.exe") )) 55 | + disable_sfn = TRUE; 56 | + 57 | env_str = getenv("WINE_SIMULATE_ASYNC_READ"); 58 | if (env_str) 59 | ac_odyssey = !!atoi(env_str); 60 | diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h 61 | index cae15947bbd..6403dad858d 100644 62 | --- a/dlls/ntdll/unix/unix_private.h 63 | +++ b/dlls/ntdll/unix/unix_private.h 64 | @@ -182,6 +182,7 @@ extern SYSTEM_CPU_INFORMATION cpu_info; 65 | extern struct ldt_copy __wine_ldt_copy; 66 | #endif 67 | 68 | +extern BOOL disable_sfn; 69 | extern BOOL ac_odyssey; 70 | extern BOOL fsync_simulate_sched_quantum; 71 | extern BOOL alert_simulate_sched_quantum; 72 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch: -------------------------------------------------------------------------------- 1 | From b6c918acf5996c494bece9efb1439fe00b81a274 Mon Sep 17 00:00:00 2001 2 | From: Alistair Leslie-Hughes 3 | Date: Fri, 1 Jun 2018 14:03:26 +1000 4 | Subject: [PATCH] winex11: Specify a default vulkan driver if one not found at 5 | build time 6 | 7 | We cannot specify it as a dependency since Debian Jessie has the 8 | vulkan library in backports and not everybody will have this mapped. 9 | --- 10 | dlls/winex11.drv/vulkan.c | 38 ++++++++++++++++---------------------- 11 | 1 file changed, 16 insertions(+), 22 deletions(-) 12 | 13 | diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c 14 | index f4fe202dfaf..1768444b2e5 100644 15 | --- a/dlls/winex11.drv/vulkan.c 16 | +++ b/dlls/winex11.drv/vulkan.c 17 | @@ -40,10 +40,12 @@ 18 | #include "wine/vulkan_driver.h" 19 | 20 | WINE_DEFAULT_DEBUG_CHANNEL(vulkan); 21 | - 22 | -#ifdef SONAME_LIBVULKAN 23 | WINE_DECLARE_DEBUG_CHANNEL(fps); 24 | 25 | +#ifndef SONAME_LIBVULKAN 26 | +#define SONAME_LIBVULKAN "" 27 | +#endif 28 | + 29 | static pthread_mutex_t vulkan_mutex; 30 | 31 | static XContext vulkan_hwnd_context; 32 | @@ -104,14 +106,23 @@ static void *vulkan_handle; 33 | 34 | static void wine_vk_init(void) 35 | { 36 | - init_recursive_mutex(&vulkan_mutex); 37 | + const char *libvulkan_candidates[] = {SONAME_LIBVULKAN, 38 | + "libvulkan.so.1", 39 | + "libvulkan.so", 40 | + NULL}; 41 | + int i; 42 | 43 | - if (!(vulkan_handle = dlopen(SONAME_LIBVULKAN, RTLD_NOW))) 44 | + for (i=0; libvulkan_candidates[i] && !vulkan_handle; i++) 45 | + vulkan_handle = dlopen(libvulkan_candidates[i], RTLD_NOW); 46 | + 47 | + if (!vulkan_handle) 48 | { 49 | - ERR("Failed to load %s.\n", SONAME_LIBVULKAN); 50 | + ERR("Failed to load vulkan library\n"); 51 | return; 52 | } 53 | 54 | + init_recursive_mutex(&vulkan_mutex); 55 | + 56 | #define LOAD_FUNCPTR(f) if (!(p##f = dlsym(vulkan_handle, #f))) goto fail 57 | #define LOAD_OPTIONAL_FUNCPTR(f) p##f = dlsym(vulkan_handle, #f) 58 | LOAD_FUNCPTR(vkCreateInstance); 59 | @@ -1273,33 +1273,3 @@ const struct vulkan_funcs *get_vulkan_driver(UINT version) 60 | 61 | return NULL; 62 | } 63 | - 64 | -#else /* No vulkan */ 65 | - 66 | -const struct vulkan_funcs *get_vulkan_driver(UINT version) 67 | -{ 68 | - ERR("Wine was built without Vulkan support.\n"); 69 | - return NULL; 70 | -} 71 | - 72 | -void destroy_vk_surface( HWND hwnd ) 73 | -{ 74 | -} 75 | - 76 | -void resize_vk_surfaces( HWND hwnd, Window active, int mask, XWindowChanges *changes ) 77 | -{ 78 | -} 79 | - 80 | -void sync_vk_surface( HWND hwnd, BOOL known_child ) 81 | -{ 82 | -} 83 | - 84 | -void invalidate_vk_surfaces(HWND hwnd) 85 | -{ 86 | -} 87 | - 88 | -void vulkan_thread_detach(void) 89 | -{ 90 | -} 91 | - 92 | -#endif /* SONAME_LIBVULKAN */ 93 | -- 94 | 2.35.1 95 | 96 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch: -------------------------------------------------------------------------------- 1 | From 1fbb361023f9474a3522762aae32ad64d056e37e Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= 3 | Date: Fri, 24 May 2019 15:09:35 +0300 4 | Subject: [PATCH] ntdll/server: Mark drive_c as case-insensitive when created 5 | MIME-Version: 1.0 6 | Content-Type: text/plain; charset=UTF-8 7 | Content-Transfer-Encoding: 8bit 8 | 9 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47099 10 | Signed-off-by: Gabriel Ivăncescu 11 | --- 12 | dlls/ntdll/unix/server.c | 43 ++++++++++++++++++++++++++++++++++++++++ 13 | 1 file changed, 43 insertions(+) 14 | 15 | diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c 16 | index ab9d99c4f47..f40897757e3 100644 17 | --- a/dlls/ntdll/unix/server.c 18 | +++ b/dlls/ntdll/unix/server.c 19 | @@ -49,6 +49,10 @@ 20 | #ifdef HAVE_SYS_UN_H 21 | #include 22 | #endif 23 | +#include 24 | +#ifdef HAVE_LINUX_IOCTL_H 25 | +#include 26 | +#endif 27 | #ifdef HAVE_SYS_PRCTL_H 28 | # include 29 | #endif 30 | @@ -83,6 +87,22 @@ 31 | 32 | WINE_DEFAULT_DEBUG_CHANNEL(server); 33 | 34 | +/* just in case... */ 35 | +#undef EXT2_IOC_GETFLAGS 36 | +#undef EXT2_IOC_SETFLAGS 37 | +#undef EXT4_CASEFOLD_FL 38 | + 39 | +#ifdef __linux__ 40 | + 41 | +/* Define the ext2 ioctls for handling extra attributes */ 42 | +#define EXT2_IOC_GETFLAGS _IOR('f', 1, long) 43 | +#define EXT2_IOC_SETFLAGS _IOW('f', 2, long) 44 | + 45 | +/* Case-insensitivity attribute */ 46 | +#define EXT4_CASEFOLD_FL 0x40000000 47 | + 48 | +#endif 49 | + 50 | #ifndef MSG_CMSG_CLOEXEC 51 | #define MSG_CMSG_CLOEXEC 0 52 | #endif 53 | @@ -1137,6 +1157,28 @@ static const char *init_server_dir( dev_t dev, ino_t ino ) 54 | } 55 | 56 | 57 | +/*********************************************************************** 58 | + * set_case_insensitive 59 | + * 60 | + * Make the supplied directory case insensitive, if available. 61 | + */ 62 | +static void set_case_insensitive(const char *dir) 63 | +{ 64 | +#if defined(EXT2_IOC_GETFLAGS) && defined(EXT2_IOC_SETFLAGS) && defined(EXT4_CASEFOLD_FL) 65 | + int flags, fd; 66 | + 67 | + if ((fd = open(dir, O_RDONLY | O_NONBLOCK | O_LARGEFILE)) == -1) 68 | + return; 69 | + if (ioctl(fd, EXT2_IOC_GETFLAGS, &flags) != -1 && !(flags & EXT4_CASEFOLD_FL)) 70 | + { 71 | + flags |= EXT4_CASEFOLD_FL; 72 | + ioctl(fd, EXT2_IOC_SETFLAGS, &flags); 73 | + } 74 | + close(fd); 75 | +#endif 76 | +} 77 | + 78 | + 79 | /*********************************************************************** 80 | * setup_config_dir 81 | * 82 | @@ -1173,6 +1215,7 @@ static int setup_config_dir(void) 83 | if (!mkdir( "dosdevices", 0777 )) 84 | { 85 | mkdir( "drive_c", 0777 ); 86 | + set_case_insensitive( "drive_c" ); 87 | symlink( "../drive_c", "dosdevices/c:" ); 88 | symlink( "/", "dosdevices/z:" ); 89 | } 90 | -- 91 | 2.34.1 92 | 93 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/pending/add-envvar-to-gate-media-converter.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dlls/winegstreamer/media-converter/lib.c b/dlls/winegstreamer/media-converter/lib.c 2 | index 4f7884c1178..bdbda22f697 100644 3 | --- a/dlls/winegstreamer/media-converter/lib.c 4 | +++ b/dlls/winegstreamer/media-converter/lib.c 5 | @@ -306,30 +306,54 @@ void dump_fozdb_close(struct dump_fozdb *db) 6 | bool media_converter_init(void) 7 | { 8 | GST_DEBUG_CATEGORY_INIT(media_converter_debug, 9 | - "protonmediaconverter", GST_DEBUG_FG_YELLOW, "Proton media converter"); 10 | + "protonmediaconverter", GST_DEBUG_FG_YELLOW, "Proton media converter"); 11 | 12 | - if (!GST_ELEMENT_REGISTER(protonvideoconverter, NULL)) 13 | + // Check if the PROTON_VIDEO_CONVERT environment variable is set to 0 14 | + // Only try to register if the envvar isn't set 15 | + const char *proton_video_convert = getenv("PROTON_VIDEO_CONVERT"); 16 | + if (!proton_video_convert || strcmp(proton_video_convert, "0") != 0) 17 | { 18 | - GST_ERROR("Failed to register protonvideoconverter."); 19 | - return false; 20 | + if (!GST_ELEMENT_REGISTER(protonvideoconverter, NULL)) 21 | + { 22 | + GST_ERROR("Failed to register protonvideoconverter."); 23 | + return false; 24 | + } 25 | } 26 | 27 | - if (!GST_ELEMENT_REGISTER(protonaudioconverter, NULL)) 28 | + // Check if the PROTON_AUDIO_CONVERT environment variable is set to 0 29 | + // Only try to register if the envvar isn't set 30 | + const char *proton_audio_convert = getenv("PROTON_AUDIO_CONVERT"); 31 | + if (!proton_audio_convert || strcmp(proton_audio_convert, "0") != 0) 32 | { 33 | - GST_ERROR("Failed to register protonaudioconverter."); 34 | - return false; 35 | + if (!GST_ELEMENT_REGISTER(protonaudioconverter, NULL)) 36 | + { 37 | + GST_ERROR("Failed to register protonaudioconverter."); 38 | + return false; 39 | + } 40 | } 41 | 42 | - if (!GST_ELEMENT_REGISTER(protonaudioconverterbin, NULL)) 43 | + // Check if the PROTON_AUDIO_CONVERT_BIN environment variable is set to 0 44 | + // Only try to register if the envvar isn't set 45 | + const char *proton_audio_convert_bin = getenv("PROTON_AUDIO_CONVERT_BIN"); 46 | + if (!proton_audio_convert_bin || strcmp(proton_audio_convert_bin, "0") != 0) 47 | { 48 | - GST_ERROR("Failed to register protonaudioconverterbin."); 49 | - return false; 50 | + if (!GST_ELEMENT_REGISTER(protonaudioconverterbin, NULL)) 51 | + { 52 | + GST_ERROR("Failed to register protonaudioconverterbin."); 53 | + return false; 54 | + } 55 | } 56 | 57 | - if (!GST_ELEMENT_REGISTER(protondemuxer, NULL)) 58 | + // Check if the PROTON_DEMUX environment variable is set to 0 59 | + // Only try to register if the envvar isn't set 60 | + const char *proton_demuxer = getenv("PROTON_DEMUX"); 61 | + if (!proton_demuxer || strcmp(proton_demuxer, "0") != 0) 62 | { 63 | - GST_ERROR("Failed to register protondemuxer."); 64 | - return false; 65 | + if (!GST_ELEMENT_REGISTER(protondemuxer, NULL)) 66 | + { 67 | + GST_ERROR("Failed to register protondemuxer."); 68 | + return false; 69 | + } 70 | } 71 | 72 | return true; 73 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0006-winecfg-Add-a-keyboard-scancode-detection-toggle-opt.patch: -------------------------------------------------------------------------------- 1 | From e3594ff93e42a000fb6b16023a21f2222b61d307 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Fri, 6 Jan 2023 09:27:18 +0100 4 | Subject: [PATCH 6/9] winecfg: Add a keyboard scancode detection toggle option. 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30984 7 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605 8 | --- 9 | programs/winecfg/input.c | 13 +++++++++++++ 10 | programs/winecfg/resource.h | 1 + 11 | programs/winecfg/winecfg.rc | 1 + 12 | 3 files changed, 15 insertions(+) 13 | 14 | diff --git a/programs/winecfg/input.c b/programs/winecfg/input.c 15 | index f2f035df80f..a9d83b45f00 100644 16 | --- a/programs/winecfg/input.c 17 | +++ b/programs/winecfg/input.c 18 | @@ -65,6 +65,11 @@ static void init_dialog( HWND dialog ) 19 | else SendMessageW( layouts, CB_SELECTSTRING, -1, (LPARAM)buffer ); 20 | free( buffer ); 21 | 22 | + buffer = get_reg_key( config_key, keypath( L"X11 Driver" ), L"KeyboardScancodeDetect", L"Y" ); 23 | + if (IS_OPTION_TRUE( *buffer )) CheckDlgButton( dialog, IDC_KEYBOARD_SCANCODE_DETECT, BST_CHECKED ); 24 | + else CheckDlgButton( dialog, IDC_KEYBOARD_SCANCODE_DETECT, BST_UNCHECKED ); 25 | + free( buffer ); 26 | + 27 | updating_ui = FALSE; 28 | } 29 | 30 | @@ -93,6 +98,13 @@ static void on_keyboard_layout_changed( HWND dialog ) 31 | } 32 | } 33 | 34 | +static void on_keyboard_scancode_detect_clicked( HWND dialog ) 35 | +{ 36 | + BOOL checked = IsDlgButtonChecked( dialog, IDC_KEYBOARD_SCANCODE_DETECT ) == BST_CHECKED; 37 | + if (checked) set_reg_key( config_key, keypath( L"X11 Driver" ), L"KeyboardScancodeDetect", L"Y" ); 38 | + else set_reg_key( config_key, keypath( L"X11 Driver" ), L"KeyboardScancodeDetect", L"N" ); 39 | +} 40 | + 41 | INT_PTR CALLBACK InputDlgProc( HWND dialog, UINT message, WPARAM wparam, LPARAM lparam ) 42 | { 43 | TRACE( "dialog %p, message %#x, wparam %#Ix, lparam %#Ix\n", dialog, message, wparam, lparam ); 44 | @@ -112,6 +124,7 @@ INT_PTR CALLBACK InputDlgProc( HWND dialog, UINT message, WPARAM wparam, LPARAM 45 | switch (LOWORD(wparam)) 46 | { 47 | case IDC_FULLSCREEN_GRAB: on_fullscreen_grab_clicked( dialog ); break; 48 | + case IDC_KEYBOARD_SCANCODE_DETECT: on_keyboard_scancode_detect_clicked( dialog ); break; 49 | } 50 | break; 51 | 52 | diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h 53 | index 485bc18a217..e84cd1a2530 100644 54 | --- a/programs/winecfg/resource.h 55 | +++ b/programs/winecfg/resource.h 56 | @@ -232,5 +232,6 @@ 57 | /* input tab */ 58 | #define IDC_FULLSCREEN_GRAB 1501 59 | #define IDC_KEYBOARD_LAYOUT 1502 60 | +#define IDC_KEYBOARD_SCANCODE_DETECT 1503 61 | 62 | #define IDS_INPUT_AUTO_DETECT_LAYOUT 8501 63 | diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc 64 | index e0742794357..4d252b43564 100644 65 | --- a/programs/winecfg/winecfg.rc 66 | +++ b/programs/winecfg/winecfg.rc 67 | @@ -339,6 +339,7 @@ BEGIN 68 | GROUPBOX "Keyboard settings",IDC_STATIC,8,70,244,64 69 | LTEXT "&Layout:",IDC_STATIC,15,82,230,8 70 | COMBOBOX IDC_KEYBOARD_LAYOUT,110,80,135,60,CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP 71 | + CONTROL "Enable keyboard scancode auto-detection",IDC_KEYBOARD_SCANCODE_DETECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,96,230,10 72 | END 73 | 74 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 75 | -- 76 | 2.39.1 77 | 78 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0003-winex11-Write-supported-keyboard-layout-list-in-regi.patch: -------------------------------------------------------------------------------- 1 | From 3d27835e97b472ed46ffbfd48bc1e16a30d1ff61 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Fri, 6 Jan 2023 08:09:11 +0100 4 | Subject: [PATCH] winex11: Write supported keyboard layout list in registry. 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30984 7 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605 8 | --- 9 | dlls/winex11.drv/keyboard.c | 21 +++++++++++++++++++++ 10 | dlls/winex11.drv/x11drv.h | 4 ++++ 11 | dlls/winex11.drv/x11drv_main.c | 17 +++++++++++++++++ 12 | 3 files changed, 42 insertions(+) 13 | 14 | diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c 15 | index 5c7f6c37276..1846bd923a5 100644 16 | --- a/dlls/winex11.drv/keyboard.c 17 | +++ b/dlls/winex11.drv/keyboard.c 18 | @@ -1084,6 +1084,27 @@ static const WORD xfree86_vendor_key_vkey[256] = 19 | 0, 0, 0, 0, 0, 0, 0, 0 /* 1008FFF8 */ 20 | }; 21 | 22 | +WCHAR *x11drv_get_keyboard_layout_list( DWORD *length ) 23 | +{ 24 | + WCHAR *tmp, *layouts = calloc( 1, sizeof(WCHAR) ); 25 | + int i; 26 | + 27 | + for (i = 0, *length = 1; main_key_tab[i].comment; i++) 28 | + { 29 | + const char *name = main_key_tab[i].comment; 30 | + int len = strlen( name ) + 1; 31 | + 32 | + if (!(tmp = realloc( layouts, (*length + len) * sizeof(WCHAR) ))) return layouts; 33 | + layouts = tmp; 34 | + 35 | + asciiz_to_unicode( layouts + *length - 1, name ); 36 | + layouts[*length + len - 1] = 0; 37 | + (*length) += len; 38 | + } 39 | + 40 | + return layouts; 41 | +} 42 | + 43 | /* Returns the Windows virtual key code associated with the X event */ 44 | /* kbd_section must be held */ 45 | static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e) 46 | diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h 47 | index 2917579927c..da501ad4618 100644 48 | --- a/dlls/winex11.drv/x11drv.h 49 | +++ b/dlls/winex11.drv/x11drv.h 50 | @@ -701,6 +701,10 @@ extern BOOL xinerama_get_fullscreen_monitors( const RECT *rect, long *indices ); 51 | extern void xinerama_init( unsigned int width, unsigned int height ); 52 | extern void init_recursive_mutex( pthread_mutex_t *mutex ); 53 | 54 | +/* keyboard.c */ 55 | + 56 | +extern WCHAR *x11drv_get_keyboard_layout_list( DWORD *size ); 57 | + 58 | #define DEPTH_COUNT 3 59 | extern const unsigned int *depths; 60 | 61 | diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c 62 | index 70212a067b0..73b2237778b 100644 63 | --- a/dlls/winex11.drv/x11drv_main.c 64 | +++ b/dlls/winex11.drv/x11drv_main.c 65 | @@ -446,6 +446,19 @@ static HKEY create_hkcu_key( const char *name ) 66 | return reg_open_hkcu_key( name, TRUE ); 67 | } 68 | 69 | +static BOOL set_reg_value( HKEY hkey, const WCHAR *name, UINT type, const void *value, DWORD count ) 70 | +{ 71 | + unsigned int name_size = name ? lstrlenW( name ) * sizeof(WCHAR) : 0; 72 | + UNICODE_STRING nameW = { name_size, name_size, (WCHAR *)name }; 73 | + return !NtSetValueKey( hkey, &nameW, 0, type, value, count ); 74 | +} 75 | + 76 | +static void set_reg_string_value( HKEY hkey, const char *name, const WCHAR *value, DWORD count ) 77 | +{ 78 | + WCHAR nameW[64]; 79 | + asciiz_to_unicode( nameW, name ); 80 | + set_reg_value( hkey, nameW, REG_MULTI_SZ, value, count ); 81 | +} 82 | 83 | ULONG query_reg_value( HKEY hkey, const WCHAR *name, KEY_VALUE_PARTIAL_INFORMATION *info, ULONG size ) 84 | { 85 | @@ -561,6 +574,10 @@ static void setup_options(void) 86 | if (!get_config_key( hkey, appkey, "GrabFullscreen", buffer, sizeof(buffer) )) 87 | grab_fullscreen = IS_OPTION_TRUE( buffer[0] ); 88 | 89 | + p = x11drv_get_keyboard_layout_list( &len ); 90 | + if (p) set_reg_string_value( hkey, "KeyboardLayoutList", p, len * sizeof(WCHAR) ); 91 | + free( p ); 92 | + 93 | if (!get_config_key( hkey, appkey, "ScreenDepth", buffer, sizeof(buffer) )) 94 | default_visual.depth = wcstol( buffer, NULL, 0 ); 95 | 96 | -- 97 | 2.42.0 98 | 99 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0002-winex11-Always-create-the-HKCU-configuration-registr.patch: -------------------------------------------------------------------------------- 1 | From 9b1c1240b270142564a8ef9350720c92004efcc3 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Fri, 6 Jan 2023 11:22:10 +0100 4 | Subject: [PATCH 2/9] winex11: Always create the HKCU configuration registry 5 | key. 6 | 7 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30984 8 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605 9 | --- 10 | dlls/winex11.drv/x11drv_main.c | 67 ++++++++++++++++++++++++++++++++-- 11 | 1 file changed, 64 insertions(+), 3 deletions(-) 12 | 13 | diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c 14 | index 797e4f92d38..e04bdedd43a 100644 15 | --- a/dlls/winex11.drv/x11drv_main.c 16 | +++ b/dlls/winex11.drv/x11drv_main.c 17 | @@ -356,11 +356,61 @@ HKEY reg_open_key( HKEY root, const WCHAR *name, ULONG name_len ) 18 | return NtOpenKeyEx( &ret, MAXIMUM_ALLOWED, &attr, 0 ) ? 0 : ret; 19 | } 20 | 21 | +/* wrapper for NtCreateKey that creates the key recursively if necessary */ 22 | +static HKEY reg_create_key( HKEY root, const WCHAR *name, ULONG name_len, 23 | + DWORD options, DWORD *disposition ) 24 | +{ 25 | + UNICODE_STRING nameW = { name_len, name_len, (WCHAR *)name }; 26 | + OBJECT_ATTRIBUTES attr; 27 | + NTSTATUS status; 28 | + HANDLE ret; 29 | 30 | -HKEY open_hkcu_key( const char *name ) 31 | + attr.Length = sizeof(attr); 32 | + attr.RootDirectory = root; 33 | + attr.ObjectName = &nameW; 34 | + attr.Attributes = 0; 35 | + attr.SecurityDescriptor = NULL; 36 | + attr.SecurityQualityOfService = NULL; 37 | + 38 | + status = NtCreateKey( &ret, MAXIMUM_ALLOWED, &attr, 0, NULL, options, disposition ); 39 | + if (status == STATUS_OBJECT_NAME_NOT_FOUND) 40 | + { 41 | + static const WCHAR registry_rootW[] = { '\\','R','e','g','i','s','t','r','y','\\' }; 42 | + DWORD pos = 0, i = 0, len = name_len / sizeof(WCHAR); 43 | + 44 | + /* don't try to create registry root */ 45 | + if (!root && len > ARRAY_SIZE(registry_rootW) && 46 | + !memcmp( name, registry_rootW, sizeof(registry_rootW) )) 47 | + i += ARRAY_SIZE(registry_rootW); 48 | + 49 | + while (i < len && name[i] != '\\') i++; 50 | + if (i == len) return 0; 51 | + for (;;) 52 | + { 53 | + unsigned int subkey_options = options; 54 | + if (i < len) subkey_options &= ~(REG_OPTION_CREATE_LINK | REG_OPTION_OPEN_LINK); 55 | + nameW.Buffer = (WCHAR *)name + pos; 56 | + nameW.Length = (i - pos) * sizeof(WCHAR); 57 | + status = NtCreateKey( &ret, MAXIMUM_ALLOWED, &attr, 0, NULL, subkey_options, disposition ); 58 | + 59 | + if (attr.RootDirectory != root) NtClose( attr.RootDirectory ); 60 | + if (!NT_SUCCESS(status)) return 0; 61 | + if (i == len) break; 62 | + attr.RootDirectory = ret; 63 | + while (i < len && name[i] == '\\') i++; 64 | + pos = i; 65 | + while (i < len && name[i] != '\\') i++; 66 | + } 67 | + } 68 | + return ret; 69 | +} 70 | + 71 | +static HKEY reg_open_hkcu_key( const char *name, BOOL create ) 72 | { 73 | WCHAR bufferW[256]; 74 | static HKEY hkcu; 75 | + DWORD disp; 76 | + HKEY key; 77 | 78 | if (!hkcu) 79 | { 80 | @@ -385,7 +435,18 @@ HKEY open_hkcu_key( const char *name ) 81 | hkcu = reg_open_key( NULL, bufferW, len * sizeof(WCHAR) ); 82 | } 83 | 84 | - return reg_open_key( hkcu, bufferW, asciiz_to_unicode( bufferW, name ) - sizeof(WCHAR) ); 85 | + if ((key = reg_open_key( hkcu, bufferW, asciiz_to_unicode( bufferW, name ) - sizeof(WCHAR) )) || !create) return key; 86 | + return reg_create_key( hkcu, bufferW, asciiz_to_unicode( bufferW, name ) - sizeof(WCHAR), 0, &disp ); 87 | +} 88 | + 89 | +HKEY open_hkcu_key( const char *name ) 90 | +{ 91 | + return reg_open_hkcu_key( name, FALSE ); 92 | +} 93 | + 94 | +static HKEY create_hkcu_key( const char *name ) 95 | +{ 96 | + return reg_open_hkcu_key( name, TRUE ); 97 | } 98 | 99 | 100 | @@ -449,7 +510,7 @@ static void setup_options(void) 101 | DWORD len; 102 | 103 | /* @@ Wine registry key: HKCU\Software\Wine\X11 Driver */ 104 | - hkey = open_hkcu_key( "Software\\Wine\\X11 Driver" ); 105 | + hkey = create_hkcu_key( "Software\\Wine\\X11 Driver" ); 106 | 107 | /* open the app-specific key */ 108 | 109 | -- 110 | 2.39.1 111 | 112 | -------------------------------------------------------------------------------- /patches/proton/83-nv_low_latency_wine.patch: -------------------------------------------------------------------------------- 1 | From a614ec584bc19995fdfb535ae4cef81efe9966df Mon Sep 17 00:00:00 2001 2 | From: Eric Sullivan 3 | Date: Wed, 11 Oct 2023 15:43:36 -0700 4 | Subject: [PATCH] winevulkan: Add support for VK_NV_low_latency2 5 | 6 | To support VK_NV_low_latency2 a frame ID should be provided for each 7 | call to vkQueueSubmit. This commit adds a path for fshack to provide 8 | a frame ID when it submits its upscaling work, when low latency mode 9 | is enabled. 10 | --- 11 | dlls/winevulkan/make_vulkan | 3 +++ 12 | dlls/winevulkan/vulkan.c | 29 +++++++++++++++++++++++++++++ 13 | dlls/winevulkan/vulkan_private.h | 1 + 14 | 3 files changed, 33 insertions(+) 15 | 16 | diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan 17 | index f5d2a5a9575..0c97c068f5f 100755 18 | --- a/dlls/winevulkan/make_vulkan 19 | +++ b/dlls/winevulkan/make_vulkan 20 | @@ -214,6 +214,9 @@ FUNCTION_OVERRIDES = { 21 | # VK_KHR_synchronization2 22 | "vkQueueSubmit2KHR" : {"dispatch" : True, "extra_param" : "pSubmits"}, 23 | 24 | + # VK_NV_low_latency2 25 | + "vkSetLatencySleepModeNV" : {"dispatch": True, "driver": False}, 26 | + 27 | # Custom functions 28 | "wine_vkAcquireKeyedMutex" : {"dispatch": True}, 29 | "wine_vkReleaseKeyedMutex" : {"dispatch": True}, 30 | diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c 31 | index cf2af817ecd..d677ef777f1 100644 32 | --- a/dlls/winevulkan/vulkan.c 33 | +++ b/dlls/winevulkan/vulkan.c 34 | @@ -922,6 +922,24 @@ static void wine_vk_instance_free(struct wine_instance *instance) 35 | free(instance); 36 | } 37 | 38 | +VkResult wine_vkSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV *pSleepModeInfo) 39 | +{ 40 | + VkLatencySleepModeInfoNV sleep_mode_info_host; 41 | + 42 | + struct wine_device* wine_device = wine_device_from_handle(device); 43 | + struct wine_swapchain* wine_swapchain = wine_swapchain_from_handle(swapchain); 44 | + 45 | + wine_device->low_latency_enabled = pSleepModeInfo->lowLatencyMode; 46 | + 47 | + sleep_mode_info_host.sType = VK_STRUCTURE_TYPE_LATENCY_SLEEP_MODE_INFO_NV; 48 | + sleep_mode_info_host.pNext = NULL; 49 | + sleep_mode_info_host.lowLatencyMode = pSleepModeInfo->lowLatencyMode; 50 | + sleep_mode_info_host.lowLatencyBoost = pSleepModeInfo->lowLatencyBoost; 51 | + sleep_mode_info_host.minimumIntervalUs = pSleepModeInfo->minimumIntervalUs; 52 | + 53 | + return wine_device->funcs.p_vkSetLatencySleepModeNV(wine_device->host_device, wine_swapchain->host_swapchain, &sleep_mode_info_host); 54 | +} 55 | + 56 | VkResult wine_vkAllocateCommandBuffers(VkDevice handle, const VkCommandBufferAllocateInfo *allocate_info, 57 | VkCommandBuffer *buffers ) 58 | { 59 | @@ -3951,6 +3969,8 @@ VkResult fshack_vk_queue_present(VkQueue queue_handle, const VkPresentInfoKHR *p 60 | if (n_hacks > 0) 61 | { 62 | VkPipelineStageFlags waitStage, *waitStages, *waitStages_arr = NULL; 63 | + VkLatencySubmissionPresentIdNV latencySubmitInfo; 64 | + VkPresentIdKHR *present_id; 65 | 66 | if (pPresentInfo->waitSemaphoreCount > 1) 67 | { 68 | @@ -3974,6 +3994,15 @@ VkResult fshack_vk_queue_present(VkQueue queue_handle, const VkPresentInfoKHR *p 69 | submitInfo.signalSemaphoreCount = 1; 70 | submitInfo.pSignalSemaphores = &blit_sema; 71 | 72 | + if ((queue->device->low_latency_enabled) && 73 | + (present_id = wine_vk_find_struct(&our_presentInfo, PRESENT_ID_KHR))) 74 | + { 75 | + latencySubmitInfo.sType = VK_STRUCTURE_TYPE_LATENCY_SUBMISSION_PRESENT_ID_NV; 76 | + latencySubmitInfo.pNext = NULL; 77 | + latencySubmitInfo.presentID = *present_id->pPresentIds; 78 | + submitInfo.pNext = &latencySubmitInfo; 79 | + } 80 | + 81 | res = queue->device->funcs.p_vkQueueSubmit(queue->host_queue, 1, &submitInfo, VK_NULL_HANDLE); 82 | if (res != VK_SUCCESS) 83 | ERR("vkQueueSubmit: %d\n", res); 84 | diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h 85 | index ecd148ea48a..4d55eff5059 100644 86 | --- a/dlls/winevulkan/vulkan_private.h 87 | +++ b/dlls/winevulkan/vulkan_private.h 88 | @@ -99,6 +99,7 @@ struct wine_device 89 | uint64_t sem_poll_update_value; /* set to sem_poll_update.value by signaller thread once update is processed. */ 90 | unsigned int allocated_fence_ops_count; 91 | BOOL keyed_mutexes_enabled; 92 | + BOOL low_latency_enabled; 93 | }; 94 | 95 | static inline struct wine_device *wine_device_from_handle(VkDevice handle) 96 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/pending/5671.patch: -------------------------------------------------------------------------------- 1 | From b020348b843b6ed4fff718877913103d9c27ce49 Mon Sep 17 00:00:00 2001 2 | From: Etaash Mathamsetty 3 | Date: Tue, 14 May 2024 19:48:18 -0400 4 | Subject: [PATCH 1/4] shell32: Fake success file_operation_SetOperationFlags. 5 | 6 | --- 7 | dlls/shell32/shlfileop.c | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c 11 | index a7e88c813d2..63779600ced 100644 12 | --- a/dlls/shell32/shlfileop.c 13 | +++ b/dlls/shell32/shlfileop.c 14 | @@ -1874,7 +1874,7 @@ static HRESULT WINAPI file_operation_SetOperationFlags(IFileOperation *iface, DW 15 | { 16 | FIXME("(%p, %lx): stub.\n", iface, flags); 17 | 18 | - return E_NOTIMPL; 19 | + return S_OK; 20 | } 21 | 22 | static HRESULT WINAPI file_operation_SetProgressMessage(IFileOperation *iface, LPCWSTR message) 23 | -- 24 | GitLab 25 | 26 | 27 | From 8201fd2217ed72858141f376468b0c1f56eff8ce Mon Sep 17 00:00:00 2001 28 | From: Etaash Mathamsetty 29 | Date: Tue, 14 May 2024 19:50:29 -0400 30 | Subject: [PATCH 2/4] shell32: Add semi-stub for file_operation_MoveItem. 31 | 32 | --- 33 | dlls/shell32/shlfileop.c | 37 +++++++++++++++++++++++++++++++++++-- 34 | 1 file changed, 35 insertions(+), 2 deletions(-) 35 | 36 | diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c 37 | index 63779600ced..c3602a46928 100644 38 | --- a/dlls/shell32/shlfileop.c 39 | +++ b/dlls/shell32/shlfileop.c 40 | @@ -1937,9 +1937,42 @@ static HRESULT WINAPI file_operation_RenameItems(IFileOperation *iface, IUnknown 41 | static HRESULT WINAPI file_operation_MoveItem(IFileOperation *iface, IShellItem *item, IShellItem *folder, 42 | LPCWSTR name, IFileOperationProgressSink *sink) 43 | { 44 | - FIXME("(%p, %p, %p, %s, %p): stub.\n", iface, item, folder, debugstr_w(name), sink); 45 | + LPWSTR source; 46 | + LPWSTR dest; 47 | + HRESULT hr; 48 | + BOOL ret; 49 | + FIXME("(%p, %p, %p, %s, %p): semi-stub.\n", iface, item, folder, debugstr_w(name), sink); 50 | 51 | - return E_NOTIMPL; 52 | + hr = IShellItem_GetDisplayName(item, SIGDN_FILESYSPATH, &source); 53 | + 54 | + if (FAILED(hr)) 55 | + return hr; 56 | + 57 | + hr = IShellItem_GetDisplayName(folder, SIGDN_FILESYSPATH, &dest); 58 | + 59 | + if (FAILED(hr)) 60 | + { 61 | + CoTaskMemFree(source); 62 | + return hr; 63 | + } 64 | + 65 | + dest = CoTaskMemRealloc(dest, (lstrlenW(dest) + lstrlenW(name) + 2) * sizeof(WCHAR)); 66 | + 67 | + if (!dest) 68 | + { 69 | + CoTaskMemFree(source); 70 | + return E_OUTOFMEMORY; 71 | + } 72 | + 73 | + wcscat(dest, L"\\"); 74 | + wcscat(dest, name); 75 | + 76 | + ret = MoveFileW(source, dest); 77 | + 78 | + CoTaskMemFree(source); 79 | + CoTaskMemFree(dest); 80 | + 81 | + return ret ? S_OK : E_FAIL; 82 | } 83 | 84 | static HRESULT WINAPI file_operation_MoveItems(IFileOperation *iface, IUnknown *items, IShellItem *folder) 85 | -- 86 | GitLab 87 | 88 | 89 | From cc808a4a2e2cf1fb577642f88468983c77592e44 Mon Sep 17 00:00:00 2001 90 | From: Etaash Mathamsetty 91 | Date: Tue, 14 May 2024 19:52:15 -0400 92 | Subject: [PATCH 3/4] shell32: Fake success for 93 | file_operation_PerformOperations. 94 | 95 | --- 96 | dlls/shell32/shlfileop.c | 2 +- 97 | 1 file changed, 1 insertion(+), 1 deletion(-) 98 | 99 | diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c 100 | index c3602a46928..4ed9c64a3ce 100644 101 | --- a/dlls/shell32/shlfileop.c 102 | +++ b/dlls/shell32/shlfileop.c 103 | @@ -2025,7 +2025,7 @@ static HRESULT WINAPI file_operation_PerformOperations(IFileOperation *iface) 104 | { 105 | FIXME("(%p): stub.\n", iface); 106 | 107 | - return E_NOTIMPL; 108 | + return S_OK; 109 | } 110 | 111 | static HRESULT WINAPI file_operation_GetAnyOperationsAborted(IFileOperation *iface, BOOL *aborted) 112 | -- 113 | GitLab 114 | 115 | 116 | From 71f2f49ab41aeb9ff9acab744bfbb1e5e0c2cd93 Mon Sep 17 00:00:00 2001 117 | From: Etaash Mathamsetty 118 | Date: Tue, 14 May 2024 19:52:58 -0400 119 | Subject: [PATCH 4/4] shell32: Fake success for 120 | file_operation_GetAnyOperationsAborted. 121 | 122 | --- 123 | dlls/shell32/shlfileop.c | 4 +++- 124 | 1 file changed, 3 insertions(+), 1 deletion(-) 125 | 126 | diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c 127 | index 4ed9c64a3ce..f4b3ae1c25b 100644 128 | --- a/dlls/shell32/shlfileop.c 129 | +++ b/dlls/shell32/shlfileop.c 130 | @@ -2032,7 +2032,9 @@ static HRESULT WINAPI file_operation_GetAnyOperationsAborted(IFileOperation *ifa 131 | { 132 | FIXME("(%p, %p): stub.\n", iface, aborted); 133 | 134 | - return E_NOTIMPL; 135 | + *aborted = FALSE; 136 | + 137 | + return S_OK; 138 | } 139 | 140 | static const IFileOperationVtbl file_operation_vtbl = 141 | -- 142 | GitLab 143 | 144 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/loader-KeyboardLayouts/0002-user32-Improve-GetKeyboardLayoutList.patch: -------------------------------------------------------------------------------- 1 | From f57e7a06cffc47773c647a10ed4d298b58fbd408 Mon Sep 17 00:00:00 2001 2 | From: Alistair Leslie-Hughes 3 | Date: Tue, 9 Jul 2019 14:13:28 +1000 4 | Subject: [PATCH] user32: Do not enumerate the registry in 5 | GetKeyboardLayoutList(). 6 | 7 | This function returns the current list of *installed* Keyboard layouts 8 | not the complete list from the registry. 9 | --- 10 | dlls/user32/input.c | 1 - 11 | dlls/user32/tests/input.c | 35 +++++++++++++++++++++++++++++++++++ 12 | dlls/win32u/input.c | 33 +-------------------------------- 13 | 3 files changed, 36 insertions(+), 33 deletions(-) 14 | 15 | diff --git a/dlls/user32/input.c b/dlls/user32/input.c 16 | index c5387cf9212..2507a86e3b6 100644 17 | --- a/dlls/user32/input.c 18 | +++ b/dlls/user32/input.c 19 | @@ -494,7 +494,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout ) 20 | return FALSE; 21 | } 22 | 23 | - 24 | /*********************************************************************** 25 | * EnableMouseInPointer (USER32.@) 26 | */ 27 | diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c 28 | index bf913b8e6a6..8ac46bedc71 100644 29 | --- a/dlls/user32/tests/input.c 30 | +++ b/dlls/user32/tests/input.c 31 | @@ -4837,6 +4837,40 @@ static void test_EnableMouseInPointer( char **argv, BOOL enable ) 32 | CloseHandle( info.hProcess ); 33 | } 34 | 35 | +static void test_GetKeyboardLayoutList(void) 36 | +{ 37 | + int cnt, cnt2; 38 | + HKL *layouts; 39 | + ULONG_PTR baselayout; 40 | + LANGID langid; 41 | + 42 | + baselayout = GetUserDefaultLCID(); 43 | + langid = PRIMARYLANGID(LANGIDFROMLCID(baselayout)); 44 | + if (langid == LANG_CHINESE || langid == LANG_JAPANESE || langid == LANG_KOREAN) 45 | + baselayout = MAKELONG( baselayout, 0xe001 ); /* IME */ 46 | + else 47 | + baselayout |= baselayout << 16; 48 | + 49 | + cnt = GetKeyboardLayoutList(0, NULL); 50 | + /* Most users will not have more than a few keyboard layouts installed at a time. */ 51 | + ok(cnt > 0 && cnt < 10, "Layout count %d\n", cnt); 52 | + if (cnt > 0) 53 | + { 54 | + layouts = HeapAlloc(GetProcessHeap(), 0, sizeof(*layouts) * cnt ); 55 | + 56 | + cnt2 = GetKeyboardLayoutList(cnt, layouts); 57 | + ok(cnt == cnt2, "wrong value %d!=%d\n", cnt, cnt2); 58 | + for(cnt = 0; cnt < cnt2; cnt++) 59 | + { 60 | + if(layouts[cnt] == (HKL)baselayout) 61 | + break; 62 | + } 63 | + ok(cnt < cnt2, "Didnt find current keyboard\n"); 64 | + 65 | + HeapFree(GetProcessHeap(), 0, layouts); 66 | + } 67 | +} 68 | + 69 | START_TEST(input) 70 | { 71 | char **argv; 72 | @@ -4887,6 +4921,7 @@ START_TEST(input) 73 | test_GetRawInputBuffer(); 74 | test_RegisterRawInputDevices(); 75 | test_rawinput(argv[0]); 76 | + test_GetKeyboardLayoutList(); 77 | test_DefRawInputProc(); 78 | 79 | if(pGetMouseMovePointsEx) 80 | diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c 81 | index fd16d03f733..fb452843803 100644 82 | --- a/dlls/win32u/input.c 83 | +++ b/dlls/win32u/input.c 84 | @@ -934,11 +934,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags ) 85 | */ 86 | UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts ) 87 | { 88 | - char buffer[4096]; 89 | - KEY_NODE_INFORMATION *key_info = (KEY_NODE_INFORMATION *)buffer; 90 | - KEY_VALUE_PARTIAL_INFORMATION *value_info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer; 91 | - DWORD count, tmp, i = 0; 92 | - HKEY hkey, subkey; 93 | + DWORD count; 94 | HKL layout; 95 | 96 | TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts ); 97 | @@ -1277,33 +1273,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts ) 98 | if (size && layouts) 99 | { 100 | layouts[count - 1] = layout; 101 | - if (count == size) return count; 102 | - } 103 | - 104 | - if ((hkey = reg_open_key( NULL, keyboard_layouts_keyW, sizeof(keyboard_layouts_keyW) ))) 105 | - { 106 | - while (!NtEnumerateKey( hkey, i++, KeyNodeInformation, key_info, 107 | - sizeof(buffer) - sizeof(WCHAR), &tmp )) 108 | - { 109 | - if (!(subkey = reg_open_key( hkey, key_info->Name, key_info->NameLength ))) continue; 110 | - key_info->Name[key_info->NameLength / sizeof(WCHAR)] = 0; 111 | - tmp = wcstoul( key_info->Name, NULL, 16 ); 112 | - if (query_reg_ascii_value( subkey, "Layout Id", value_info, sizeof(buffer) ) && 113 | - value_info->Type == REG_SZ) 114 | - tmp = 0xf000 | (wcstoul( (const WCHAR *)value_info->Data, NULL, 16 ) & 0xfff); 115 | - NtClose( subkey ); 116 | - 117 | - tmp = MAKELONG( LOWORD( layout ), LOWORD( tmp ) ); 118 | - if (layout == UlongToHandle( tmp )) continue; 119 | - 120 | - count++; 121 | - if (size && layouts) 122 | - { 123 | - layouts[count - 1] = UlongToHandle( tmp ); 124 | - if (count == size) break; 125 | - } 126 | - } 127 | - NtClose( hkey ); 128 | } 129 | 130 | return count; 131 | -- 132 | 2.39.0 133 | 134 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0005-winex11-Use-the-user-configured-keyboard-layout-if-a.patch: -------------------------------------------------------------------------------- 1 | From 4c7d3e59dc62e62aac5ce273494e1a7cb5349bd1 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Fri, 6 Jan 2023 08:09:11 +0100 4 | Subject: [PATCH] winex11: Use the user configured keyboard layout if any. 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30984 7 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605 8 | --- 9 | dlls/winex11.drv/keyboard.c | 33 +++++++++++++++++++++++++++------ 10 | dlls/winex11.drv/x11drv.h | 2 ++ 11 | dlls/winex11.drv/x11drv_main.c | 4 ++++ 12 | 3 files changed, 33 insertions(+), 6 deletions(-) 13 | 14 | diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c 15 | index 1846bd923a5..fe87ae2235d 100644 16 | --- a/dlls/winex11.drv/keyboard.c 17 | +++ b/dlls/winex11.drv/keyboard.c 18 | @@ -929,7 +929,6 @@ static const struct { 19 | 20 | {0, NULL, NULL, NULL, NULL} /* sentinel */ 21 | }; 22 | -static unsigned kbd_layout=0; /* index into above table of layouts */ 23 | 24 | /* maybe more of these scancodes should be extended? */ 25 | /* extended must be set for ALT_R, CTRL_R, 26 | @@ -1084,6 +1083,26 @@ static const WORD xfree86_vendor_key_vkey[256] = 27 | 0, 0, 0, 0, 0, 0, 0, 0 /* 1008FFF8 */ 28 | }; 29 | 30 | +int x11drv_find_keyboard_layout( const WCHAR *layout ) 31 | +{ 32 | + int i, len; 33 | + char *tmp; 34 | + 35 | + len = lstrlenW( layout ); 36 | + if (!(tmp = malloc( len * 3 + 1 ))) return -1; 37 | + ntdll_wcstoumbs( layout, len + 1, tmp, len * 3 + 1, FALSE ); 38 | + 39 | + for (i = 0; main_key_tab[i].comment; i++) 40 | + { 41 | + const char *name = main_key_tab[i].comment; 42 | + if (!strcmp( name, tmp )) break; 43 | + } 44 | + free( tmp ); 45 | + 46 | + if (!main_key_tab[i].comment) return -1; 47 | + return i; 48 | +} 49 | + 50 | WCHAR *x11drv_get_keyboard_layout_list( DWORD *length ) 51 | { 52 | WCHAR *tmp, *layouts = calloc( 1, sizeof(WCHAR) ); 53 | @@ -1468,11 +1487,11 @@ BOOL X11DRV_KeyEvent( HWND hwnd, XEvent *xev ) 54 | * whichever matches most closely. 55 | * kbd_section must be held. 56 | */ 57 | -static void 58 | +static int 59 | X11DRV_KEYBOARD_DetectLayout( Display *display ) 60 | { 61 | unsigned current, match, mismatch, seq, i, syms; 62 | - int score, keyc, key, pkey, ok; 63 | + int score, keyc, key, pkey, ok, kbd_layout = 0; 64 | KeySym keysym = 0; 65 | const char (*lkey)[MAIN_LEN][4]; 66 | unsigned max_seq = 0; 67 | @@ -1570,6 +1589,7 @@ X11DRV_KEYBOARD_DetectLayout( Display *display ) 68 | main_key_tab[kbd_layout].comment); 69 | 70 | TRACE("detected layout is \"%s\"\n", main_key_tab[kbd_layout].comment); 71 | + return kbd_layout; 72 | } 73 | 74 | 75 | @@ -1605,7 +1625,7 @@ void X11DRV_InitKeyboard( Display *display ) 76 | { 0x41, 0x5a }, /* VK_A - VK_Z */ 77 | { 0, 0 } 78 | }; 79 | - int vkey_range; 80 | + int vkey_range, kbd_layout; 81 | 82 | pthread_mutex_lock( &kbd_mutex ); 83 | XDisplayKeycodes(display, &min_keycode, &max_keycode); 84 | @@ -1637,8 +1657,9 @@ void X11DRV_InitKeyboard( Display *display ) 85 | } 86 | XFreeModifiermap(mmp); 87 | 88 | - /* Detect the keyboard layout */ 89 | - X11DRV_KEYBOARD_DetectLayout( display ); 90 | + /* use the configured layout from registry or auto detect it */ 91 | + kbd_layout = keyboard_layout; 92 | + if (kbd_layout == -1) kbd_layout = X11DRV_KEYBOARD_DetectLayout( display ); 93 | lkey = main_key_tab[kbd_layout].key; 94 | syms = (keysyms_per_keycode > 4) ? 4 : keysyms_per_keycode; 95 | 96 | diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h 97 | index 52260474ad2..f6baca922ef 100644 98 | --- a/dlls/winex11.drv/x11drv.h 99 | +++ b/dlls/winex11.drv/x11drv.h 100 | @@ -447,6 +447,7 @@ extern BOOL use_take_focus; 101 | extern BOOL use_primary_selection; 102 | extern BOOL use_system_cursors; 103 | extern BOOL grab_fullscreen; 104 | +extern int keyboard_layout; 105 | extern BOOL usexcomposite; 106 | extern BOOL managed_mode; 107 | extern BOOL decorated_mode; 108 | @@ -707,6 +708,7 @@ extern void init_recursive_mutex( pthread_mutex_t *mutex ); 109 | 110 | /* keyboard.c */ 111 | 112 | +extern int x11drv_find_keyboard_layout( const WCHAR *layout ); 113 | extern WCHAR *x11drv_get_keyboard_layout_list( DWORD *size ); 114 | 115 | #define DEPTH_COUNT 3 116 | diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c 117 | index b83365861d4..842f03be998 100644 118 | --- a/dlls/winex11.drv/x11drv_main.c 119 | +++ b/dlls/winex11.drv/x11drv_main.c 120 | @@ -75,6 +75,7 @@ BOOL use_take_focus = TRUE; 121 | BOOL use_primary_selection = FALSE; 122 | BOOL use_system_cursors = TRUE; 123 | BOOL grab_fullscreen = FALSE; 124 | +int keyboard_layout = -1; 125 | BOOL managed_mode = TRUE; 126 | BOOL decorated_mode = TRUE; 127 | BOOL private_color_map = FALSE; 128 | @@ -571,6 +572,9 @@ static void setup_options(void) 129 | if (!get_config_key( hkey, appkey, "GrabFullscreen", buffer, sizeof(buffer) )) 130 | grab_fullscreen = IS_OPTION_TRUE( buffer[0] ); 131 | 132 | + if (!get_config_key( hkey, appkey, "KeyboardLayout", buffer, sizeof(buffer) )) 133 | + keyboard_layout = x11drv_find_keyboard_layout( buffer ); 134 | + 135 | p = x11drv_get_keyboard_layout_list( &len ); 136 | if (p) set_reg_string_value( hkey, "KeyboardLayoutList", p, len * sizeof(WCHAR) ); 137 | free( p ); 138 | -- 139 | 2.42.0 140 | 141 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0004-winecfg-Add-a-keyboard-layout-selection-config-optio.patch: -------------------------------------------------------------------------------- 1 | From 3164e0ecc4ecf49045f8442489a4ff5bda6d3d34 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Fri, 6 Jan 2023 08:15:41 +0100 4 | Subject: [PATCH 4/9] winecfg: Add a keyboard layout selection config option. 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30984 7 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605 8 | --- 9 | programs/winecfg/input.c | 48 ++++++++++++++++++++++++++++++++++++- 10 | programs/winecfg/resource.h | 3 +++ 11 | programs/winecfg/winecfg.rc | 9 +++++++ 12 | 3 files changed, 59 insertions(+), 1 deletion(-) 13 | 14 | diff --git a/programs/winecfg/input.c b/programs/winecfg/input.c 15 | index 115161b9040..f2f035df80f 100644 16 | --- a/programs/winecfg/input.c 17 | +++ b/programs/winecfg/input.c 18 | @@ -35,7 +35,9 @@ static BOOL updating_ui; 19 | 20 | static void init_dialog( HWND dialog ) 21 | { 22 | - WCHAR *buffer; 23 | + WCHAR auto_detect_layout[256]; 24 | + WCHAR *buffer, *layout; 25 | + HWND layouts; 26 | 27 | convert_x11_desktop_key(); 28 | 29 | @@ -46,6 +48,23 @@ static void init_dialog( HWND dialog ) 30 | else CheckDlgButton( dialog, IDC_FULLSCREEN_GRAB, BST_UNCHECKED ); 31 | free( buffer ); 32 | 33 | + layouts = GetDlgItem( dialog, IDC_KEYBOARD_LAYOUT ); 34 | + LoadStringW( GetModuleHandleW( NULL ), IDS_INPUT_AUTO_DETECT_LAYOUT, auto_detect_layout, 35 | + ARRAY_SIZE(auto_detect_layout) ); 36 | + 37 | + SendMessageW( layouts, CB_RESETCONTENT, 0, 0 ); 38 | + SendMessageW( layouts, CB_ADDSTRING, 0, (LPARAM)auto_detect_layout ); 39 | + 40 | + buffer = get_reg_key( config_key, keypath( L"X11 Driver" ), L"KeyboardLayoutList", L"" ); 41 | + for (layout = buffer; *layout; layout += wcslen( layout ) + 1) 42 | + SendMessageW( layouts, CB_ADDSTRING, 0, (LPARAM)layout ); 43 | + free( buffer ); 44 | + 45 | + buffer = get_reg_key( config_key, keypath( L"X11 Driver" ), L"KeyboardLayout", L"" ); 46 | + if (!buffer || !buffer[0]) SendMessageW( layouts, CB_SETCURSEL, 0, 0 ); 47 | + else SendMessageW( layouts, CB_SELECTSTRING, -1, (LPARAM)buffer ); 48 | + free( buffer ); 49 | + 50 | updating_ui = FALSE; 51 | } 52 | 53 | @@ -56,6 +75,24 @@ static void on_fullscreen_grab_clicked( HWND dialog ) 54 | else set_reg_key( config_key, keypath( L"X11 Driver" ), L"GrabFullscreen", L"N" ); 55 | } 56 | 57 | +static void on_keyboard_layout_changed( HWND dialog ) 58 | +{ 59 | + int len, index; 60 | + WCHAR *buffer; 61 | + 62 | + if (!(index = SendMessageW( GetDlgItem( dialog, IDC_KEYBOARD_LAYOUT ), CB_GETCURSEL, 0, 0 ))) 63 | + set_reg_key( config_key, keypath( L"X11 Driver" ), L"KeyboardLayout", L"" ); 64 | + else 65 | + { 66 | + len = SendMessageW( GetDlgItem( dialog, IDC_KEYBOARD_LAYOUT ), CB_GETLBTEXTLEN, index, 0 ) + 1; 67 | + if (!(buffer = malloc( len * sizeof(WCHAR) ))) return; 68 | + 69 | + SendMessageW( GetDlgItem( dialog, IDC_KEYBOARD_LAYOUT ), CB_GETLBTEXT, index, (LPARAM)buffer ); 70 | + set_reg_key( config_key, keypath( L"X11 Driver" ), L"KeyboardLayout", buffer ); 71 | + free( buffer ); 72 | + } 73 | +} 74 | + 75 | INT_PTR CALLBACK InputDlgProc( HWND dialog, UINT message, WPARAM wparam, LPARAM lparam ) 76 | { 77 | TRACE( "dialog %p, message %#x, wparam %#Ix, lparam %#Ix\n", dialog, message, wparam, lparam ); 78 | @@ -77,6 +114,15 @@ INT_PTR CALLBACK InputDlgProc( HWND dialog, UINT message, WPARAM wparam, LPARAM 79 | case IDC_FULLSCREEN_GRAB: on_fullscreen_grab_clicked( dialog ); break; 80 | } 81 | break; 82 | + 83 | + case CBN_SELCHANGE: 84 | + if (updating_ui) break; 85 | + SendMessageW( GetParent( dialog ), PSM_CHANGED, 0, 0 ); 86 | + switch (LOWORD(wparam)) 87 | + { 88 | + case IDC_KEYBOARD_LAYOUT: on_keyboard_layout_changed( dialog ); break; 89 | + } 90 | + break; 91 | } 92 | break; 93 | 94 | diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h 95 | index 78deb1a23a2..485bc18a217 100644 96 | --- a/programs/winecfg/resource.h 97 | +++ b/programs/winecfg/resource.h 98 | @@ -231,3 +231,6 @@ 99 | 100 | /* input tab */ 101 | #define IDC_FULLSCREEN_GRAB 1501 102 | +#define IDC_KEYBOARD_LAYOUT 1502 103 | + 104 | +#define IDS_INPUT_AUTO_DETECT_LAYOUT 8501 105 | diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc 106 | index 605ec54632c..e0742794357 100644 107 | --- a/programs/winecfg/winecfg.rc 108 | +++ b/programs/winecfg/winecfg.rc 109 | @@ -130,6 +130,11 @@ BEGIN 110 | IDC_SYSPARAMS_MENUBAR "Menu Bar" 111 | END 112 | 113 | +STRINGTABLE 114 | +BEGIN 115 | + IDS_INPUT_AUTO_DETECT_LAYOUT "(Auto detect)" 116 | +END 117 | + 118 | IDD_ABOUTCFG DIALOGEX 0, 0, 260, 220 119 | STYLE WS_CHILD 120 | FONT 8, "MS Shell Dlg" 121 | @@ -330,6 +335,10 @@ FONT 8, "MS Shell Dlg" 122 | BEGIN 123 | GROUPBOX "Mouse settings",IDC_STATIC,8,4,244,64 124 | CONTROL "Automatically capture the &mouse in full-screen windows",IDC_FULLSCREEN_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,10 125 | + 126 | + GROUPBOX "Keyboard settings",IDC_STATIC,8,70,244,64 127 | + LTEXT "&Layout:",IDC_STATIC,15,82,230,8 128 | + COMBOBOX IDC_KEYBOARD_LAYOUT,110,80,135,60,CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP 129 | END 130 | 131 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 132 | -- 133 | 2.39.1 134 | 135 | -------------------------------------------------------------------------------- /patches/game-patches/dai_xinput.patch: -------------------------------------------------------------------------------- 1 | From 4fd6c1a286dd2babd098decf045522be1dff5656 Mon Sep 17 00:00:00 2001 2 | From: Cameron Moore 3 | Date: Sat, 3 Feb 2024 21:21:50 -0500 4 | Subject: [PATCH] user32: [GAMEFIX] Fix xinput support for Dragon Age 5 | Inquisition 6 | 7 | user32: [GAMEFIX] 1/2 Dragon Age Inquisition: fix xinput support 8 | 9 | https://bugs.winehq.org/show_bug.cgi?id=47070 10 | 11 | I'm not completely sure on the specifics of why the bug happens, 12 | but there are two main threads involved. Thread A owns the window 13 | object for the game. Thread B makes all the calls to XInputGetState. 14 | However, Thread B checks if the window has focus to receive keyboard 15 | inputs every frame. Thread B calls AttachThreadInput to attach its 16 | message queue to the Thread A's window a few times before the bug 17 | starts occurring along with one separate time at the start where 18 | Thread A attaches Thread B's message queue to the window as well. 19 | The message queue is detached one last time and then Thread B no 20 | longer has access to the window. 21 | 22 | My workaround checks GetFocus for when it starts receiving Null 23 | for a response (meaning it does not have access to a window anymore). 24 | Prior to this, AttachThreadInput stores the IDs of the two threads 25 | which call the function the very first time (hopefully this works 26 | with the EA App as I've been debugging this with Origin which doesn't 27 | seem to call either of the two WINAPI functions as long as you load 28 | straight into the game from the Origin library menu). When GetFocus 29 | realizes it does not have a window for the thread, it calls 30 | AttachThreadInput with the two thread IDs. This allows Thread B to 31 | access the window, which let's GetFocus return the proper window 32 | handle, which then let's the program access XInputGetState meaning 33 | the controller finally works. 34 | 35 | Anyway, as far as the final cause of the bug: it might be because 36 | of thread prioritization causing Thread B to AttachThreadInput to 37 | be called by it last as the only time Thread A calls it, it does 38 | not detach the message queue afterwards. This leads me to believe 39 | that the bug might just be caused by incomplete wine 40 | functionality / stubs. Although, this part is speculation. 41 | 42 | user32: [GAMEFIX] 2/2 Dragon Age Inquisition: fix xinput support 43 | 44 | Wrap hack with a SteamGameId check and cache it. 45 | --- 46 | dlls/user32/input.c | 22 +++++++++++++++++++++- 47 | dlls/win32u/input.c | 37 +++++++++++++++++++++++++++++++++++++ 48 | 2 files changed, 58 insertions(+), 1 deletion(-) 49 | 50 | diff --git a/dlls/user32/input.c b/dlls/user32/input.c 51 | index f91b65a5f56..dda952262ac 100644 52 | --- a/dlls/user32/input.c 53 | +++ b/dlls/user32/input.c 54 | @@ -814,8 +814,28 @@ HWND WINAPI GetActiveWindow(void) 55 | HWND WINAPI GetFocus(void) 56 | { 57 | GUITHREADINFO info; 58 | + HWND retValueWindow; 59 | + static HWND prev = 0; 60 | + const char *sgi; 61 | + static int is_DragonAgeInquis = -1; 62 | + 63 | info.cbSize = sizeof(info); 64 | - return NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info ) ? info.hwndFocus : 0; 65 | + 66 | + retValueWindow = NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info ) ? info.hwndFocus : 0; 67 | + 68 | + if (is_DragonAgeInquis) 69 | + { 70 | + if ((is_DragonAgeInquis == 1) || 71 | + (is_DragonAgeInquis = ((sgi = getenv("SteamGameId")) && !strcmp(sgi, "1222690")))) 72 | + { 73 | + if (retValueWindow == 0 && prev != 0) 74 | + NtUserAttachThreadInput(0, 0, 1); 75 | + else 76 | + prev = retValueWindow; 77 | + } 78 | + } 79 | + 80 | + return retValueWindow; 81 | } 82 | 83 | 84 | diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c 85 | index 6268c978dab..1dbb6690c03 100644 86 | --- a/dlls/win32u/input.c 87 | +++ b/dlls/win32u/input.c 88 | @@ -30,6 +30,8 @@ 89 | #pragma makedep unix 90 | #endif 91 | 92 | +#include 93 | +#include 94 | #include "ntstatus.h" 95 | #define WIN32_NO_STATUS 96 | #include "win32u_private.h" 97 | @@ -596,6 +598,41 @@ HWND get_focus(void) 98 | BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach ) 99 | { 100 | BOOL ret; 101 | + static int visited = 0; 102 | + static DWORD fromThreadForHack = 0; 103 | + static DWORD toThreadForHack = 0; 104 | + static char processNameForHack[16]; 105 | + static const char* DAIprocessName = "DragonAgeInquis"; 106 | + static const char* DAIGameLoopName = "GameLoop"; 107 | + static int is_DragonAgeInquis = -1; 108 | + const char *sgi; 109 | + 110 | + if (is_DragonAgeInquis) 111 | + { 112 | + if ((is_DragonAgeInquis == 1) || 113 | + (is_DragonAgeInquis = ((sgi = getenv("SteamGameId")) && !strcmp(sgi, "1222690")))) 114 | + { 115 | + prctl(PR_GET_NAME, processNameForHack); 116 | + TRACE("Process Name: %s\n", processNameForHack); 117 | + if (strncmp(DAIprocessName, processNameForHack, 15) == 0 || strncmp(DAIGameLoopName, processNameForHack, 8) == 0) 118 | + { 119 | + if (!visited) 120 | + { 121 | + TRACE("First Visit Process Name: %s\n", processNameForHack); 122 | + fromThreadForHack = from; 123 | + toThreadForHack = to; 124 | + visited = 1; 125 | + } 126 | + 127 | + if (from == 0 && to == 0 && visited) 128 | + { 129 | + TRACE("00 Process Name: %s\n", processNameForHack); 130 | + from = fromThreadForHack; 131 | + to = toThreadForHack; 132 | + } 133 | + } 134 | + } 135 | + } 136 | 137 | SERVER_START_REQ( attach_thread_input ) 138 | { 139 | -- 140 | 2.48.1 141 | 142 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0008-winex11-Support-fixed-X11-keycode-to-scancode-conver.patch: -------------------------------------------------------------------------------- 1 | From c61fac8a28ccc3f6bfb1e502cfc1e4027fe2d2c9 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Wed, 30 Nov 2022 18:46:00 +0100 4 | Subject: [PATCH] winex11: Support fixed X11 keycode to scancode conversion. 5 | 6 | X11 keycodes are just Linux keycodes + 8 nowadays according to evdev or 7 | libinput drivers, and we can avoid innacurate reconstruction in the most 8 | common case. 9 | 10 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30984 11 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605 12 | --- 13 | dlls/winex11.drv/keyboard.c | 44 ++++++++++++++++++++++++++++++++-- 14 | dlls/winex11.drv/x11drv.h | 1 + 15 | dlls/winex11.drv/x11drv_main.c | 4 ++++ 16 | 3 files changed, 47 insertions(+), 2 deletions(-) 17 | 18 | diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c 19 | index dbc1e1ea689..6a71da1a5d9 100644 20 | --- a/dlls/winex11.drv/keyboard.c 21 | +++ b/dlls/winex11.drv/keyboard.c 22 | @@ -64,6 +64,46 @@ static const unsigned int ControlMask = 1 << 2; 23 | static int min_keycode, max_keycode, keysyms_per_keycode; 24 | static WORD keyc2vkey[256], keyc2scan[256]; 25 | 26 | +/* default scancode mapping if keyboard_scancode_detect is FALSE, 27 | + * as most common X11 implementation use hardware scancode + 8. 28 | + */ 29 | +static WORD keyc2scan[256] = 30 | +{ 31 | + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 32 | + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 33 | + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 34 | + 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 35 | + 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 36 | + 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 37 | + 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, 38 | + 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0136, 0x0037, 39 | + 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, 40 | + 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0145, 0x0046, 0x0047, 41 | + 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 42 | + 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 43 | + 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, 44 | + 0x011c, 0x011d, 0x0135, 0x0063, 0x0138, 0x0065, 0x0147, 0x0148, 45 | + 0x0149, 0x014b, 0x014d, 0x014f, 0x0150, 0x0151, 0x0152, 0x0153, 46 | + 0x0070, 0x0000, 0x0000, 0x0000, 0x0074, 0x0075, 0x0076, 0x0045, 47 | + 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x015b, 0x015c, 0x015d, 48 | + 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 49 | + 0x0088, 0x0089, 0x008a, 0x008b, 0x008c, 0x008d, 0x008e, 0x008f, 50 | + 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, 51 | + 0x0098, 0x0099, 0x009a, 0x009b, 0x009c, 0x009d, 0x009e, 0x009f, 52 | + 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x0000, 0x00a5, 0x00a6, 0x00a7, 53 | + 0x00a8, 0x00a9, 0x00aa, 0x0000, 0x00ac, 0x00ad, 0x00ae, 0x00af, 54 | + 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 55 | + 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 56 | + 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 57 | + 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 58 | + 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 59 | + 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, 60 | + 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 61 | + 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 62 | + 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 63 | +}; 64 | + 65 | + 66 | static int NumLockMask, ScrollLockMask, AltGrMask; /* mask in the XKeyEvent state */ 67 | 68 | static pthread_mutex_t kbd_mutex = PTHREAD_MUTEX_INITIALIZER; 69 | @@ -1737,7 +1777,7 @@ void X11DRV_InitKeyboard( Display *display ) 70 | } 71 | TRACE("keycode %u => vkey %04X\n", e2.keycode, vkey); 72 | keyc2vkey[e2.keycode] = vkey; 73 | - keyc2scan[e2.keycode] = scan; 74 | + if (keyboard_scancode_detect) keyc2scan[e2.keycode] = scan; 75 | if ((vkey & 0xff) && vkey_used[(vkey & 0xff)]) 76 | WARN("vkey %04X is being used by more than one keycode\n", vkey); 77 | vkey_used[(vkey & 0xff)] = 1; 78 | @@ -1848,7 +1888,7 @@ void X11DRV_InitKeyboard( Display *display ) 79 | #undef VKEY_IF_NOT_USED 80 | 81 | /* If some keys still lack scancodes, assign some arbitrary ones to them now */ 82 | - for (scan = 0x60, keyc = min_keycode; keyc <= max_keycode; keyc++) 83 | + for (scan = 0x60, keyc = min_keycode; keyboard_scancode_detect && keyc <= max_keycode; keyc++) 84 | if (keyc2vkey[keyc]&&!keyc2scan[keyc]) { 85 | const char *ksname; 86 | keysym = XkbKeycodeToKeysym( display, keyc, 0, 0 ); 87 | diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h 88 | index f6baca922ef..e11c48dd3e2 100644 89 | --- a/dlls/winex11.drv/x11drv.h 90 | +++ b/dlls/winex11.drv/x11drv.h 91 | @@ -448,6 +448,7 @@ extern BOOL use_primary_selection; 92 | extern BOOL use_system_cursors; 93 | extern BOOL grab_fullscreen; 94 | extern int keyboard_layout; 95 | +extern BOOL keyboard_scancode_detect; 96 | extern BOOL usexcomposite; 97 | extern BOOL managed_mode; 98 | extern BOOL decorated_mode; 99 | diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c 100 | index 842f03be998..782989dab4b 100644 101 | --- a/dlls/winex11.drv/x11drv_main.c 102 | +++ b/dlls/winex11.drv/x11drv_main.c 103 | @@ -76,6 +76,7 @@ BOOL use_primary_selection = FALSE; 104 | BOOL use_system_cursors = TRUE; 105 | BOOL grab_fullscreen = FALSE; 106 | int keyboard_layout = -1; 107 | +BOOL keyboard_scancode_detect = TRUE; 108 | BOOL managed_mode = TRUE; 109 | BOOL decorated_mode = TRUE; 110 | BOOL private_color_map = FALSE; 111 | @@ -579,6 +580,9 @@ static void setup_options(void) 112 | if (p) set_reg_string_value( hkey, "KeyboardLayoutList", p, len * sizeof(WCHAR) ); 113 | free( p ); 114 | 115 | + if (!get_config_key( hkey, appkey, "KeyboardScancodeDetect", buffer, sizeof(buffer) )) 116 | + keyboard_scancode_detect = IS_OPTION_TRUE( buffer[0] ); 117 | + 118 | if (!get_config_key( hkey, appkey, "ScreenDepth", buffer, sizeof(buffer) )) 119 | default_visual.depth = wcstol( buffer, NULL, 0 ); 120 | 121 | -- 122 | 2.42.0 123 | 124 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wine-ge-custom 2 | 3 | This is my build of WINE based on/forked from the most recent bleeding-edge proton experimental wine repo. This is meant to be used with non-steam games outside of Steam. 4 | 5 | For Steam games, I provide Proton-GE for usage with Lutris, found here: 6 | 7 | https://github.com/gloriouseggroll/proton-ge-custom 8 | 9 | ## Occasionally, I also release League of Legends builds -- These builds will specifically have 'lol' or 'LoL' in the name. Please note these 'LoL' builds are for specific use with League of Legends, and NO other games. 10 | 11 | ## If you have an issue that happens with my Wine-GE or Wine-LoL-GE builds, provided FROM this repository, please contact me on Discord about the issue: 12 | 13 | https://discord.gg/6y3BdzC 14 | 15 | ## Table of contents 16 | 17 | - [Overview](#overview) 18 | - [Media Foundation Fixes (fully working or playable)](#media-foundation-fixes-fully-working-or-playable) 19 | - [Notes](#notes) 20 | - [Installation](#installation) 21 | - [Manual](#manual) 22 | - [Building](#building) 23 | - [Modification](#modification) 24 | - [Credits](#credits) 25 | - [TKG (Etienne Juvigny)](#tkg-etienne-juvigny) 26 | - [Guy1524 (Derek Lesho)](#guy1524-derek-lesho) 27 | - [Joshie (Joshua Ashton)](#joshie-joshua-ashton) 28 | - [doitsujin/ドイツ人 (Philip Rebohle)](#doitsujinドイツ人-philip-rebohle) 29 | - [HansKristian/themaister (Hans-Kristian Arntzen)](#hanskristianthemaister-hans-kristian-arntzen) 30 | - [flibitijibibo (Ethan Lee)](#flibitijibibo-ethan-lee) 31 | - [simmons-public (Chris Simmons)](#simmons-public-chris-simmons) 32 | - [Sporif (Amine Hassane)](#sporif-amine-hassane) 33 | - [wine-staging maintainers](#wine-staging-maintainers) 34 | - [Reporters](#reporters) 35 | - [Patrons](#patrons) 36 | - [Donations](#donations) 37 | ## Overview 38 | 39 | Things it contains that Valve's proton does not: 40 | 41 | - Additional media foundation patches for better video playback support 42 | - AMD FSR patches added directly to fullscreen hack that can be toggled with WINE_FULLSCREEN_FSR=1 43 | - FSR Fake resolution patch (details here: https://github.com/GloriousEggroll/proton-ge-custom/pull/52) 44 | - Nvidia CUDA support for phsyx and nvapi 45 | - Raw input mouse support 46 | - fix for Mech Warrior Online 47 | - fix for Asseto Corsa HUD 48 | - fix for MK11 crash in single player 49 | - fix for Killer Instinct Vulkan related crash 50 | - fix for Cities XXL patches 51 | - various upstream WINE patches backported 52 | - various wine-staging patches applied as they become needed 53 | 54 | ## Media Foundation fixes (Fully working or playable) 55 | 56 | - Spyro Reignited Trilogy 57 | - Mortal Kombat 11 58 | - Injustice 2 59 | - Power Rangers: Battle for the Grid 60 | - Borderlands 3 61 | - Resident Evil 0 62 | - Resident Evil 63 | - Resident Evil 2 Remastered 64 | - Resident Evil 3 Remastered 65 | - Resident Evil 5 66 | - Resident Evil 6 67 | - Resident Evil 7 68 | - Resident Evil 8 69 | - Resident Evil Revalations 70 | - Resident Evil Revalations 2 71 | - Persona 4 Golden 72 | - PC Building Simulator 73 | - Dangonronpa V3 74 | - Super Lucky's Tale 75 | - Remnant: From the Ashes 76 | - BlazBlue Centralfiction 77 | - Bloodstained: Ritual of the Night 78 | - Crazy Machines 3 79 | - Devil May Cry 5 80 | - Wasteland 3 81 | - Mutant Year Zero 82 | - Ultimate Marvel Vs. Capcom 3 83 | - Industry of Titan 84 | - Call of Duty Black Ops III 85 | - Tokyo Xanadu eX+ 86 | - Haven 87 | - Nier Replicant 88 | - Scrap Mechanic 89 | - Aven Colony 90 | - American Fugitive 91 | - Asrtonner 92 | - Soul Caliber VI 93 | - Monster Hunter Rise 94 | - Seven: Days Gone 95 | 96 | ## Notes 97 | 98 | - Warframe is problematic with VSync. Turn it off or on in game, do not set to `Auto` 99 | - Warframe needs a set a frame limit in game. Unlimited framerate can cause slowdowns 100 | - Warframe on Nvidia: you may need to disable GPU Particles in game otherwise the game can freeze randomly. On AMD they work fine 101 | 102 | ## Installation 103 | 104 | PLEASE NOTE: There are prerequisites for using this version of wine: 105 | 106 | 1. You must have wine installed on your system 107 | 2. You must have winetricks installed on your system 108 | 3. You must have wine dependencies installed on your system. See https://www.gloriouseggroll.tv/how-to-get-out-of-wine-dependency-hell/ 109 | 4. You must have vulkan gpu drivers/packages installed properly on your system. See https://github.com/lutris/docs/blob/master/InstallingDrivers.md 110 | 111 | ### Manual 112 | 113 | This section is for manual installation of wine-ge for usage with Lutris. 114 | 115 | 1. Extract `wine-name-branch-x86_64.tar.gz` to `/home/USERNAME/.local/share/lutris/runners/wine/` 116 | 2. Restart lutris. You can now choose `wine-name-branch-x86_64` from the runners list in configuration options for any game. 117 | 118 | 119 | ## Building 120 | 121 | Install docker/podman: 122 | 123 | On Ubuntu: sudo apt install podman 124 | On Arch: sudo pacman -S podman 125 | On Fedora: sudo dnf install podman 126 | 127 | Build wine: 128 | 129 | usage: ./makebuild.sh name winerepo branch 130 | example: ./makebuild.sh lutris-GE https://github.com/GloriousEggroll/proton-wine Proton8-15 131 | build name output: builds/runners/wine/wine-lutris-GE-Proton8-15-x86_64.tar.xz 132 | 133 | Additional tips: 134 | 135 | To access the container: 136 | 137 | docker start buildbot 138 | docker exec -it buildbot bash 139 | 140 | To exit the container: 141 | 142 | exit 143 | docker stop buildbot 144 | 145 | To delete the container and view containers list: 146 | 147 | docker container rm buildbot 148 | docker container list -a 149 | 150 | To delete the container image and view images list: 151 | 152 | docker rmi docker.io/gloriouseggroll/lutris_buildbot 153 | docker images 154 | 155 | * IMPORTANT NOTES: 156 | - wine, wine-staging and patches repos/folders are here for my personal use. The build bot does -NOT- pull from any of these folders directly.__ 157 | - GloriousEggroll/proton-wine Proton* branches are PRE-PATCHED, meaning it is ready to compile, no patching needed. 158 | 159 | If you need to make changes to the wine build it is recommended to: 160 | 161 | 1. Fork the ValveSoftware/wine repository 162 | 2. Clone your fork of the ValveSoftware/wine repository 163 | 3. Add official ValveSoftware/wine repository as a remote branch in your clone/fork 164 | 4. Checkout the latest experimental-wine-bleeding-edge tree and make a new branch from it. 165 | 5. then run `./patches/protonprep.sh` to apply my changes to your own wine repository 166 | 6. then commit + push those changes to your new branch on your -own- repository. 167 | 7. THEN follow the makebuild.sh instructions from above, using your own repository URL and branch. 168 | 169 | 170 | ## Modification 171 | 172 | Environment variable options: 173 | 174 | | Compat config string | Environment Variable | Description | 175 | | :-------------------- | :----------------------------- | :----------- | 176 | | | WINE_FULLSCREEN_FSR | Enable AMD FidelityFX Super Resolution (FSR), use in conjunction with `WINE_FULLSCREEN_FSR_STRENGTH` Only works in vulkan games (dxvk and vkd3d-proton included).| 177 | | | WINE_FULLSCREEN_FSR_STRENGTH | AMD FidelityFX Super Resolution (FSR), the default sharpening of 5 is enough without needing modification, but can be changed with 0-5 if wanted. 0 is the maximum sharpness, higher values mean less sharpening. 2 is the AMD recommended default and is set by proton-ge | 178 | 179 | ## Credits 180 | 181 | As many of you may or may not already know, there is a Credits section in the README for this Git repository. My proton-ge project contains some of my personal tweaks to Proton, but a large amount of the patches, rebases and fixes come from numerous people's projects. While I tend to get credited for my builds, a lot of the work that goes into it are from other people as well. I'd like to take some time to point a few of these people out of recognition. In future builds, I plan to make clearer and more informative Git commits, as well as attempt to give these people further crediting, as my README may not be sufficient in doing so. 182 | 183 | ### TKG (Etienne Juvigny) 184 | 185 | - https://www.patreon.com/tkglitch 186 | - https://github.com/Frogging-Family/wine-tkg-git 187 | 188 | I and many others owe TKG. In regards to both WINE and Proton. He has dedicated a lot of time (2+ years at least) to rebasing WINE and Proton patches, as well as making his own contributions. Before he came along, I did some rebasing work, and mainly only released things for Arch. These days he almost always beats me to rebasing, and it saves myself and others a **lot** of work. 189 | 190 | ### Guy1524 (Derek Lesho) 191 | 192 | - https://github.com/Guy1524 193 | 194 | Derek was responsible for the original rawinput patches, as well as several various game fixes in the past, just to name a few: MK11, FFXV, MHW, Steep, AC Odyssey FS fix. He has also done a massive amount of work on media foundation/mfplat, which should be hopefully working very soon. 195 | 196 | ### Joshie (Joshua Ashton) 197 | 198 | - https://github.com/Joshua-Ashton/d9vk 199 | 200 | Joshua is the creator of D9VK and also a huge contributor of DXVK. He is also known for his recent DOOM Eternal WINE fixes and also many of the Vulkan tweaks and fixes used, such as FS hack interger scaling. 201 | 202 | ### doitsujin/ドイツ人 (Philip Rebohle) 203 | 204 | - https://github.com/doitsujin/dxvk 205 | 206 | Philip is the creator of DXVK and a heavy contributor of VKD3D. He also put up a lot of my bug reporting for Warframe years ago, when DXVK started. 207 | 208 | ### HansKristian/themaister (Hans-Kristian Arntzen) 209 | 210 | - https://github.com/HansKristian-Work 211 | 212 | Hans-Kristian is a heavy contributor of VKD3D and he also created a lot of WINE patches that allowed WoW to work. 213 | 214 | ### flibitijibibo (Ethan Lee) 215 | 216 | - https://github.com/sponsors/flibitijibibo 217 | - https://fna-xna.github.io/ 218 | 219 | Ethan is the creator of FAudio, and he also listened to my Warframe bug reports years ago. 220 | 221 | ### simmons-public (Chris Simmons) 222 | 223 | - https://github.com/simons-public 224 | 225 | Chris is the creator of the original Protonfixes project. The portions of Protonfixes I've imported are what allow customizations to be made to prefixes for various Proton games. without Proton fixes many games would still be broken and/or require manual prefix modification. Huge thanks to Chris. 226 | 227 | ### Sporif (Amine Hassane) 228 | 229 | - https://github.com/Sporif 230 | 231 | Amine is the current maintainer of dxvk-async. This is a feature that was originally removed from dxvk as it happened around the same time a few overwatch bans happened. It was thought, but never confirmed whether or not this feature caused the bans, so the feature was removed as a safety precaution. It is still safe to use in many single player games, and games that do not have competitive anti-cheats. It has also been confirmed to work safely in Warframe and Path of Exile. 232 | 233 | ### wine-staging maintainers 234 | 235 | I also of course need to thank my fellow wine-staging maintainers: Alistair Leslie-Hughes, Zebediah Figura and Paul Gofman 236 | 237 | They have contributed MANY patches to staging, far beyond what I have done, as well as kept up with regular rebasing. A lot of times when bug reports come to me, if it has to do with staging I end up testing and relaying information to these guys in order to get issues resolved. 238 | 239 | ### Reporters 240 | 241 | Additionally, a thank you is owed to Andrew Aeikum (aeikum), and kisak (kisak-valve) for regularly keeping me in the loop with Proton and fsync patches, as well as accepting PRs I've made to fix Proton build system issues, or listening to bug reports on early Proton patches before they reach Proton release. 242 | 243 | ### Patrons 244 | 245 | And finally - To all of my patrons that have supported me, thank you so much. It's because of you that I've been able to keep this project going, getting bug fixes reported, getting Proton/WINE issues fixed, getting various hardware and/or game fixes handled, and so on. Thanks to you, I have been able to use the spare budget in order to both help support the other people that make my project possible, as well as get things necessary for testing such as new game releases or specific hardware that hits odd issues. It's had a huge effect not just for this project, but a large trickle down effect. 246 | 247 | My wine-staging co-maintainers are often able to ask me for testing games, or testing on different hardware if they don't have access to it. This also trickles into both Proton bug reporting AND Lutris bug reporting, as I'm able to provide bug testing and feedback and custom builds and upgrades to them as well. I'm also able to test driver related issues for things such as mesa and getting things reported + patched. This in turn leads to early patches for Mesa, the kernel, VKD3D, and other packages on my copr repos as well. The trickle down effect is just one gigantic awesome rabbit hole for getting things fixed. Thank you once again. 248 | 249 | ## Donations 250 | 251 | For anyone else interested, my Patreon can be found here: 252 | 253 | https://www.patreon.com/gloriouseggroll 254 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0001-winecfg-Move-input-config-options-to-a-dedicated-tab.patch: -------------------------------------------------------------------------------- 1 | From b97b584a775bf22c19c94064a7321770764cf25e Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?R=C3=A9mi=20Bernon?= 3 | Date: Thu, 5 Jan 2023 21:16:38 +0100 4 | Subject: [PATCH] winecfg: Move input config options to a dedicated tab. 5 | 6 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30984 7 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605 8 | --- 9 | MAINTAINERS | 1 + 10 | programs/winecfg/Makefile.in | 1 + 11 | programs/winecfg/input.c | 105 +++++++++++++++++++++++++++++++++++ 12 | programs/winecfg/main.c | 12 +++- 13 | programs/winecfg/resource.h | 6 +- 14 | programs/winecfg/winecfg.h | 4 ++ 15 | programs/winecfg/winecfg.rc | 38 ++++++++----- 16 | programs/winecfg/x11drvdlg.c | 18 +----- 17 | 8 files changed, 151 insertions(+), 34 deletions(-) 18 | create mode 100644 programs/winecfg/input.c 19 | 20 | diff --git a/MAINTAINERS b/MAINTAINERS 21 | index dc5c85cc4ec..a5902235be8 100644 22 | --- a/MAINTAINERS 23 | +++ b/MAINTAINERS 24 | @@ -182,6 +182,7 @@ F: dlls/user32/input.c 25 | F: dlls/win32u/input.c 26 | F: dlls/win32u/rawinput.c 27 | F: server/queue.c 28 | +F: programs/winecfg/input.c 29 | 30 | Input methods 31 | M: Rémi Bernon 32 | diff --git a/programs/winecfg/Makefile.in b/programs/winecfg/Makefile.in 33 | index 99c829a9468..1105a99e177 100644 34 | --- a/programs/winecfg/Makefile.in 35 | +++ b/programs/winecfg/Makefile.in 36 | @@ -9,6 +9,7 @@ SOURCES = \ 37 | audio.c \ 38 | drive.c \ 39 | driveui.c \ 40 | + input.c \ 41 | libraries.c \ 42 | logo.svg \ 43 | main.c \ 44 | diff --git a/programs/winecfg/input.c b/programs/winecfg/input.c 45 | new file mode 100644 46 | index 00000000000..115161b9040 47 | --- /dev/null 48 | +++ b/programs/winecfg/input.c 49 | @@ -0,0 +1,105 @@ 50 | +/* 51 | + * Copyright 2023 Rémi Bernon for CodeWeavers 52 | + * 53 | + * This library is free software; you can redistribute it and/or 54 | + * modify it under the terms of the GNU Lesser General Public 55 | + * License as published by the Free Software Foundation; either 56 | + * version 2.1 of the License, or (at your option) any later version. 57 | + * 58 | + * This library is distributed in the hope that it will be useful, 59 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of 60 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 61 | + * Lesser General Public License for more details. 62 | + * 63 | + * You should have received a copy of the GNU Lesser General Public 64 | + * License along with this library; if not, write to the Free Software 65 | + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 66 | + * 67 | + */ 68 | + 69 | +#include 70 | +#include 71 | + 72 | +#define COBJMACROS 73 | +#include "windef.h" 74 | +#include "winbase.h" 75 | + 76 | +#include "winecfg.h" 77 | +#include "resource.h" 78 | + 79 | +#include "wine/debug.h" 80 | + 81 | +WINE_DEFAULT_DEBUG_CHANNEL(winecfg); 82 | + 83 | +static BOOL updating_ui; 84 | + 85 | +static void init_dialog( HWND dialog ) 86 | +{ 87 | + WCHAR *buffer; 88 | + 89 | + convert_x11_desktop_key(); 90 | + 91 | + updating_ui = TRUE; 92 | + 93 | + buffer = get_reg_key( config_key, keypath( L"X11 Driver" ), L"GrabFullscreen", L"N" ); 94 | + if (IS_OPTION_TRUE( *buffer )) CheckDlgButton( dialog, IDC_FULLSCREEN_GRAB, BST_CHECKED ); 95 | + else CheckDlgButton( dialog, IDC_FULLSCREEN_GRAB, BST_UNCHECKED ); 96 | + free( buffer ); 97 | + 98 | + updating_ui = FALSE; 99 | +} 100 | + 101 | +static void on_fullscreen_grab_clicked( HWND dialog ) 102 | +{ 103 | + BOOL checked = IsDlgButtonChecked( dialog, IDC_FULLSCREEN_GRAB ) == BST_CHECKED; 104 | + if (checked) set_reg_key( config_key, keypath( L"X11 Driver" ), L"GrabFullscreen", L"Y" ); 105 | + else set_reg_key( config_key, keypath( L"X11 Driver" ), L"GrabFullscreen", L"N" ); 106 | +} 107 | + 108 | +INT_PTR CALLBACK InputDlgProc( HWND dialog, UINT message, WPARAM wparam, LPARAM lparam ) 109 | +{ 110 | + TRACE( "dialog %p, message %#x, wparam %#Ix, lparam %#Ix\n", dialog, message, wparam, lparam ); 111 | + 112 | + switch (message) 113 | + { 114 | + case WM_SHOWWINDOW: 115 | + set_window_title( dialog ); 116 | + break; 117 | + 118 | + case WM_COMMAND: 119 | + switch (HIWORD(wparam)) 120 | + { 121 | + case BN_CLICKED: 122 | + if (updating_ui) break; 123 | + SendMessageW( GetParent( dialog ), PSM_CHANGED, 0, 0 ); 124 | + switch (LOWORD(wparam)) 125 | + { 126 | + case IDC_FULLSCREEN_GRAB: on_fullscreen_grab_clicked( dialog ); break; 127 | + } 128 | + break; 129 | + } 130 | + break; 131 | + 132 | + case WM_NOTIFY: 133 | + switch (((LPNMHDR)lparam)->code) 134 | + { 135 | + case PSN_KILLACTIVE: 136 | + SetWindowLongPtrW( dialog, DWLP_MSGRESULT, FALSE ); 137 | + break; 138 | + case PSN_APPLY: 139 | + apply(); 140 | + SetWindowLongPtrW( dialog, DWLP_MSGRESULT, PSNRET_NOERROR ); 141 | + break; 142 | + case PSN_SETACTIVE: 143 | + init_dialog( dialog ); 144 | + break; 145 | + case LVN_ITEMCHANGED: 146 | + break; 147 | + } 148 | + break; 149 | + case WM_INITDIALOG: 150 | + break; 151 | + } 152 | + 153 | + return FALSE; 154 | +} 155 | diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h 156 | index c0d7adadcc1..6e2953c0d70 100644 157 | --- a/programs/winecfg/resource.h 158 | +++ b/programs/winecfg/resource.h 159 | @@ -46,6 +46,7 @@ 160 | #define IDS_LINKS_TO 17 161 | #define IDS_WINECFG_TITLE_APP 18 /* App specific title */ 162 | #define IDS_TAB_STAGING 19 163 | +#define IDS_TAB_INPUT 20 164 | #define IDI_WINECFG 100 165 | #define IDI_LOGO 102 166 | #define IDD_ABOUTCFG 107 167 | @@ -56,6 +57,7 @@ 168 | #define IDD_DRIVECFG 112 169 | #define IDD_DESKTOP_INTEGRATION 115 170 | #define IDD_STAGING 116 171 | +#define IDD_INPUT_CONFIG 117 172 | #define IDC_WINVER 1012 173 | #define IDC_DESKTOP_WIDTH 1023 174 | #define IDC_DESKTOP_HEIGHT 1024 175 | @@ -126,7 +128,6 @@ 176 | /* graphics */ 177 | #define IDC_ENABLE_MANAGED 1100 178 | #define IDC_ENABLE_DECORATED 1101 179 | -#define IDC_FULLSCREEN_GRAB 1102 180 | 181 | #define IDC_RES_TRACKBAR 1107 182 | #define IDC_RES_DPIEDIT 1108 183 | @@ -230,3 +231,6 @@ 184 | #define IDC_ABT_TITLE_TEXT 8436 185 | #define IDC_ABT_WEB_LINK 8437 186 | #define IDC_ABT_LICENSE_TEXT 8438 187 | + 188 | +/* input tab */ 189 | +#define IDC_FULLSCREEN_GRAB 1501 190 | diff --git a/programs/winecfg/winecfg.h b/programs/winecfg/winecfg.h 191 | index d4fedff5afb..b83234470c1 100644 192 | --- a/programs/winecfg/winecfg.h 193 | +++ b/programs/winecfg/winecfg.h 194 | @@ -74,6 +74,9 @@ WCHAR *keypath(const WCHAR *section); 195 | BOOL initialize(HINSTANCE hInstance); 196 | extern HKEY config_key; 197 | 198 | +/* winex11 registry */ 199 | +void convert_x11_desktop_key(void); 200 | + 201 | /* hack for the property sheet control */ 202 | void set_window_title(HWND dialog); 203 | 204 | @@ -87,6 +90,7 @@ INT_PTR CALLBACK AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara 205 | INT_PTR CALLBACK ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 206 | INT_PTR CALLBACK StagingDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 207 | INT_PTR CALLBACK AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 208 | +INT_PTR CALLBACK InputDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 209 | 210 | /* Windows version management */ 211 | BOOL set_winver_from_string(const WCHAR *version); 212 | diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc 213 | index 428c477413c..1231e5319c5 100644 214 | --- a/programs/winecfg/winecfg.rc 215 | +++ b/programs/winecfg/winecfg.rc 216 | @@ -40,6 +40,7 @@ BEGIN 217 | IDS_TAB_AUDIO "Audio" 218 | IDS_TAB_STAGING "Staging" 219 | IDS_TAB_ABOUT "About" 220 | + IDS_TAB_INPUT "Input" 221 | IDS_WINECFG_TITLE "Wine configuration" 222 | IDS_WINECFG_TITLE_APP "Wine configuration for %s" 223 | IDS_THEMEFILE "Theme files (*.msstyles; *.theme)" 224 | @@ -171,22 +172,21 @@ IDD_GRAPHCFG DIALOG 0, 0, 260, 220 225 | STYLE WS_CHILD | WS_DISABLED 226 | FONT 8, "MS Shell Dlg" 227 | BEGIN 228 | - GROUPBOX "Window settings",IDC_STATIC,8,4,244,84 229 | - CONTROL "Automatically capture the &mouse in full-screen windows",IDC_FULLSCREEN_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,10 230 | - CONTROL "Allow the window manager to &decorate the windows",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,32,230,10 231 | - CONTROL "Allow the &window manager to control the windows",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,44,230,10 232 | + GROUPBOX "Window settings",IDC_STATIC,8,4,244,72 233 | + CONTROL "Allow the window manager to &decorate the windows",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,10 234 | + CONTROL "Allow the &window manager to control the windows",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,32,230,10 235 | CONTROL "&Emulate a virtual desktop",IDC_ENABLE_DESKTOP,"Button", 236 | - BS_AUTOCHECKBOX | WS_TABSTOP,15,56,230,10 237 | - LTEXT "Desktop &size:",IDC_DESKTOP_SIZE,15,70,64,16,WS_DISABLED 238 | - LTEXT "#msgctxt#do not translate#X",IDC_DESKTOP_BY,129,70,8,8,WS_DISABLED 239 | - EDITTEXT IDC_DESKTOP_WIDTH,84,68,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED 240 | - EDITTEXT IDC_DESKTOP_HEIGHT,137,68,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED 241 | - 242 | - GROUPBOX "Screen resolution",IDC_STATIC,8,95,244,84 243 | - CONTROL "", IDC_RES_TRACKBAR, "msctls_trackbar32",WS_TABSTOP,12,105,171,15 244 | - EDITTEXT IDC_RES_DPIEDIT,188,105,23,13,ES_NUMBER|WS_TABSTOP 245 | - LTEXT "#msgctxt#unit: dots/inch#dpi",IDC_STATIC,215,107,30,8 246 | - LTEXT "This is a sample text using 10 point Tahoma",IDC_RES_FONT_PREVIEW,15,124,230,49 247 | + BS_AUTOCHECKBOX | WS_TABSTOP,15,44,230,10 248 | + LTEXT "Desktop &size:",IDC_DESKTOP_SIZE,15,58,64,16,WS_DISABLED 249 | + LTEXT "#msgctxt#do not translate#X",IDC_DESKTOP_BY,129,58,8,8,WS_DISABLED 250 | + EDITTEXT IDC_DESKTOP_WIDTH,84,56,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED 251 | + EDITTEXT IDC_DESKTOP_HEIGHT,137,56,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED 252 | + 253 | + GROUPBOX "Screen resolution",IDC_STATIC,8,83,244,84 254 | + CONTROL "", IDC_RES_TRACKBAR, "msctls_trackbar32",WS_TABSTOP,12,93,171,15 255 | + EDITTEXT IDC_RES_DPIEDIT,188,93,23,13,ES_NUMBER|WS_TABSTOP 256 | + LTEXT "#msgctxt#unit: dots/inch#dpi",IDC_STATIC,215,95,30,8 257 | + LTEXT "This is a sample text using 10 point Tahoma",IDC_RES_FONT_PREVIEW,15,112,230,49 258 | END 259 | 260 | IDD_DLLCFG DIALOG 0, 0, 260, 220 261 | @@ -332,6 +332,14 @@ BEGIN 262 | CONTROL "Enable >K3 Theming",IDC_ENABLE_GTK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,100,230,8 263 | END 264 | 265 | +IDD_INPUT_CONFIG DIALOG 0, 0, 260, 220 266 | +STYLE WS_CHILD | WS_DISABLED 267 | +FONT 8, "MS Shell Dlg" 268 | +BEGIN 269 | + GROUPBOX "Mouse settings",IDC_STATIC,8,4,244,64 270 | + CONTROL "Automatically capture the &mouse in full-screen windows",IDC_FULLSCREEN_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,10 271 | +END 272 | + 273 | LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL 274 | 275 | /* @makedep: winecfg.ico */ 276 | diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c 277 | index 215cd6534a2..cd7b7552a1e 100644 278 | --- a/programs/winecfg/x11drvdlg.c 279 | +++ b/programs/winecfg/x11drvdlg.c 280 | @@ -47,7 +47,7 @@ static const UINT dpi_values[] = { 96, 120, 144, 168, 192, 216, 240, 288, 336, 3 281 | static BOOL updating_ui; 282 | 283 | /* convert the x11 desktop key to the new explorer config */ 284 | -static void convert_x11_desktop_key(void) 285 | +void convert_x11_desktop_key(void) 286 | { 287 | WCHAR *buf; 288 | 289 | @@ -139,13 +139,6 @@ static void init_dialog(HWND dialog) 290 | SendDlgItemMessageW(dialog, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0); 291 | } 292 | 293 | - buf = get_reg_key(config_key, keypath(L"X11 Driver"), L"GrabFullscreen", L"N"); 294 | - if (IS_OPTION_TRUE(*buf)) 295 | - CheckDlgButton(dialog, IDC_FULLSCREEN_GRAB, BST_CHECKED); 296 | - else 297 | - CheckDlgButton(dialog, IDC_FULLSCREEN_GRAB, BST_UNCHECKED); 298 | - free(buf); 299 | - 300 | buf = get_reg_key(config_key, keypath(L"X11 Driver"), L"Managed", L"Y"); 301 | if (IS_OPTION_TRUE(*buf)) 302 | CheckDlgButton(dialog, IDC_ENABLE_MANAGED, BST_CHECKED); 303 | @@ -220,14 +213,6 @@ static void on_enable_decorated_clicked(HWND dialog) { 304 | } 305 | } 306 | 307 | -static void on_fullscreen_grab_clicked(HWND dialog) 308 | -{ 309 | - if (IsDlgButtonChecked(dialog, IDC_FULLSCREEN_GRAB) == BST_CHECKED) 310 | - set_reg_key(config_key, keypath(L"X11 Driver"), L"GrabFullscreen", L"Y"); 311 | - else 312 | - set_reg_key(config_key, keypath(L"X11 Driver"), L"GrabFullscreen", L"N"); 313 | -} 314 | - 315 | static INT read_logpixels_reg(void) 316 | { 317 | DWORD dwLogPixels; 318 | @@ -383,7 +368,6 @@ GraphDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) 319 | case IDC_ENABLE_DESKTOP: on_enable_desktop_clicked(hDlg); break; 320 | case IDC_ENABLE_MANAGED: on_enable_managed_clicked(hDlg); break; 321 | case IDC_ENABLE_DECORATED: on_enable_decorated_clicked(hDlg); break; 322 | - case IDC_FULLSCREEN_GRAB: on_fullscreen_grab_clicked(hDlg); break; 323 | } 324 | break; 325 | } 326 | -- 327 | 2.42.0 328 | 329 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/loader-KeyboardLayouts/0001-loader-Add-Keyboard-Layouts-registry-enteries.patch: -------------------------------------------------------------------------------- 1 | From f2347ae7216626d248cfaf9445862561b2b5eef7 Mon Sep 17 00:00:00 2001 2 | From: Alistair Leslie-Hughes 3 | Date: Mon, 1 Jul 2019 09:58:55 +1000 4 | Subject: [PATCH] loader: Add Keyboard Layouts registry enteries. 5 | 6 | Signed-off-by: Alistair Leslie-Hughes 7 | --- 8 | loader/wine.inf.in | 209 +++++++++++++++++++++++++++++++++++++++++++++ 9 | 1 file changed, 209 insertions(+) 10 | 11 | diff --git a/loader/wine.inf.in b/loader/wine.inf.in 12 | index ff601e41b26..6ffb8c56d87 100644 13 | --- a/loader/wine.inf.in 14 | +++ b/loader/wine.inf.in 15 | @@ -63,6 +63,7 @@ AddReg=\ 16 | Debugger,\ 17 | DirectX,\ 18 | Fonts,\ 19 | + KeyboardLayouts,\ 20 | MCI,\ 21 | Misc,\ 22 | OLE,\ 23 | @@ -87,6 +88,7 @@ AddReg=\ 24 | Debugger,\ 25 | DirectX,\ 26 | Fonts,\ 27 | + KeyboardLayouts,\ 28 | MCI,\ 29 | Misc,\ 30 | OLE,\ 31 | @@ -113,6 +115,7 @@ AddReg=\ 32 | Debugger,\ 33 | DirectX,\ 34 | Fonts,\ 35 | + KeyboardLayouts,\ 36 | MCI,\ 37 | Misc,\ 38 | OLE,\ 39 | @@ -160,6 +163,7 @@ AddReg=\ 40 | CurrentVersionWow64,\ 41 | Debugger,\ 42 | DirectX,\ 43 | + KeyboardLayouts,\ 44 | MCI,\ 45 | Misc,\ 46 | Tapi,\ 47 | @@ -597,6 +601,211 @@ HKCU,Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoic 48 | HKCU,Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice,"ProgId",,"http" 49 | HKCU,Software\Microsoft\Windows\Shell\Associations\UrlAssociations\https\UserChoice,"ProgId",,"https" 50 | 51 | +[KeyboardLayouts] 52 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts,,16 53 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000401,,16 54 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000402,,16 55 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000404,,16 56 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000405,,16 57 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000406,,16 58 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000407,,16 59 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000408,,16 60 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409,,16 61 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040a,,16 62 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040b,,16 63 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040c,,16 64 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040d,,16 65 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040e,,16 66 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040f,,16 67 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000410,,16 68 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000411,,16 69 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000412,,16 70 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000413,,16 71 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000414,,16 72 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000415,,16 73 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000416,,16 74 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000418,,16 75 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000419,,16 76 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041a,,16 77 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041b,,16 78 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041c,,16 79 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041d,,16 80 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041e,,16 81 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041f,,16 82 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000420,,16 83 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000422,,16 84 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000423,,16 85 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000424,,16 86 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000425,,16 87 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000426,,16 88 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000427,,16 89 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000428,,16 90 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000429,,16 91 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042a,,16 92 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b,,16 93 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042c,,16 94 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042e,,16 95 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042f,,16 96 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000432,,16 97 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000437,,16 98 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000438,,16 99 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000439,,16 100 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000043a,,16 101 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000043b,,16 102 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000043f,,16 103 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000440,,16 104 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000442,,16 105 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000444,,16 106 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000445,,16 107 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000446,,16 108 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000447,,16 109 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000448,,16 110 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000449,,16 111 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044a,,16 112 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044b,,16 113 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044c,,16 114 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044d,,16 115 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044e,,16 116 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000450,,16 117 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000451,,16 118 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000452,,16 119 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000453,,16 120 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000454,,16 121 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000045a,,16 122 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000045b,,16 123 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000045c,,16 124 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000461,,16 125 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000463,,16 126 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000465,,16 127 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000468,,16 128 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000046a,,16 129 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000046c,,16 130 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000046d,,16 131 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000046e,,16 132 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000046f,,16 133 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000470,,16 134 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000474,,16 135 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000475,,16 136 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000480,,16 137 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000481,,16 138 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000485,,16 139 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000488,,16 140 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000492,,16 141 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000804,,16 142 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000807,,16 143 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000809,,16 144 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080a,,16 145 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080c,,16 146 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000813,,16 147 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000816,,16 148 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000081a,,16 149 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000082c,,16 150 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000083b,,16 151 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000843,,16 152 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000850,,16 153 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000085d,,16 154 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000085f,,16 155 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c04,,16 156 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c0c,,16 157 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c1a,,16 158 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001004,,16 159 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001009,,16 160 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000100c,,16 161 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000105f,,16 162 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001404,,16 163 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001809,,16 164 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000201a,,16 165 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00004009,,16 166 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010401,,16 167 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010402,,16 168 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010405,,16 169 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010407,,16 170 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010408,,16 171 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409,,16 172 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001040a,,16 173 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001040e,,16 174 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010410,,16 175 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010415,,16 176 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010416,,16 177 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010418,,16 178 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010419,,16 179 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041b,,16 180 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041e,,16 181 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041f,,16 182 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010426,,16 183 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010427,,16 184 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b,,16 185 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042c,,16 186 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042e,,16 187 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042f,,16 188 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010437,,16 189 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010439,,16 190 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001043a,,16 191 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001043b,,16 192 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010444,,16 193 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010445,,16 194 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010451,,16 195 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010453,,16 196 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001045a,,16 197 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001045b,,16 198 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001045c,,16 199 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001045d,,16 200 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010465,,16 201 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010480,,16 202 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001080c,,16 203 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001083b,,16 204 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010850,,16 205 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010c00,,16 206 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00011009,,16 207 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001105f,,16 208 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00011809,,16 209 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020401,,16 210 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020402,,16 211 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020405,,16 212 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020408,,16 213 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020409,,16 214 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002040d,,16 215 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020418,,16 216 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020419,,16 217 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002041e,,16 218 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020422,,16 219 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020426,,16 220 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020427,,16 221 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002042b,,16 222 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002042e,,16 223 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020437,,16 224 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020445,,16 225 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002083b,,16 226 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020c00,,16 227 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030402,,16 228 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030408,,16 229 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030409,,16 230 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0003041e,,16 231 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0003042b,,16 232 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030437,,16 233 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030c00,,16 234 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040402,,16 235 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040408,,16 236 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040409,,16 237 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040437,,16 238 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040c00,,16 239 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050408,,16 240 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409,,16 241 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050429,,16 242 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00060408,,16 243 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00070c00,,16 244 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00080c00,,16 245 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00090c00,,16 246 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\000a0c00,,16 247 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\000b0c00,,16 248 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\000c0c00,,16 249 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\000d0c00,,16 250 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\000e0c00,,16 251 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\000f0c00,,16 252 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00100c00,,16 253 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00110c00,,16 254 | +HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00120c00,,16 255 | + 256 | [OLE] 257 | HKLM,"Software\Microsoft\OLE","EnableDCOM",,"Y" 258 | HKLM,"Software\Microsoft\OLE","EnableRemoteConnect",,"N" 259 | -- 260 | 2.35.1 261 | 262 | -------------------------------------------------------------------------------- /patches/wine-hotfixes/staging/ddraw-GetPickRecords/0001-ddraw-Implement-Pick-and-GetPickRecords.patch: -------------------------------------------------------------------------------- 1 | From f1dba65707a5a8ef5ec2d9c8213134b01cd735e2 Mon Sep 17 00:00:00 2001 2 | From: Matthew Wong 3 | Date: Fri, 18 Sep 2020 00:47:13 +0000 4 | Subject: [PATCH] ddraw: Implement Pick() and GetPickRecords(). 5 | 6 | Implement functions used by some games (notably LEGO Island) for 7 | determining which 3D object in a scene was clicked by the mouse cursor. 8 | Fighting Steel also uses this function for mouse over. Previous stubs 9 | would cause LEGO Island to crash upon any click and Fighting Steel 10 | to crash on game start. A patch posted years ago on the bug thread 11 | provided the minimum functionality to prevent crashes, but still 12 | rendered large portions of the game inaccessible without them 13 | implemented correctly. 14 | 15 | Picking has been implemented by adding a "pick mode" in 16 | d3d_execute_buffer_execute() which skips any drawing functions 17 | leaving just the vertex processing. Adds click tests for each triangle 18 | when in pick mode for creating an array of D3DPICKRECORDs. 19 | 20 | Stress testing reveals this patch's Pick() implementation may have 21 | slight inaccuracies to the original function; occasionally pixels right 22 | on triangle edges result in successful picks when they don't with the 23 | original function (and vice versa). It may be some sort of floating 24 | point rounding error or other algorithm difference that would be 25 | difficult to determine without seeing the original code. In practice, I 26 | believe this inaccuracy is so negligible that it won't produce any 27 | undesirable results for the user. 28 | 29 | Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=10729 30 | Signed-off-by: Matthew Wong 31 | Signed-off-by: Myah Caron 32 | --- 33 | dlls/ddraw/ddraw_private.h | 7 +- 34 | dlls/ddraw/device.c | 67 ++++++++++++-- 35 | dlls/ddraw/executebuffer.c | 176 ++++++++++++++++++++++++++++++++++++- 36 | 4 files changed, 371 insertions(+), 10 deletions(-) 37 | 38 | diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h 39 | index 01a9579651c..889a64219e5 100644 40 | --- a/dlls/ddraw/ddraw_private.h 41 | +++ b/dlls/ddraw/ddraw_private.h 42 | @@ -336,6 +336,11 @@ struct d3d_device 43 | struct d3d_viewport *current_viewport; 44 | D3DVIEWPORT7 active_viewport; 45 | 46 | + /* Pick data */ 47 | + D3DPICKRECORD *pick_records; 48 | + DWORD pick_record_count; 49 | + DWORD pick_record_size; 50 | + 51 | /* Required to keep track which of two available texture blending modes in d3ddevice3 is used */ 52 | BOOL legacyTextureBlending; 53 | D3DTEXTUREBLEND texture_map_blend; 54 | @@ -569,7 +574,7 @@ struct d3d_execute_buffer *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExec 55 | 56 | /* The execute function */ 57 | HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *execute_buffer, 58 | - struct d3d_device *device); 59 | + struct d3d_device *device, D3DRECT *pick_rect); 60 | 61 | /***************************************************************************** 62 | * IDirect3DVertexBuffer 63 | diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c 64 | index 80556e96787..b3b63d7b361 100644 65 | --- a/dlls/ddraw/device.c 66 | +++ b/dlls/ddraw/device.c 67 | @@ -349,6 +349,9 @@ static ULONG WINAPI d3d_device_inner_Release(IUnknown *iface) 68 | IDirect3DDevice3_DeleteViewport(&This->IDirect3DDevice3_iface, &vp->IDirect3DViewport3_iface); 69 | } 70 | 71 | + if (This->pick_record_size > 0) 72 | + free(This->pick_records); 73 | + 74 | TRACE("Releasing render target %p.\n", This->rt_iface); 75 | rt_iface = This->rt_iface; 76 | This->rt_iface = NULL; 77 | @@ -758,7 +761,7 @@ static HRESULT WINAPI d3d_device1_Execute(IDirect3DDevice *iface, 78 | 79 | /* Execute... */ 80 | wined3d_mutex_lock(); 81 | - hr = d3d_execute_buffer_execute(buffer, device); 82 | + hr = d3d_execute_buffer_execute(buffer, device, NULL); 83 | wined3d_mutex_unlock(); 84 | 85 | return hr; 86 | @@ -1025,16 +1028,44 @@ static HRESULT WINAPI d3d_device1_NextViewport(IDirect3DDevice *iface, 87 | * x2 and y2 are ignored. 88 | * 89 | * Returns: 90 | - * D3D_OK because it's a stub 91 | + * D3D_OK on success 92 | + * DDERR_INVALIDPARAMS if any of the parameters == NULL 93 | * 94 | *****************************************************************************/ 95 | static HRESULT WINAPI d3d_device1_Pick(IDirect3DDevice *iface, IDirect3DExecuteBuffer *buffer, 96 | IDirect3DViewport *viewport, DWORD flags, D3DRECT *rect) 97 | { 98 | - FIXME("iface %p, buffer %p, viewport %p, flags %#lx, rect %s stub!\n", 99 | - iface, buffer, viewport, flags, wine_dbgstr_rect((RECT *)rect)); 100 | + struct d3d_device *device = impl_from_IDirect3DDevice(iface); 101 | + struct d3d_execute_buffer *buffer_impl = unsafe_impl_from_IDirect3DExecuteBuffer(buffer); 102 | + struct d3d_viewport *viewport_impl = unsafe_impl_from_IDirect3DViewport(viewport); 103 | + HRESULT hr; 104 | 105 | - return D3D_OK; 106 | + TRACE("iface %p, buffer %p, viewport %p, flags %#lx, rect %s.\n", 107 | + iface, buffer, viewport, flags, wine_dbgstr_rect((RECT *)rect)); 108 | + 109 | + /* Sanity checks */ 110 | + if (!buffer) 111 | + { 112 | + WARN("NULL buffer, returning DDERR_INVALIDPARAMS\n"); 113 | + return DDERR_INVALIDPARAMS; 114 | + } 115 | + 116 | + if (!viewport) 117 | + { 118 | + WARN("NULL viewport, returning DDERR_INVALIDPARAMS\n"); 119 | + return DDERR_INVALIDPARAMS; 120 | + } 121 | + 122 | + if (FAILED(hr = IDirect3DDevice3_SetCurrentViewport 123 | + (&device->IDirect3DDevice3_iface, &viewport_impl->IDirect3DViewport3_iface))) 124 | + return hr; 125 | + 126 | + /* Execute the pick */ 127 | + wined3d_mutex_lock(); 128 | + hr = d3d_execute_buffer_execute(buffer_impl, device, rect); 129 | + wined3d_mutex_unlock(); 130 | + 131 | + return hr; 132 | } 133 | 134 | /***************************************************************************** 135 | @@ -1050,13 +1081,35 @@ static HRESULT WINAPI d3d_device1_Pick(IDirect3DDevice *iface, IDirect3DExecuteB 136 | * D3DPickRec: Address to store the resulting D3DPICKRECORD array. 137 | * 138 | * Returns: 139 | - * D3D_OK, because it's a stub 140 | + * D3D_OK always 141 | * 142 | *****************************************************************************/ 143 | static HRESULT WINAPI d3d_device1_GetPickRecords(IDirect3DDevice *iface, 144 | DWORD *count, D3DPICKRECORD *records) 145 | { 146 | - FIXME("iface %p, count %p, records %p stub!\n", iface, count, records); 147 | + struct d3d_device *device; 148 | + 149 | + TRACE("iface %p, count %p, records %p.\n", iface, count, records); 150 | + 151 | + /* Windows doesn't check if count is non-NULL */ 152 | + 153 | + wined3d_mutex_lock(); 154 | + 155 | + device = impl_from_IDirect3DDevice(iface); 156 | + 157 | + /* Set count to the number of pick records we have */ 158 | + *count = device->pick_record_count; 159 | + 160 | + /* It is correct usage according to documentation to call this function with records == NULL 161 | + to retrieve _just_ the record count, which the caller can then use to allocate an 162 | + appropriately sized array, then call this function again to fill that array with data. */ 163 | + if (records && count) 164 | + { 165 | + /* If we have a destination array and records to copy, copy them now */ 166 | + memcpy(records, device->pick_records, sizeof(*device->pick_records) * device->pick_record_count); 167 | + } 168 | + 169 | + wined3d_mutex_unlock(); 170 | 171 | return D3D_OK; 172 | } 173 | diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c 174 | index 13e639eda3f..bb050fe16b8 100644 175 | --- a/dlls/ddraw/executebuffer.c 176 | +++ b/dlls/ddraw/executebuffer.c 177 | @@ -45,15 +45,106 @@ static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) { 178 | TRACE("lpData : %p\n", lpDesc->lpData); 179 | } 180 | 181 | -HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d_device *device) 182 | +#define TRIANGLE_SIZE 3 183 | +/***************************************************************************** 184 | + * d3d_execute_buffer_pick_test 185 | + * 186 | + * Determines whether a "point" is inside a "triangle". Mainly used when 187 | + * executing a "pick" from an execute buffer to determine whether a pixel 188 | + * coordinate (often a mouse coordinate) is inside a triangle (and 189 | + * therefore clicking or hovering over a 3D object in the scene). This 190 | + * function uses triangle rasterization algorithms to determine if the 191 | + * pixel falls inside (using the top-left rule, in accordance with 192 | + * documentation). 193 | + * 194 | + * Params: 195 | + * x: The X coordinate of the point to verify. 196 | + * y: The Y coordinate of the point to verify. 197 | + * verts: An array of vertices describing the screen coordinates of the 198 | + * triangle. This function expects 3 elements in this array. 199 | + * 200 | + * Returns: 201 | + * TRUE if the pixel coordinate is inside this triangle 202 | + * FALSE if not 203 | + * 204 | + *****************************************************************************/ 205 | +static BOOL d3d_execute_buffer_pick_test(LONG x, LONG y, D3DTLVERTEX* verts) 206 | +{ 207 | + UINT i; 208 | + 209 | + for (i = 0; i < TRIANGLE_SIZE; i++) 210 | + { 211 | + D3DTLVERTEX* v1 = &verts[(i) % TRIANGLE_SIZE]; 212 | + D3DTLVERTEX* v2 = &verts[(i + 1) % TRIANGLE_SIZE]; 213 | + D3DVALUE bias = 0.0f; 214 | + 215 | + /* Edge function - determines whether pixel is inside triangle */ 216 | + D3DVALUE w = (v2->sx - v1->sx) * (y - v1->sy) - (v2->sy - v1->sy) * (x - v1->sx); 217 | + 218 | + /* Force top-left rule */ 219 | + if ((v1->sy == v2->sy && v1->sx > v2->sx) || (v1->sy < v2->sy)) 220 | + bias = 1.0f; 221 | + 222 | + if (w < bias) 223 | + return FALSE; 224 | + } 225 | + 226 | + return TRUE; 227 | +} 228 | + 229 | +/***************************************************************************** 230 | + * d3d_execute_buffer_z_value_at_coords 231 | + * 232 | + * Returns the Z point of a triangle given an X, Y coordinate somewhere inside 233 | + * the triangle. Used as the `dvZ` parameter of D3DPICKRECORD. 234 | + * 235 | + * Params: 236 | + * x: The X coordinate of the point to verify. 237 | + * y: The Y coordinate of the point to verify. 238 | + * verts: An array of vertices describing the screen coordinates of the 239 | + * triangle. This function expects 3 elements in this array. 240 | + * 241 | + * Returns: 242 | + * A floating-point Z value that can be used directly as the dvZ member of a 243 | + * D3DPICKRECORD. 244 | + * 245 | + *****************************************************************************/ 246 | +static D3DVALUE d3d_execute_buffer_z_value_at_coords(LONG x, LONG y, D3DTLVERTEX* verts) 247 | +{ 248 | + UINT i; 249 | + 250 | + D3DVALUE z1 = 0; 251 | + D3DVALUE z2 = 0; 252 | + 253 | + for (i = 0; i < TRIANGLE_SIZE; i++) 254 | + { 255 | + D3DTLVERTEX* v1 = &verts[i]; 256 | + D3DTLVERTEX* v2 = &verts[(i + 1) % TRIANGLE_SIZE]; 257 | + D3DTLVERTEX* v3 = &verts[(i + 2) % TRIANGLE_SIZE]; 258 | + 259 | + z1 += v3->sz * (x - v1->sx) * (y - v2->sy) - v2->sz * (x - v1->sx) * (y - v3->sy); 260 | + z2 += (x - v1->sx) * (y - v2->sy) - (x - v1->sx) * (y - v3->sy); 261 | + } 262 | + 263 | + return z1 / z2; 264 | +} 265 | + 266 | +HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d_device *device, 267 | + D3DRECT* pick_rect) 268 | { 269 | DWORD is = buffer->data.dwInstructionOffset; 270 | char *instr = (char *)buffer->desc.lpData + is; 271 | unsigned int i, primitive_size; 272 | - struct wined3d_map_desc map_desc; 273 | + struct wined3d_map_desc map_desc, vert_map_desc; 274 | struct wined3d_box box = {0}; 275 | HRESULT hr; 276 | 277 | + /* Variables used for picking */ 278 | + const unsigned int vertex_size = get_flexible_vertex_size(D3DFVF_TLVERTEX); 279 | + D3DTLVERTEX verts[TRIANGLE_SIZE]; 280 | + 281 | + device->pick_record_count = 0; 282 | + 283 | TRACE("ExecuteData :\n"); 284 | if (TRACE_ON(ddraw)) 285 | _dump_executedata(&(buffer->data)); 286 | @@ -69,6 +160,26 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d 287 | instr += sizeof(*current); 288 | primitive_size = 0; 289 | 290 | + if (pick_rect != NULL) 291 | + { 292 | + switch (current->bOpcode) 293 | + { 294 | + /* None of these opcodes seem to be necessary for picking */ 295 | + case D3DOP_POINT: 296 | + case D3DOP_LINE: 297 | + case D3DOP_STATETRANSFORM: 298 | + case D3DOP_STATELIGHT: 299 | + case D3DOP_STATERENDER: 300 | + case D3DOP_TEXTURELOAD: 301 | + case D3DOP_SPAN: 302 | + FIXME("ignoring opcode %d for picking\n", current->bOpcode); 303 | + instr += count * size; 304 | + continue; 305 | + default: 306 | + break; 307 | + } 308 | + } 309 | + 310 | switch (current->bOpcode) 311 | { 312 | case D3DOP_POINT: 313 | @@ -174,6 +285,66 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d 314 | { 315 | case 3: 316 | indices[(i * primitive_size) + 2] = ci->v3; 317 | + 318 | + if (pick_rect != NULL) { 319 | + UINT j; 320 | + 321 | + /* Get D3DTLVERTEX objects for each triangle vertex */ 322 | + for (j = 0; j < TRIANGLE_SIZE; j++) { 323 | + 324 | + /* Get index of vertex from D3DTRIANGLE struct */ 325 | + switch (j) { 326 | + case 0: box.left = vertex_size * ci->v1; break; 327 | + case 1: box.left = vertex_size * ci->v2; break; 328 | + case 2: box.left = vertex_size * ci->v3; break; 329 | + } 330 | + 331 | + box.right = box.left + vertex_size; 332 | + if (FAILED(hr = wined3d_resource_map(wined3d_buffer_get_resource(buffer->dst_vertex_buffer), 333 | + 0, &vert_map_desc, &box, WINED3D_MAP_WRITE))) { 334 | + return hr; 335 | + } else { 336 | + /* Copy vert data into stack array */ 337 | + verts[j] = *((D3DTLVERTEX*)vert_map_desc.data); 338 | + 339 | + wined3d_resource_unmap(wined3d_buffer_get_resource(buffer->dst_vertex_buffer), 0); 340 | + } 341 | + } 342 | + 343 | + /* Use vertices acquired above to test for clicking */ 344 | + if (d3d_execute_buffer_pick_test(pick_rect->x1, pick_rect->y1, verts)) 345 | + { 346 | + D3DPICKRECORD* record; 347 | + 348 | + device->pick_record_count++; 349 | + 350 | + /* Grow the array if necessary */ 351 | + if (device->pick_record_count > device->pick_record_size) 352 | + { 353 | + if (device->pick_record_size == 0) device->pick_record_size = 1; 354 | + device->pick_record_size *= 2; 355 | + device->pick_records = realloc(device->pick_records, 356 | + sizeof(*device->pick_records) * device->pick_record_size); 357 | + } 358 | + 359 | + /* Fill record parameters */ 360 | + record = &device->pick_records[device->pick_record_count - 1]; 361 | + 362 | + record->bOpcode = current->bOpcode; 363 | + record->bPad = 0; 364 | + 365 | + /* Write current instruction offset into file */ 366 | + record->dwOffset = (DWORD_PTR)instr - (DWORD_PTR)buffer->desc.lpData - is; 367 | + 368 | + /* Formula for returning the Z value at this X/Y */ 369 | + record->dvZ = d3d_execute_buffer_z_value_at_coords(pick_rect->x1, pick_rect->y1, verts); 370 | + 371 | + /* We have a successful pick so we can skip the rest of the triangles */ 372 | + instr += size * (count - i - 1); 373 | + count = i; 374 | + } 375 | + } 376 | + 377 | /* Drop through. */ 378 | case 2: 379 | indices[(i * primitive_size) + 1] = ci->v2; 380 | @@ -426,6 +597,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d 381 | end_of_buffer: 382 | return D3D_OK; 383 | } 384 | +#undef TRIANGLE_SIZE 385 | 386 | static inline struct d3d_execute_buffer *impl_from_IDirect3DExecuteBuffer(IDirect3DExecuteBuffer *iface) 387 | { 388 | -- 389 | 2.40.1 390 | 391 | -------------------------------------------------------------------------------- /patches/protonprep-valve-staging.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | revert_cmd() { 5 | git format-patch -1 "$1" --stdout | patch -p1 -R 6 | } 7 | 8 | ### (1) PREP SECTION ### 9 | 10 | ### END PREP SECTION ### 11 | 12 | ### (2) WINE PATCHING ### 13 | 14 | pushd wine 15 | git reset --hard HEAD 16 | git clean -xdf 17 | 18 | ### (2-1) PROBLEMATIC COMMIT REVERT SECTION ### 19 | 20 | # Bring back configure files. Staging uses them to regenerate fresh ones 21 | # https://github.com/ValveSoftware/wine/commit/e813ca5771658b00875924ab88d525322e50d39f 22 | 23 | revert_cmd e813ca5771658b00875924ab88d525322e50d39f 24 | revert_cmd 82fa1cf334159d5c4261f8f1ff345165e7942ec0 25 | 26 | # Revert proton font changes, Using them as non-proton wine build breaks Uplay 27 | 28 | revert_cmd 3a6319bd5469012e9617c2b84d0aebab757c9572 29 | revert_cmd aa91d771e84b737c95a7d23325040341bd1eeba7 30 | revert_cmd 9e3e8e972eeb814d009311084b32cd2aa8b3a64d 31 | revert_cmd 9a30f2a07494af20703954b98f0392ab1ca8be4a 32 | revert_cmd d4111819d68ecedb86876302b2ed46bd3437bc20 33 | revert_cmd ab960656bc6882ea73d4b713466824957d6d4331 34 | # revert_cmd b5f900925d06a90ae395b84e27a1ab8859b32f6a 35 | revert_cmd f1b6ae244813e151380755addd8f1beb84a02ee5 36 | revert_cmd 70570b8cdcf3d35b2c6dcd7a5311190162360fee 37 | 38 | ### END PROBLEMATIC COMMIT REVERT SECTION ### 39 | 40 | ### (2-2) WINE STAGING APPLY SECTION ### 41 | 42 | echo "WINE: -STAGING- applying staging patches" 43 | 44 | ../wine-staging/staging/patchinstall.py DESTDIR="." --all \ 45 | -W Compiler_Warnings \ 46 | -W winex11-_NET_ACTIVE_WINDOW \ 47 | -W user32-alttab-focus \ 48 | -W winex11-WM_WINDOWPOSCHANGING \ 49 | -W winex11-MWM_Decorations \ 50 | -W ntdll-Syscall_Emulation \ 51 | -W ntdll-Junction_Points \ 52 | -W server-File_Permissions \ 53 | -W server-Stored_ACLs \ 54 | -W eventfd_synchronization \ 55 | -W dbghelp-Debug_Symbols \ 56 | -W ddraw-Device_Caps \ 57 | -W ddraw-GetPickRecords \ 58 | -W Pipelight \ 59 | -W server-PeekMessage \ 60 | -W server-Realtime_Priority \ 61 | -W server-Signal_Thread \ 62 | -W loader-KeyboardLayouts \ 63 | -W msxml3-FreeThreadedXMLHTTP60 \ 64 | -W ntdll-ForceBottomUpAlloc \ 65 | -W ntdll-WRITECOPY \ 66 | -W ntdll-CriticalSection \ 67 | -W ntdll-Hide_Wine_Exports \ 68 | -W server-default_integrity \ 69 | -W user32-rawinput-mouse \ 70 | -W user32-rawinput-mouse-experimental \ 71 | -W user32-recursive-activation \ 72 | -W wineboot-ProxySettings \ 73 | -W winex11-UpdateLayeredWindow \ 74 | -W winex11-Vulkan_support \ 75 | -W wintab32-improvements \ 76 | -W kernel32-CopyFileEx \ 77 | -W shell32-Progress_Dialog \ 78 | -W shell32-ACE_Viewer \ 79 | -W fltmgr.sys-FltBuildDefaultSecurityDescriptor \ 80 | -W sapi-ISpObjectToken-CreateInstance \ 81 | -W user32-FlashWindowEx \ 82 | -W wined3d-zero-inf-shaders \ 83 | -W kernel32-Debugger \ 84 | -W ntdll-NtDevicePath \ 85 | -W winspool.drv-ClosePrinter \ 86 | -W winmm-mciSendCommandA \ 87 | -W winex11-XEMBED \ 88 | -W winex11-CandidateWindowPos \ 89 | -W winex11-Window_Style \ 90 | -W winex11-ime-check-thread-data \ 91 | -W winex11.drv-Query_server_position \ 92 | -W user32-Mouse_Message_Hwnd \ 93 | -W d3dx9_36-D3DXStubs \ 94 | -W ntdll-ext4-case-folder \ 95 | -W ntdll-HashLinks \ 96 | -W ntdll-NtQuerySection \ 97 | -W ntdll-NtSetLdtEntries \ 98 | -W ntdll-ProcessQuotaLimits \ 99 | -W ntdll_reg_flush \ 100 | -W odbc-remove-unixodbc \ 101 | -W winedevice-Default_Drivers \ 102 | -W winex11-Fixed-scancodes \ 103 | -W ntdll-RtlQueryPackageIdentity \ 104 | -W d3dx9_36-DDS \ 105 | -W d3dx11_43-D3DX11CreateTextureFromMemory \ 106 | -W d3dx9_36-BumpLuminance \ 107 | -W shell32-SHFileOperation_Move \ 108 | -W shell32-registry-lookup-app \ 109 | -W Staging 110 | 111 | # NOTE: Some patches are applied manually because they -do- apply, just not cleanly, ie with patch fuzz. 112 | # A detailed list of why the above patches are disabled is listed below: 113 | 114 | # winex11-_NET_ACTIVE_WINDOW - Causes origin to freeze 115 | # winex11-WM_WINDOWPOSCHANGING - Causes origin to freeze 116 | # user32-alttab-focus - relies on winex11-_NET_ACTIVE_WINDOW -- may be able to be added now that EA Desktop has replaced origin? 117 | # winex11-MWM_Decorations - not compatible with fullscreen hack 118 | # winex11-key_translation - replaced by proton's keyboard patches, disabled in 8.0 119 | # ntdll-Syscall_Emulation - already applied 120 | # ntdll-Junction_Points - breaks CEG drm 121 | # server-File_Permissions - requires ntdll-Junction_Points 122 | # server-Stored_ACLs - requires ntdll-Junction_Points 123 | # eventfd_synchronization - already applied 124 | # ddraw-Device_Caps - conflicts with proton's changes 125 | # ddraw-version-check - conflicts with proton's changes, disabled in 8.0 126 | # ddraw-GetPickRecords - applied manually 127 | 128 | # dbghelp-Debug_Symbols - see below: 129 | # Sancreed — 11/21/2021 130 | # Heads up, it appears that a bunch of Ubisoft Connect games (3/3 I had installed and could test) will crash 131 | # almost immediately on newer Wine Staging/TKG inside pe_load_debug_info function unless the dbghelp-Debug_Symbols staging # patchset is disabled. 132 | 133 | # Compiler_Warnings - breaks some proton patches 134 | # ** ntdll-DOS_Attributes - disabled in 8.0 135 | # server-PeekMessage - eplaced by proton's version 136 | # server-Realtime_Priority - replaced by proton's patches 137 | # server-Signal_Thread - breaks steamclient for some games -- notably DBFZ 138 | # Pipelight - for MS Silverlight, not needed 139 | # dinput-joy-mappings - disabled in favor of proton's gamepad patches 140 | # ** loader-KeyboardLayouts - applied manually -- needed to prevent Overwatch huge FPS drop 141 | # msxml3-FreeThreadedXMLHTTP60 - already applied 142 | # ntdll-ForceBottomUpAlloc - already applied 143 | # ** ntdll-WRITECOPY - mostly already applied, needs specific manual patch 144 | # ntdll-CriticalSection - breaks ffxiv and deep rock galactic 145 | # ** ntdll-Hide_Wine_Exports - applied manually 146 | # server-default_integrity - causes steam.exe to stay open after a game closes 147 | # user32-rawinput-mouse - already applied 148 | # user32-rawinput-mouse-experimental - already applied 149 | # user32-recursive-activation - already applied 150 | # ** wineboot-ProxySettings - applied manually 151 | # ** winex11-UpdateLayeredWindow - applied manually 152 | # ** winex11-Vulkan_support - applied manually 153 | # wintab32-improvements - for wacom tablets, not needed 154 | # kernel32-CopyFileEx - breaks various installers 155 | # shell32-Progress_Dialog - relies on kernel32-CopyFileEx 156 | # shell32-ACE_Viewer - adds a UI tab, not needed, relies on kernel32-CopyFileEx 157 | # ** fltmgr.sys-FltBuildDefaultSecurityDescriptor - applied manually 158 | # sapi-ISpObjectToken-CreateInstance - already applied 159 | # ** user32-FlashWindowEx - applied manually 160 | # wined3d-zero-inf-shaders - already applied 161 | # ** kernel32-Debugger - applied manually 162 | # mfplat-streaming-support - already applied 163 | # ntdll-NtDevicePath - already applied 164 | # winspool.drv-ClosePrinter - not required, only adds trace lines, for printers. 165 | # winmm-mciSendCommandA - not needed, only applies to win 9x mode 166 | # ** winex11-XEMBED - applied manually 167 | # d3dx9_36-D3DXStubs - already applied 168 | # ** ntdll-ext4-case-folder - applied manually 169 | # * ntdll-HashLinks - upstreamed 170 | # ntdll_reg_flush - already applied 171 | # ** winedevice-Default_Drivers - applied manually 172 | # ** winex11-Fixed-scancodes - applied manually 173 | # odbc-remove-unixodbc - not required, used for ODBC drivers for use with SQL applications, not gaming related. 174 | # ntdll-RtlQueryPackageIdentity - tests only, not used, do not apply cleanly. 175 | # 176 | # Paul Gofman — Yesterday at 3:49 PM 177 | # that’s only for desktop integration, spamming native menu’s with wine apps which won’t probably start from there anyway 178 | 179 | # dinput-joy-mappings - disabled in favor of proton's gamepad patches -- currently also disabled in upstream staging 180 | # mfplat-streaming-support -- interferes with proton's mfplat -- currently also disabled in upstream staging 181 | # wined3d-SWVP-shaders -- interferes with proton's wined3d -- currently also disabled in upstream staging 182 | # wined3d-Indexed_Vertex_Blending -- interferes with proton's wined3d -- currently also disabled in upstream staging 183 | # d3dx9_36-DDS - incompatible with upstream proton 7/27/24 184 | # d3dx11_43-D3DX11CreateTextureFromMemory - already applied 185 | # d3dx9_36-BumpLuminance - already applied 186 | # shell32-SHFileOperation_Move - already applied 187 | # shell32-registry-lookup-app - already applied 188 | # **Staging - applied manually 189 | 190 | echo "WINE: -STAGING- loader-KeyboardLayouts manually applied" 191 | patch -Np1 < ../patches/wine-hotfixes/staging/loader-KeyboardLayouts/0001-loader-Add-Keyboard-Layouts-registry-enteries.patch 192 | patch -Np1 < ../patches/wine-hotfixes/staging/loader-KeyboardLayouts/0002-user32-Improve-GetKeyboardLayoutList.patch 193 | 194 | echo "WINE: -STAGING- ddraw-GetPickRecords manually applied" 195 | patch -Np1 < ../patches/wine-hotfixes/staging/ddraw-GetPickRecords/0001-ddraw-Implement-Pick-and-GetPickRecords.patch 196 | 197 | echo "WINE: -STAGING- ntdll-Hide_Wine_Exports manually applied" 198 | patch -Np1 < ../wine-staging/patches/ntdll-Hide_Wine_Exports/0001-ntdll-Add-support-for-hiding-wine-version-informatio.patch 199 | 200 | echo "WINE: -STAGING- ntdll-WRITECOPY manually applied" 201 | patch -Np1 < ../patches/wine-hotfixes/staging/ntdll-WRITECOPY/0007-ntdll-Report-unmodified-WRITECOPY-pages-as-shared.patch 202 | 203 | echo "WINE: -STAGING- wineboot-ProxySettings manually applied" 204 | patch -Np1 < ../patches/wine-hotfixes/staging/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch 205 | 206 | echo "WINE: -STAGING- winex11-Vulkan_support manually applied" 207 | patch -Np1 < ../patches/wine-hotfixes/staging/winex11-Vulkan_support/0001-winex11-Specify-a-default-vulkan-driver-if-one-not-f.patch 208 | 209 | echo "WINE: -STAGING- user32-FlashWindowEx manually applied" 210 | patch -Np1 < ../patches/wine-hotfixes/staging/user32-FlashWindowEx/0001-user32-Improve-FlashWindowEx-message-and-return-valu.patch 211 | 212 | echo "WINE: -STAGING- kernel32-Debugger manually applied" 213 | patch -Np1 < ../wine-staging/patches/kernel32-Debugger/0001-kernel32-Always-start-debugger-on-WinSta0.patch 214 | 215 | echo "WINE: -STAGING- ntdll-ext4-case-folder manually applied" 216 | patch -Np1 < ../wine-staging/patches/ntdll-ext4-case-folder/0002-ntdll-server-Mark-drive_c-as-case-insensitive-when-c.patch 217 | 218 | echo "WINE: -STAGING- ntdll-NtQuerySection manually applied" 219 | patch -Np1 < ../wine-staging/patches/ntdll-NtQuerySection/0002-kernel32-tests-Add-tests-for-NtQuerySection.patch 220 | 221 | echo "WINE: -STAGING- ntdll-NtSetLdtEntries manually applied" 222 | patch -Np1 < ../wine-staging/patches/ntdll-NtSetLdtEntries/0001-ntdll-Implement-NtSetLdtEntries.patch 223 | patch -Np1 < ../wine-staging/patches/ntdll-NtSetLdtEntries/0002-libs-wine-Allow-to-modify-reserved-LDT-entries.patch 224 | 225 | echo "WINE: -STAGING- ntdll-ProcessQuotaLimits manually applied" 226 | patch -Np1 < ../wine-staging/patches/ntdll-ProcessQuotaLimits/0001-ntdll-Add-fake-data-implementation-for-ProcessQuotaL.patch 227 | 228 | echo "WINE: -STAGING- winedevice-Default_Drivers manually applied" 229 | patch -Np1 < ../wine-staging/patches/winedevice-Default_Drivers/0001-win32k.sys-Add-stub-driver.patch 230 | patch -Np1 < ../wine-staging/patches/winedevice-Default_Drivers/0002-dxgkrnl.sys-Add-stub-driver.patch 231 | patch -Np1 < ../wine-staging/patches/winedevice-Default_Drivers/0003-dxgmms1.sys-Add-stub-driver.patch 232 | patch -Np1 < ../wine-staging/patches/winedevice-Default_Drivers/0004-programs-winedevice-Load-some-common-drivers-and-fix.patch 233 | 234 | echo "WINE: -STAGING- winex11-Fixed-scancodes manually applied" 235 | patch -Np1 < ../patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0001-winecfg-Move-input-config-options-to-a-dedicated-tab.patch 236 | patch -Np1 < ../patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0002-winex11-Always-create-the-HKCU-configuration-registr.patch 237 | patch -Np1 < ../patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0003-winex11-Write-supported-keyboard-layout-list-in-regi.patch 238 | patch -Np1 < ../patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0004-winecfg-Add-a-keyboard-layout-selection-config-optio.patch 239 | patch -Np1 < ../patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0005-winex11-Use-the-user-configured-keyboard-layout-if-a.patch 240 | patch -Np1 < ../patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0006-winecfg-Add-a-keyboard-scancode-detection-toggle-opt.patch 241 | patch -Np1 < ../patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0007-winex11-Use-scancode-high-bit-to-set-KEYEVENTF_EXTEN.patch 242 | patch -Np1 < ../patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0008-winex11-Support-fixed-X11-keycode-to-scancode-conver.patch 243 | patch -Np1 < ../patches/wine-hotfixes/staging/winex11-Fixed-scancodes/0009-winex11-Disable-keyboard-scancode-auto-detection-by-.patch 244 | 245 | echo "WINE: -STAGING- fltmgr.sys-FltBuildDefaultSecurityDescriptor manually applied" 246 | patch -Np1 < ../wine-staging/patches/fltmgr.sys-FltBuildDefaultSecurityDescriptor/0001-fltmgr.sys-Implement-FltBuildDefaultSecurityDescript.patch 247 | patch -Np1 < ../wine-staging/patches/fltmgr.sys-FltBuildDefaultSecurityDescriptor/0002-fltmgr.sys-Create-import-library.patch 248 | patch -Np1 < ../wine-staging/patches/fltmgr.sys-FltBuildDefaultSecurityDescriptor/0003-ntoskrnl.exe-Add-FltBuildDefaultSecurityDescriptor-t.patch 249 | 250 | echo "WINE: -STAGING- Staging manually applied" 251 | patch -Np1 < ../patches/wine-hotfixes/staging/Staging/0001-ntdll-Print-a-warning-message-specifying-the-wine-st.patch 252 | patch -Np1 < ../patches/wine-hotfixes/staging/Staging/0002-winelib-Append-Staging-at-the-end-of-the-version-s.patch 253 | 254 | ### END WINE STAGING APPLY SECTION ### 255 | 256 | ### (2-3) GAME PATCH SECTION ### 257 | 258 | echo "WINE: -GAME FIXES- assetto corsa hud fix" 259 | patch -Np1 < ../patches/game-patches/assettocorsa-hud.patch 260 | 261 | echo "WINE: -GAME FIXES- killer instinct vulkan fix" 262 | patch -Np1 < ../patches/game-patches/killer-instinct-winevulkan_fix.patch 263 | 264 | echo "WINE: -GAME FIXES- add file search workaround hack for Phantasy Star Online 2 (WINE_NO_OPEN_FILE_SEARCH)" 265 | patch -Np1 < ../patches/game-patches/pso2_hack.patch 266 | 267 | echo "WINE: -GAME FIXES- add xinput support to Dragon Age Inquisition" 268 | patch -Np1 < ../patches/game-patches/dai_xinput.patch 269 | 270 | echo "WINE: -GAME FIXES- add set current directory workaround for Vanguard Saga of Heroes" 271 | patch -Np1 < ../patches/game-patches/vgsoh.patch 272 | 273 | echo "WINE: -GAME FIXES- add __TRY/__EXCEPT_PAGE_FAULT wnsprintfA xDefiant patch because of a bad arg passed by the game that would exit to desktop" 274 | patch -Np1 < ../patches/game-patches/xdefiant.patch 275 | 276 | echo "WINE: -GAME FIXES- Fix Uplay not launching with fsync enabled after converting proton-wine to wine-ge" 277 | patch -Np1 < ../patches/game-patches/uplay-fsync-proton-wine-hotfix.patch 278 | 279 | ### END GAME PATCH SECTION ### 280 | 281 | ### (2-4) WINE HOTFIX/BACKPORT SECTION ### 282 | 283 | ### END WINE HOTFIX/BACKPORT SECTION ### 284 | 285 | ### (2-5) WINE PENDING UPSTREAM SECTION ### 286 | 287 | # https://github.com/Frogging-Family/wine-tkg-git/commit/ca0daac62037be72ae5dd7bf87c705c989eba2cb 288 | echo "WINE: -PENDING- unity crash hotfix" 289 | patch -Np1 < ../patches/wine-hotfixes/pending/unity_crash_hotfix.patch 290 | 291 | # https://bugs.winehq.org/show_bug.cgi?id=51683 292 | echo "WINE: -PENDING- Guild Wars 2 patch" 293 | patch -Np1 < ../patches/wine-hotfixes/pending/hotfix-guild_wars_2.patch 294 | 295 | # https://github.com/ValveSoftware/wine/pull/205 296 | # https://github.com/ValveSoftware/Proton/issues/4625 297 | echo "WINE: -PENDING- Add WINE_DISABLE_SFN option. (Yakuza 5 cutscenes fix)" 298 | patch -Np1 < ../patches/wine-hotfixes/pending/ntdll_add_wine_disable_sfn.patch 299 | 300 | echo "WINE: -PENDING- ncrypt: NCryptDecrypt implementation (PSN Login for Ghost of Tsushima)" 301 | patch -Np1 < ../patches/wine-hotfixes/pending/NCryptDecrypt_implementation.patch 302 | 303 | echo "WINE: -PENDING- DXGI_FORMAT_R8G8B8A8_UNORM: Suport for DXGI_FORMAT_R8G8B8A8_UNORM on d2d_wic_render_target_init (Alt:V GTA V coustom client)" 304 | patch -Np1 < ../patches/wine-hotfixes/pending/support_for_DXGI_FORMAT_R8G8B8A8_UNORM.patch 305 | ### END WINE PENDING UPSTREAM SECTION ### 306 | 307 | 308 | ### (2-6) PROTON-GE ADDITIONAL CUSTOM PATCHES ### 309 | 310 | echo "WINE: -PROTON- Remove steamclient patches for normal WINE usage" 311 | patch -Np1 < ../patches/proton/0001-De-steamify-proton-s-WINE-so-it-can-be-used-as-a-sta.patch 312 | 313 | echo "WINE: -PROTON- Fix non-steam controller input" 314 | patch -Np1 < ../patches/proton/0001-wine.inf-fix-non-steam-controller-input.patch 315 | 316 | echo "WINE: -FSR- fullscreen hack fsr patch" 317 | patch -Np1 < ../patches/proton/47-proton-fshack-AMD-FSR-complete.patch 318 | 319 | echo "WINE: -PENDING- Add options to disable proton media converter." 320 | patch -Np1 < ../patches/wine-hotfixes/pending/add-envvar-to-gate-media-converter.patch 321 | 322 | echo "WINE: -Nvidia Reflex- Support VK_NV_low_latency2" 323 | patch -Np1 < ../patches/proton/83-nv_low_latency_wine.patch 324 | 325 | echo "WINE: -CUSTOM- Downgrade MESSAGE to TRACE to remove write_watches spam" 326 | patch -Np1 < ../patches/proton/0001-ntdll-Downgrade-using-kernel-write-watches-from-MESS.patch 327 | 328 | echo "WINE: -CUSTOM- Fix wine bug #56653 - GetLogicalProcessorInformation can be missing Cache information" 329 | patch -Np1 < ../patches/wine-hotfixes/pending/wine-bug-56653.patch 330 | 331 | echo "WINE: -CUSTOM- Add WINE_NO_WM_DECORATION option to disable window decorations so that borders behave properly" 332 | patch -Np1 < ../patches/proton/WINE_NO_WM_DECORATION.patch 333 | 334 | echo "WINE: -CUSTOM- Add PROTON_PREFER_SDL option to make it not prefer hidraw and instead expose both sdl and hidraw" 335 | patch -Np1 < ../patches/proton/PREFER_SDL.patch 336 | 337 | echo "WINE: -CUSTOM- Do not create symlinks to home directory folders if WINEUSERSANDBOX=1" 338 | patch -Np1 < ../patches/proton/0001-shell32-Add-WINEUSERSANDBOX-environment-variable.patch 339 | 340 | echo "WINE: -CUSTOM- Set custom wm class through WINE_WMCLASS=" 341 | patch -Np1 < ../patches/proton/0001-winex11.drv-Add-the-ability-to-set-custom-wmclass-fo.patch 342 | 343 | ### REGENERATE WINE FILES 344 | # need to run these after applying patches (order matters) 345 | ./dlls/winevulkan/make_vulkan -x vk.xml 346 | ./tools/make_specfiles 347 | ./tools/make_requests 348 | autoreconf -fiv 349 | 350 | popd 351 | 352 | ### END PROTON-GE ADDITIONAL CUSTOM PATCHES ### 353 | ### END WINE PATCHING ### 354 | 355 | --------------------------------------------------------------------------------