From f654dd29047d72a0ff7cd0c3f42bbe7af81aae61 Mon Sep 17 00:00:00 2001 From: William Horvath Date: Sat, 7 Dec 2024 13:52:09 -0800 Subject: [PATCH] proton: update to cachyos-9.0-20241206 (release proton-osu-9-11) - fix flickering when opening/closing osu - update umu-launcher to master and bump bundled standalone Python to 3.13.1, also improve the binary security of the wrapper - any upstream proton/umu/protonfixes updates since late October --- patches/proton/0003-proton-umuify.patch | 95 ------------------- ...05-Makefile.in-build-umu-protonfixes.patch | 63 ++++++------ ...Makefile.in-redist-dir-to-build-name.patch | 10 +- ...rv-disable-wm-decorations-by-default.patch | 56 +++++++++++ ...Improved-osu-childwindow-hack-PROTON.patch | 2 +- ...t-frame-pointers-and-enforce-stack-a.patch | 18 ++-- patches/wine/0006-build/musl-precision.patch | 21 ++-- ...lback-to-RTKIT-for-thread-priorities.patch | 7 +- ...n-PulseAudio-write-callbacks-instead.patch | 35 +------ ...Specify-the-buffer-to-try-memlocking.patch | 8 -- setup.sh | 4 +- 11 files changed, 129 insertions(+), 190 deletions(-) delete mode 100644 patches/proton/0003-proton-umuify.patch create mode 100644 patches/wine/0004-proton-annoyances/Revert-winex11.drv-disable-wm-decorations-by-default.patch diff --git a/patches/proton/0003-proton-umuify.patch b/patches/proton/0003-proton-umuify.patch deleted file mode 100644 index ee1b16b..0000000 --- a/patches/proton/0003-proton-umuify.patch +++ /dev/null @@ -1,95 +0,0 @@ ---- a/proton -+++ b/proton -@@ -1595,6 +1595,18 @@ class Session: - "1549250", # Undecember - ]: - argv = [g_proton.wine_bin, "c:\\Program Files (x86)\\Steam\\steam.exe"] -+ # Don't use steam if it's not a steam game -+ # Prevent this warning for non-steam games: -+ # [S_API FAIL] SteamAPI_Init() failed; no appID found. -+ # Either launch the game from Steam, or put the file steam_appid.txt containing the correct appID in your game folder. -+ elif "UMU_ID" in os.environ: -+ log(sys.argv[2]) -+ if len(sys.argv) >= 3 and sys.argv[2].startswith('/'): -+ log("Executable a unix path, launching with /unix option.") -+ argv = [g_proton.wine64_bin, "start", "/unix"] -+ else: -+ log("Executable is inside wine prefix, launching normally.") -+ argv = [g_proton.wine64_bin] - else: - argv = [g_proton.wine64_bin, "c:\\windows\\system32\\steam.exe"] - -@@ -1612,12 +1624,14 @@ class Session: - return rc - - if __name__ == "__main__": -- if "STEAM_COMPAT_DATA_PATH" not in os.environ: -+ if not "STEAM_COMPAT_DATA_PATH" in os.environ: - log("No compat data path?") - sys.exit(1) - - g_proton = Proton(os.path.dirname(sys.argv[0])) - -+ g_proton.cleanup_legacy_dist() -+ g_proton.do_steampipe_fixups() - - g_compatdata = CompatData(os.environ["STEAM_COMPAT_DATA_PATH"]) - -@@ -1625,12 +1639,34 @@ if __name__ == "__main__": - - g_session.init_wine() - -+ # This is needed for protonfixes -+ os.environ["PROTON_DLL_COPY"] = "*" -+ - if g_proton.missing_default_prefix(): -- log("Default prefix is missing, something is very wrong.") -- sys.exit(1) -+ g_proton.make_default_prefix() - - g_session.init_session(sys.argv[1] != "runinprefix") - -+ # Allow umu clients to run winetricks verbs and be the frontend for them -+ if ( -+ g_session.env.get("UMU_ID") -+ and g_session.env.get("EXE", "").endswith("winetricks") -+ and g_session.env.get("PROTON_VERB") == "waitforexitandrun" -+ ): -+ wt_verbs = " ".join(sys.argv[2:][2:]) -+ g_session.env["WINE"] = g_proton.wine_bin -+ g_session.env["WINELOADER"] = g_proton.wine_bin -+ g_session.env["WINESERVER"] = g_proton.wineserver_bin -+ g_session.env["WINETRICKS_LATEST_VERSION_CHECK"] = "disabled" -+ g_session.env["LD_PRELOAD"] = "" -+ -+ log(f"Running winetricks verbs in prefix: {wt_verbs}") -+ rc = subprocess.run(sys.argv[2:], check=False, env=g_session.env).returncode -+ -+ sys.exit(rc) -+ -+ import protonfixes -+ - #determine mode - rc = 0 - if sys.argv[1] == "run": -@@ -1641,20 +1677,8 @@ if __name__ == "__main__": - elif sys.argv[1] == "waitforexitandrun": - #wait for wineserver to shut down - g_session.run_proc([g_proton.wineserver_bin, "-w"]) -- winedrv = "x11" -- if os.environ.get("PROTON_ENABLE_WAYLAND", False) and os.environ["PROTON_ENABLE_WAYLAND"] == "1": -- del os.environ["DISPLAY"] -- winedrv = "wayland" -- g_session.run_proc( -- [g_proton.wine_bin, "reg.exe", "add", "HKCU\\Software\\Wine\\Drivers", "/v", "Graphics", "/d", f"{winedrv}", "/f"] -- ) -- g_session.run_proc([g_proton.wineserver_bin, "-w"]) - #then run - rc = g_session.run() -- g_session.run_proc( -- [g_proton.wine_bin, "reg.exe", "add", "HKCU\\Software\\Wine\\Drivers", "/v", "Graphics", "/d", "x11", "/f"] -- ) -- g_session.run_proc([g_proton.wineserver_bin, "-w"]) - elif sys.argv[1] == "runinprefix": - rc = g_session.run_proc([g_proton.wine_bin] + sys.argv[2:]) - elif sys.argv[1] == "destroyprefix": diff --git a/patches/proton/0005-Makefile.in-build-umu-protonfixes.patch b/patches/proton/0005-Makefile.in-build-umu-protonfixes.patch index 2c4caff..3241466 100644 --- a/patches/proton/0005-Makefile.in-build-umu-protonfixes.patch +++ b/patches/proton/0005-Makefile.in-build-umu-protonfixes.patch @@ -1,8 +1,8 @@ diff --git a/Makefile.in b/Makefile.in -index 367b720..eb2c792 100644 +index f62b380..ba2aa1e 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -545,6 +545,23 @@ $(DIST_WINEOPENXR_JSON64): $(WINEOPENXR_SRC)/wineopenxr64.json default_pfx +@@ -545,6 +545,24 @@ $(DIST_WINEOPENXR_JSON64): $(WINEOPENXR_SRC)/wineopenxr64.json default_pfx all-dist: $(DIST_WINEOPENXR_JSON64) @@ -19,6 +19,7 @@ index 367b720..eb2c792 100644 + +$(PROTONFIXES_TARGET): $(OBJ)/.build-protonfixes + cd $(SRCDIR)/protonfixes && make install ++ rm -rf $(PROTONFIXES_TARGET) + cp -a $(SRCDIR)/protonfixes/dist/protonfixes $(PROTONFIXES_TARGET) + rm -r $(SRCDIR)/protonfixes/dist + @@ -26,33 +27,39 @@ index 367b720..eb2c792 100644 ## ## steam.exe -@@ -1322,7 +1339,14 @@ deploy: all - redist: all - mkdir -p $(REDIST_DIR) - rsync --delete -arx $(DST_BASE)/ $(REDIST_DIR) -- -+ cp $(PROTONFIXES_TARGET)/cabextract $(REDIST_DIR)/files/bin/ -+ cp -a $(PROTONFIXES_TARGET)/libmspack.so $(REDIST_DIR)/files/lib64/ -+ cp -a $(PROTONFIXES_TARGET)/libmspack.so.0 $(REDIST_DIR)/files/lib64/ -+ cp $(PROTONFIXES_TARGET)/libmspack.so.0.1.0 $(REDIST_DIR)/files/lib64/ -+ mv $(REDIST_DIR) $(BUILD_NAME) -+## XZ_OPT="-9 -T0" tar -Jcf $(BUILD_NAME).tar.xz --numeric-owner --owner=0 --group=0 --null $(BUILD_NAME) -+## sha512sum $(BUILD_NAME).tar.xz > $(BUILD_NAME).sha512sum -+## @echo "Proton build available at $(BUILD_NAME).tar.xz" +@@ -1392,24 +1410,6 @@ $(DIST_AV1_PATENTS): $(AV1_PATENTS) - ## - ## make module=$dllname module[32,64] -diff --git a/Makefile.in b/Makefile.in -index 16405fc..0c0818c 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -558,7 +558,8 @@ $(OBJ)/.build-protonfixes: + all-dist: $(DIST_LICENSE) $(DIST_OFL_LICENSE) $(DIST_AV1_PATENTS) - $(PROTONFIXES_TARGET): $(OBJ)/.build-protonfixes - cd $(SRCDIR)/protonfixes && make install +-## +-## protonfixes +-## +- +-PROTONFIXES_TARGET := $(addprefix $(DST_BASE)/,protonfixes) +-$(PROTONFIXES_TARGET): $(addprefix $(SRCDIR)/,protonfixes) +- +-$(OBJ)/.build-protonfixes: +- cd $(SRCDIR)/protonfixes && make +- touch $(@) +- +-$(PROTONFIXES_TARGET): $(OBJ)/.build-protonfixes +- cd $(SRCDIR)/protonfixes && make install - cp -a $(SRCDIR)/protonfixes/dist/protonfixes $(PROTONFIXES_TARGET) -+ rm -rf $(PROTONFIXES_TARGET) -+ cp -a $(SRCDIR)/protonfixes/dist/protonfixes $(PROTONFIXES_TARGET) - rm -r $(SRCDIR)/protonfixes/dist +- rm -r $(SRCDIR)/protonfixes/dist +- +-all-dist: $(PROTONFIXES_TARGET) +- + ## + ## proton(.py), filelock.py, etc. + ## +@@ -1465,10 +1465,6 @@ redist: all + cp -a $(PROTONFIXES_TARGET)/libmspack.so.0 $(REDIST_DIR)/files/lib64/ + cp $(PROTONFIXES_TARGET)/libmspack.so.0.1.0 $(REDIST_DIR)/files/lib64/ + mv $(REDIST_DIR) $(BUILD_NAME) +- tar -cvzf $(BUILD_NAME).tar.gz $(BUILD_NAME) +- sha512sum $(BUILD_NAME).tar.gz > $(BUILD_NAME).sha512sum +- @echo "Proton build available at $(BUILD_NAME).tar.gz" +- - all-dist: $(PROTONFIXES_TARGET) + ## + ## make module=$dllname module[32,64] diff --git a/patches/proton/0008-Makefile.in-redist-dir-to-build-name.patch b/patches/proton/0008-Makefile.in-redist-dir-to-build-name.patch index 8ebb502..d6284a2 100644 --- a/patches/proton/0008-Makefile.in-redist-dir-to-build-name.patch +++ b/patches/proton/0008-Makefile.in-redist-dir-to-build-name.patch @@ -1,5 +1,5 @@ diff --git a/Makefile.in b/Makefile.in -index fe870e2..c001a16 100644 +index 1551dcb..1ee8c7c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -41,7 +41,7 @@ DST_LIBDIR64 := $(DST_DIR)/lib64 @@ -11,11 +11,11 @@ index fe870e2..c001a16 100644 ifneq ($(UNSTRIPPED_BUILD),) STRIP := -@@ -1344,7 +1344,6 @@ redist: all +@@ -1464,7 +1464,6 @@ redist: all cp -a $(PROTONFIXES_TARGET)/libmspack.so $(REDIST_DIR)/files/lib64/ cp -a $(PROTONFIXES_TARGET)/libmspack.so.0 $(REDIST_DIR)/files/lib64/ cp $(PROTONFIXES_TARGET)/libmspack.so.0.1.0 $(REDIST_DIR)/files/lib64/ - mv $(REDIST_DIR) $(BUILD_NAME) - ## XZ_OPT="-9 -T0" tar -Jcf $(BUILD_NAME).tar.xz --numeric-owner --owner=0 --group=0 --null $(BUILD_NAME) - ## sha512sum $(BUILD_NAME).tar.xz > $(BUILD_NAME).sha512sum - ## @echo "Proton build available at $(BUILD_NAME).tar.xz" + + ## + ## make module=$dllname module[32,64] diff --git a/patches/wine/0004-proton-annoyances/Revert-winex11.drv-disable-wm-decorations-by-default.patch b/patches/wine/0004-proton-annoyances/Revert-winex11.drv-disable-wm-decorations-by-default.patch new file mode 100644 index 0000000..e185a8b --- /dev/null +++ b/patches/wine/0004-proton-annoyances/Revert-winex11.drv-disable-wm-decorations-by-default.patch @@ -0,0 +1,56 @@ +This reverts commit b6ba4e0ccc645c078900db8fbafadc9ac4eec125. +--- a/dlls/winex11.drv/x11drv_main.c ++++ b/dlls/winex11.drv/x11drv_main.c +@@ -78,7 +78,7 @@ + BOOL use_system_cursors = TRUE; + BOOL grab_fullscreen = FALSE; + BOOL managed_mode = TRUE; ++BOOL decorated_mode = TRUE; +-BOOL decorated_mode = FALSE; + BOOL private_color_map = FALSE; + int primary_monitor = 0; + BOOL client_side_graphics = TRUE; +--- a/loader/wine.inf.in ++++ b/loader/wine.inf.in +@@ -99,7 +99,6 @@ AddReg=\ + ThemeManager,\ + VersionInfo,\ + LicenseInformation,\ +- WineDecorateWindows,\ + NVIDIANGX, \ + ProtonOverrides,\ + SteamClient +@@ -130,7 +129,6 @@ AddReg=\ + ThemeManager,\ + VersionInfo,\ + LicenseInformation,\ +- WineDecorateWindows,\ + NVIDIANGX, \ + TTS, \ + ProtonOverrides,\ +@@ -178,7 +176,6 @@ AddReg=\ + Tapi,\ + VersionInfo,\ + LicenseInformation,\ +- WineDecorateWindows,\ + NVIDIANGX, \ + ProtonOverrides,\ + SteamClient.ntamd64 +@@ -3208,6 +3205,3 @@ HKCU,Software\Wine\AppDefaults\RiftApart.exe\DllOverrides,"atiadlxx",,"builtin" + HKCU,Software\Wine\AppDefaults\ffxvi.exe\DllOverrides,"atiadlxx",,"builtin" + HKLM,Software\Wow6432Node\lucasarts entertainment company llc\Star Wars: Episode I Racer\v1.0,"Display Height",0x10001,480 + HKLM,Software\Wow6432Node\lucasarts entertainment company llc\Star Wars: Episode I Racer\v1.0,"Display Width",0x10001,640 +- +-[WineDecorateWindows] +-HKCU,Software\Wine\AppDefaults\DarkSoulsIII.exe\X11 Driver,"Decorated",,"N" +--- a/programs/winecfg/x11drvdlg.c ++++ b/programs/winecfg/x11drvdlg.c +@@ -152,7 +152,7 @@ + CheckDlgButton(dialog, IDC_ENABLE_MANAGED, BST_UNCHECKED); + free(buf); + ++ buf = get_reg_key(config_key, keypath(L"X11 Driver"), L"Decorated", L"Y"); +- buf = get_reg_key(config_key, keypath(L"X11 Driver"), L"Decorated", L"N"); + if (IS_OPTION_TRUE(*buf)) + CheckDlgButton(dialog, IDC_ENABLE_DECORATED, BST_CHECKED); + else diff --git a/patches/wine/0005-osu/0003-winex11-Improved-osu-childwindow-hack-PROTON.patch b/patches/wine/0005-osu/0003-winex11-Improved-osu-childwindow-hack-PROTON.patch index e49bf4a..9014e5f 100644 --- a/patches/wine/0005-osu/0003-winex11-Improved-osu-childwindow-hack-PROTON.patch +++ b/patches/wine/0005-osu/0003-winex11-Improved-osu-childwindow-hack-PROTON.patch @@ -85,7 +85,7 @@ index 0c3c81bcda6..68c623e008c 100644 - return (!no_child_clipping_cached && NtUserGetWindowRelative( hwnd, GW_CHILD )) || NtUserGetAncestor( hwnd, GA_PARENT ) != NtUserGetDesktopWindow(); +static BOOL drawable_needs_clipping( HWND hwnd, BOOL known_child ) +{ -+ if (!use_osu_child_hack() || editor_visible( NtUserGetDesktopWindow() )) ++ if (!use_osu_child_hack() || (NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYERED) || editor_visible( NtUserGetDesktopWindow() )) + { + if (NtUserGetAncestor( hwnd, GA_PARENT ) != NtUserGetDesktopWindow()) return TRUE; /* child window, needs compositing */ + if (NtUserGetWindowRelative( hwnd, GW_CHILD )) return TRUE; /* window has children, needs compositing */ diff --git a/patches/wine/0006-build/configure.ac-Omit-frame-pointers-and-enforce-stack-a.patch b/patches/wine/0006-build/configure.ac-Omit-frame-pointers-and-enforce-stack-a.patch index c099e18..f0346fe 100644 --- a/patches/wine/0006-build/configure.ac-Omit-frame-pointers-and-enforce-stack-a.patch +++ b/patches/wine/0006-build/configure.ac-Omit-frame-pointers-and-enforce-stack-a.patch @@ -11,22 +11,28 @@ potential compiler bugs (like the one in mingw-gcc for march=avx512). 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 9a372361164..b23b539a2e6 100644 +index b6418b0..b990804 100644 --- a/configure.ac +++ b/configure.ac -@@ -1007,9 +1007,10 @@ This is an error since --enable-archs=$wine_arch was requested.])]) - WINE_TRY_PE_CFLAGS([-Wenum-conversion]) +@@ -1003,6 +1003,7 @@ This is an error since --enable-archs=$wine_arch was requested.])]) + WINE_TRY_PE_CFLAGS([-ffunction-sections]) WINE_TRY_PE_CFLAGS([-Wno-misleading-indentation], [AS_VAR_APPEND([MSHTML_CFLAGS],[" -Wno-misleading-indentation"])]) + WINE_TRY_PE_CFLAGS([-fomit-frame-pointer]) + dnl clang had broken -fms-hotpatch support before version 18 (https://github.com/llvm/llvm-project/pull/77245) + WINE_TRY_PE_CFLAGS([-fms-hotpatch -DMIN_CLANG_VERSION=18], +@@ -1013,8 +1014,7 @@ This is an error since --enable-archs=$wine_arch was requested.])]) + WINE_TRY_PE_CFLAGS([-flarge-source-files -Wmisleading-indentation],[AS_VAR_APPEND(${wine_arch}_EXTRACFLAGS,[" -Wno-misleading-indentation"])]) + case $wine_arch in - i386) WINE_TRY_PE_CFLAGS([-fno-omit-frame-pointer]) -+ i386) WINE_TRY_PE_CFLAGS([-mstack-alignment=2]) +- WINE_TRY_PE_CFLAGS([-mstack-alignment=4]) ++ i386) WINE_TRY_PE_CFLAGS([-mstack-alignment=4]) WINE_TRY_PE_CFLAGS([-mpreferred-stack-boundary=2]) WINE_TRY_PE_CFLAGS([-Wl,--disable-stdcall-fixup], [AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--disable-stdcall-fixup"])]) ;; -@@ -2009,7 +2010,6 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy= +@@ -2033,7 +2033,6 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy= case $HOST_ARCH in dnl gcc-4.6+ omits frame pointers by default, breaking some copy protections @@ -34,7 +40,7 @@ index 9a372361164..b23b539a2e6 100644 x86_64) case $host_os in dnl Mingw uses Windows 64-bit types, not Unix ones -@@ -2029,6 +2029,7 @@ int a(int b, ...) { __builtin_ms_va_list list; __builtin_ms_va_start(list,b); }] +@@ -2052,6 +2051,7 @@ int a(int b, ...) { __builtin_ms_va_list list; __builtin_ms_va_start(list,b); }] esac ;; arm) WINE_TRY_CFLAGS([-Wincompatible-function-pointer-types],[EXTRACFLAGS="$EXTRACFLAGS -Wno-error=incompatible-function-pointer-types"]) ;; diff --git a/patches/wine/0006-build/musl-precision.patch b/patches/wine/0006-build/musl-precision.patch index aafbd53..f71b524 100644 --- a/patches/wine/0006-build/musl-precision.patch +++ b/patches/wine/0006-build/musl-precision.patch @@ -15,14 +15,13 @@ diff --git a/configure.ac b/configure.ac index 11111111111..11111111111 100644 --- a/configure.ac +++ b/configure.ac -@@ -925,6 +925,10 @@ do - AS_VAR_APPEND([${wine_arch}_EXTRACFLAGS],[" $llvm_extra_cflags"]) - AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" $llvm_extra_ldflags"]) - CFLAGS="$llvm_extra_cflags $llvm_cflags" -+ else -+ case $wine_arch in -+ i386) AC_SUBST(MUSL_I386_FLAGS,"-ffloat-store") ;; -+ esac - fi - AS_VAR_SET([${wine_arch}_TARGET],[$target])]) - AS_VAR_POPDEF([wine_cv_crosscc]) +@@ -921,6 +921,9 @@ do + AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" $llvm_extra_ldflags"]) + CFLAGS="$llvm_extra_cflags $llvm_cflags" + else ++ case $wine_arch in ++ i386) AC_SUBST(MUSL_I386_FLAGS,"-ffloat-store") ;; ++ esac + AS_VAR_PUSHDEF([wine_cv_crosscc], [wine_cv_${wine_arch}_crosscc]) + AC_CACHE_CHECK([whether $CC works], wine_cv_crosscc, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [AS_VAR_SET([wine_cv_crosscc],[yes])], [AS_VAR_SET([wine_cv_crosscc],[no])])]) diff --git a/patches/wine/0007-priority/0007-server-Fallback-to-RTKIT-for-thread-priorities.patch b/patches/wine/0007-priority/0007-server-Fallback-to-RTKIT-for-thread-priorities.patch index a2fd93f..33ecae4 100644 --- a/patches/wine/0007-priority/0007-server-Fallback-to-RTKIT-for-thread-priorities.patch +++ b/patches/wine/0007-priority/0007-server-Fallback-to-RTKIT-for-thread-priorities.patch @@ -24,14 +24,13 @@ diff --git a/server/Makefile.in b/server/Makefile.in index 11111111111..11111111111 100644 --- a/server/Makefile.in +++ b/server/Makefile.in -@@ -50,7 +50,8 @@ SOURCES = \ +@@ -50,6 +50,7 @@ SOURCES = \ wineserver.man.in \ winstation.c --UNIX_LIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) $(PROCSTAT_LIBS) -flto=auto -flto-partition=one -fdevirtualize-at-ltrans $(CFLAGS) -+UNIX_LIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) $(PROCSTAT_LIBS) $(DBUS_LIBS) -flto=auto -flto-partition=one -fdevirtualize-at-ltrans $(CFLAGS) +-UNIX_LIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) $(PROCSTAT_LIBS) ++UNIX_LIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) $(PROCSTAT_LIBS) $(DBUS_LIBS) +UNIX_CFLAGS = $(DBUS_CFLAGS) - EXTRADEFS = -flto=auto -flto-partition=one -fdevirtualize-at-ltrans unicode_EXTRADEFS = -DNLSDIR="\"${nlsdir}\"" -DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\" diff --git a/server/thread.c b/server/thread.c diff --git a/patches/wine/0012-audio/0001-winepulse-Rely-on-PulseAudio-write-callbacks-instead.patch b/patches/wine/0012-audio/0001-winepulse-Rely-on-PulseAudio-write-callbacks-instead.patch index 8bf0af5..28f5847 100644 --- a/patches/wine/0012-audio/0001-winepulse-Rely-on-PulseAudio-write-callbacks-instead.patch +++ b/patches/wine/0012-audio/0001-winepulse-Rely-on-PulseAudio-write-callbacks-instead.patch @@ -993,47 +993,22 @@ index 17ac52d6ed7..02207f344f6 100644 2.46.0 diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c -index 1954d0ff111..11770b90793 100644 +index 062720c..accf37e 100644 --- a/dlls/winepulse.drv/pulse.c +++ b/dlls/winepulse.drv/pulse.c -@@ -2510,11 +2530,15 @@ static NTSTATUS pulse_set_sample_rate(void *args) - - new_ss = stream->ss; - new_ss.rate = params->rate; -- new_bufsize_frames = ceil((stream->duration / 10000000.) * new_ss.rate); -- size = new_bufsize_frames * 2 * pa_frame_size(&stream->ss); - -- if (NtAllocateVirtualMemory(GetCurrentProcess(), (void **)&new_buffer, -- zero_bits, &size, MEM_COMMIT, PAGE_READWRITE)) { -+ if (stream->duration < 20000000) -+ new_bufsize_frames = ceil((stream->duration / 10000000.) * new_ss.rate); -+ else -+ new_bufsize_frames = 2 * new_ss.rate; -+ size = stream->bufsize_bytes = new_bufsize_frames * pa_frame_size(&stream->ss); -+ -+ if (NtAllocateVirtualMemory(GetCurrentProcess(), (void **)&new_buffer, zero_bits, &size, MEM_COMMIT, PAGE_READWRITE)) -+ { - hr = E_OUTOFMEMORY; - goto exit; - } -@@ -2533,17 +2557,15 @@ static NTSTATUS pulse_set_sample_rate(void *args) +@@ -2571,12 +2571,11 @@ static NTSTATUS pulse_set_sample_rate(void *args) wait_pa_operation_complete(pa_stream_flush(stream->stream, pulse_op_cb, &success)); stream->clock_lastpos = stream->clock_written = 0; - stream->pa_offs_bytes = stream->lcl_offs_bytes = 0; - stream->held_bytes = stream->pa_held_bytes = 0; - stream->period_bytes = pa_frame_size(&new_ss) * muldiv(stream->mmdev_period_usec, new_ss.rate, 1000000); -- stream->real_bufsize_bytes = size; + stream->wri_offs_bytes = stream->lcl_offs_bytes = stream->held_bytes = 0; + stream->period_bytes = pa_frame_size(&new_ss) * muldiv(stream->def_period / 10, new_ss.rate, 1000000); - stream->bufsize_frames = new_bufsize_frames; stream->ss = new_ss; - size = 0; - NtFreeVirtualMemory(GetCurrentProcess(), (void **)&stream->local_buffer, &size, MEM_RELEASE); - -- silence_buffer(new_ss.format, new_buffer, stream->real_bufsize_bytes); -+ silence_buffer(new_ss.format, new_buffer, size); - stream->local_buffer = new_buffer; +- silence_buffer(new_ss.format, stream->local_buffer, stream->real_bufsize_bytes); ++ silence_buffer(new_ss.format, stream->local_buffer, stream->bufsize_bytes); exit: + pulse_unlock(); \ No newline at end of file diff --git a/patches/wine/0012-audio/0005-winepulse-Specify-the-buffer-to-try-memlocking.patch b/patches/wine/0012-audio/0005-winepulse-Specify-the-buffer-to-try-memlocking.patch index a47c98a..556b9fa 100644 --- a/patches/wine/0012-audio/0005-winepulse-Specify-the-buffer-to-try-memlocking.patch +++ b/patches/wine/0012-audio/0005-winepulse-Specify-the-buffer-to-try-memlocking.patch @@ -56,14 +56,6 @@ index 74253d9..833b9ff 100644 return TRUE; } -@@ -2620,6 +2633,7 @@ static NTSTATUS pulse_set_sample_rate(void *args) - silence_buffer(new_ss.format, new_buffer, size); - stream->local_buffer = new_buffer; - -+ try_memlock(stream, size, BUFTYPE_LOCAL); - exit: - pulse_unlock(); - -- 2.46.2 diff --git a/setup.sh b/setup.sh index c9d08e4..50024f8 100755 --- a/setup.sh +++ b/setup.sh @@ -1,11 +1,11 @@ #!/bin/bash -pkgver=9-10 +pkgver=9-11 buildname="proton-osu" pkgname="${buildname}-${pkgver}" protonurl=https://github.com/CachyOS/proton-cachyos.git -protontag=cachyos-9.0-20241031 +protontag=cachyos-9.0-20241206 protonsdk="registry.gitlab.steamos.cloud/proton/sniper/sdk:latest" umu_protonfixesurl=https://github.com/Open-Wine-Components/umu-protonfixes.git