Compare commits
7 commits
master
...
testing/wi
| Author | SHA1 | Date | |
|---|---|---|---|
| 3655af5828 | |||
| 2c15a0fc75 | |||
| e467153ddc | |||
| 1ae2675966 | |||
| 850eb049cd | |||
| f788451498 | |||
| df4e866a6e |
7 changed files with 11417 additions and 23 deletions
7
flake.lock
generated
7
flake.lock
generated
|
|
@ -23,15 +23,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1624148921,
|
||||
"narHash": "sha256-FAhKTXZV67C36hK5lPvZfsFt+QY1QSHYQXwGXqpOChs=",
|
||||
"lastModified": 1624271441,
|
||||
"narHash": "sha256-26QNDCdRE5mPOWYJrPGpVzgrJ3ZxqvWOONfeMsjryz4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f2122ea5815648effdd97157c7bf4e9a1a6dbb34",
|
||||
"rev": "7e567a3d092b7de69cdf5deaeb8d9526de230916",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs = { url = "github:NixOS/nixpkgs"; };
|
||||
nixpkgs = { url = "github:NixOS/nixpkgs/nixos-unstable"; };
|
||||
home-manager = { url = "github:LavaDesu/home-manager/xsession-profilePath"; };
|
||||
secrets = { url = "github:LavaDesu/flakes-secrets"; };
|
||||
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
outputs = inputs: with inputs;
|
||||
let
|
||||
revCount = "296773";
|
||||
revCount = "297098";
|
||||
base = { config, ... }: {
|
||||
system = {
|
||||
configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
||||
|
|
|
|||
11241
overlays/misc/wine/0001-Revert-to-5.14-winepulse.drv.patch
Normal file
11241
overlays/misc/wine/0001-Revert-to-5.14-winepulse.drv.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,18 +1,27 @@
|
|||
diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c
|
||||
index 55579ecda80..6f7ff732135 100644
|
||||
--- a/dlls/winepulse.drv/pulse.c
|
||||
+++ b/dlls/winepulse.drv/pulse.c
|
||||
@@ -93,9 +93,6 @@ static REFERENCE_TIME pulse_min_period[2], pulse_def_period[2];
|
||||
|
||||
static UINT g_phys_speakers_mask = 0;
|
||||
From 4a2c23db4eddd827ac81513af43bc92475ad7d3a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian 'gonX' Jensen <gonx@gonx.dk>
|
||||
Date: Sun, 20 Jun 2021 17:02:15 +0200
|
||||
Subject: [PATCH 2/4] 5.14 Latency Fix
|
||||
|
||||
---
|
||||
dlls/winepulse.drv/mmdevdrv.c | 22 ++++++++++++++--------
|
||||
1 file changed, 14 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
|
||||
index 07407089ac5af65eb13d6e00b6d0969a61ec5589..3ed47e38c830987e4bcc2e9f5c59c7773fe686f1 100644
|
||||
--- a/dlls/winepulse.drv/mmdevdrv.c
|
||||
+++ b/dlls/winepulse.drv/mmdevdrv.c
|
||||
@@ -68,9 +68,6 @@ enum DriverPriority {
|
||||
Priority_Preferred
|
||||
};
|
||||
|
||||
-static const REFERENCE_TIME MinimumPeriod = 30000;
|
||||
-static const REFERENCE_TIME DefaultPeriod = 100000;
|
||||
-
|
||||
static pthread_mutex_t pulse_mutex;
|
||||
static pthread_cond_t pulse_cond = PTHREAD_COND_INITIALIZER;
|
||||
static pa_context *pulse_ctx;
|
||||
static pa_mainloop *pulse_ml;
|
||||
|
||||
@@ -481,11 +478,12 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
|
||||
@@ -510,11 +507,12 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
|
||||
if (length)
|
||||
pulse_def_period[!render] = pulse_min_period[!render] = pa_bytes_to_usec(10 * length, &ss);
|
||||
|
||||
|
|
@ -30,10 +39,11 @@ index 55579ecda80..6f7ff732135 100644
|
|||
|
||||
wfx->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
|
||||
wfx->cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
|
||||
@@ -836,6 +834,13 @@ static NTSTATUS pulse_create_stream(void *args)
|
||||
if (duration < 3 * period)
|
||||
duration = 3 * period;
|
||||
|
||||
@@ -1640,6 +1638,14 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient2 *iface,
|
||||
if (duration <= 2 * period)
|
||||
period /= 2;
|
||||
}
|
||||
+
|
||||
+ const char* denv = getenv("STAGING_AUDIO_DURATION");
|
||||
+ if (denv) {
|
||||
+ int val = atoi(denv);
|
||||
|
|
@ -41,6 +51,9 @@ index 55579ecda80..6f7ff732135 100644
|
|||
+ printf("Staging audio duration set to %d.\n", val);
|
||||
+ }
|
||||
+
|
||||
stream->period_bytes = pa_frame_size(&stream->ss) * muldiv(period, stream->ss.rate, 10000000);
|
||||
period_bytes = pa_frame_size(&This->ss) * MulDiv(period, This->ss.rate, 10000000);
|
||||
|
||||
stream->bufsize_frames = ceil((duration / 10000000.) * params->fmt->nSamplesPerSec);
|
||||
if (duration < 20000000)
|
||||
--
|
||||
2.32.0
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From e17fb0bda3c042beec05b918e2d171211742e01c Mon Sep 17 00:00:00 2001
|
||||
From: Torge Matthies <openglfreak@googlemail.com>
|
||||
Date: Fri, 12 Feb 2021 13:58:35 +0100
|
||||
Subject: [PATCH 3/4] secur32: Fix crash from invalid context in
|
||||
InitializeSecurityContextW.
|
||||
|
||||
Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
|
||||
---
|
||||
dlls/secur32/schannel.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
|
||||
index 9c7e98b32a4c55588a78ac6c3811b89db9e09db7..b2baefbc8caaf370c9c0ec31b7daf4cc9bb7fbb8 100644
|
||||
--- a/dlls/secur32/schannel.c
|
||||
+++ b/dlls/secur32/schannel.c
|
||||
@@ -983,6 +983,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
|
||||
unsigned char *ptr;
|
||||
|
||||
ctx = schan_get_object(phContext->dwLower, SCHAN_HANDLE_CTX);
|
||||
+ if (!ctx) return SEC_E_INVALID_HANDLE;
|
||||
if (pInput)
|
||||
{
|
||||
idx = schan_find_sec_buffer_idx(pInput, 0, SECBUFFER_TOKEN);
|
||||
--
|
||||
2.32.0
|
||||
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
From b1ac42097f6f6e038a2e1fac773bc31e829fb891 Mon Sep 17 00:00:00 2001
|
||||
From: Torge Matthies <openglfreak@googlemail.com>
|
||||
Date: Mon, 5 Apr 2021 05:48:28 +0200
|
||||
Subject: [PATCH 4/4] kernelbase: Cache last used locale->sortguid mapping.
|
||||
|
||||
get_language_sort reads from the registry, which is not particularly fast.
|
||||
Staging's implementation of CompareStringEx calls this function, and if
|
||||
CompareStringEx is used in a loop over many elements, it will slow down the
|
||||
application by a lot (> 30 seconds vs a few hundred ms in osu!, depends
|
||||
on the CPU and the number of installed beatmaps).
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50923
|
||||
Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
|
||||
---
|
||||
dlls/kernelbase/locale.c | 42 +++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 41 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
|
||||
index 89b3577505348a001577ba3549b8af2d1e6cb456..db97383f2858455f8c329f326d4b3f9f3ec606cb 100644
|
||||
--- a/dlls/kernelbase/locale.c
|
||||
+++ b/dlls/kernelbase/locale.c
|
||||
@@ -619,6 +619,21 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
|
||||
};
|
||||
static CRITICAL_SECTION locale_section = { &critsect_debug, -1, 0, 0, 0, 0 };
|
||||
|
||||
+static struct
|
||||
+{
|
||||
+ WCHAR locale[LOCALE_NAME_MAX_LENGTH]; /* The locale name */
|
||||
+ const struct sortguid *guid; /* The cached associated GUID */
|
||||
+} sortguid_cache;
|
||||
+
|
||||
+static CRITICAL_SECTION sortguid_cache_section;
|
||||
+static CRITICAL_SECTION_DEBUG sortguid_cache_section_debug =
|
||||
+{
|
||||
+ 0, 0, &sortguid_cache_section,
|
||||
+ { &sortguid_cache_section_debug.ProcessLocksList, &sortguid_cache_section_debug.ProcessLocksList },
|
||||
+ 0, 0, { (DWORD_PTR)(__FILE__ ": sortguid_cache_section") }
|
||||
+};
|
||||
+static CRITICAL_SECTION sortguid_cache_section = { &sortguid_cache_section_debug, -1, 0, 0, 0, 0 };
|
||||
+
|
||||
|
||||
static void init_sortkeys( DWORD *ptr )
|
||||
{
|
||||
@@ -656,7 +671,7 @@ static const struct sortguid *find_sortguid( const GUID *guid )
|
||||
}
|
||||
|
||||
|
||||
-static const struct sortguid *get_language_sort( const WCHAR *locale )
|
||||
+static const struct sortguid *get_language_sort_uncached( const WCHAR *locale )
|
||||
{
|
||||
WCHAR *p, *end, buffer[LOCALE_NAME_MAX_LENGTH], guidstr[39];
|
||||
const struct sortguid *ret;
|
||||
@@ -699,6 +714,31 @@ done:
|
||||
}
|
||||
|
||||
|
||||
+static const struct sortguid *get_language_sort( const WCHAR *locale )
|
||||
+{
|
||||
+ const struct sortguid *ret = NULL;
|
||||
+
|
||||
+ if (!locale) return get_language_sort_uncached( locale );
|
||||
+
|
||||
+ RtlEnterCriticalSection( &sortguid_cache_section );
|
||||
+
|
||||
+ if (sortguid_cache.guid && !wcsncmp( sortguid_cache.locale, locale, LOCALE_NAME_MAX_LENGTH ))
|
||||
+ {
|
||||
+ ret = sortguid_cache.guid;
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ ret = get_language_sort_uncached( locale );
|
||||
+
|
||||
+ lstrcpynW( sortguid_cache.locale, locale, LOCALE_NAME_MAX_LENGTH );
|
||||
+ sortguid_cache.guid = ret;
|
||||
+
|
||||
+done:
|
||||
+ RtlLeaveCriticalSection( &sortguid_cache_section );
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static LCID locale_to_lcid( WCHAR *win_name )
|
||||
{
|
||||
WCHAR *p;
|
||||
--
|
||||
2.32.0
|
||||
|
||||
|
|
@ -1,6 +1,32 @@
|
|||
self: super: {
|
||||
self: super:
|
||||
let
|
||||
wine = super.fetchFromGitHub rec {
|
||||
owner = "wine-mirror";
|
||||
repo = "wine";
|
||||
rev = "1de583a4dac7d704b2d4291ada4a1885cd8cd1c9";
|
||||
sha256 = "1mbyy3szwgi0wjgb30hqy8y9azx6xnjrz80j3j1liv3194bmsia1";
|
||||
};
|
||||
|
||||
staging = super.fetchFromGitHub rec {
|
||||
owner = "wine-staging";
|
||||
repo = "wine-staging";
|
||||
rev = "432c0b5a838cb8ebb52d0d37150a57e393b6f33d";
|
||||
sha256 = "0gbci8fjvl1bdz7fj4bh25mqrgi1i04q5na2ckv9hj9nh9x7crbm";
|
||||
};
|
||||
in {
|
||||
wine-osu = (super.wineStaging.overrideDerivation(o: {
|
||||
patches = (o.patches or []) ++ [ ./misc/wine-lowlatency.patch ];
|
||||
patches = (o.patches or []) ++ builtins.map (e: ./misc/wine + ("/" + e)) (builtins.attrNames (builtins.readDir ./misc/wine));
|
||||
|
||||
src = wine;
|
||||
postPatch = self.postPatch or "" + ''
|
||||
patchShebangs tools
|
||||
cp -r ${staging}/patches .
|
||||
chmod +w patches
|
||||
cd patches
|
||||
patchShebangs gitapply.sh
|
||||
./patchinstall.sh DESTDIR="$PWD/.." --all
|
||||
cd ..
|
||||
'';
|
||||
})).override {
|
||||
wineRelease = "staging";
|
||||
wineBuild = "wineWow";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue