Capture mouse by default.

main
Philipp 2021-07-21 22:16:00 +02:00
parent 78237f36ac
commit e0c66bc804
No known key found for this signature in database
GPG Key ID: 2258EE3B85DE1748
2 changed files with 13 additions and 1 deletions

5
captureMouse.reg Normal file
View File

@ -0,0 +1,5 @@
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
"GrabFullscreen"="Y"

View File

@ -8,7 +8,8 @@
wineGlobalEnv ? [ "DXVK_STATE_CACHE=0" ],
winePatches ? [ ./patches/joyaxis.patch ],
virtualDesktop ? null,
registryFiles ? [ ]
registryFiles ? [ ],
captureMouse ? true
}:
#check wether string is two positive integers separated by x
@ -36,6 +37,10 @@ let
name = "win10.reg";
text = ./win10.reg;
};
captureMouseReg = pkgs.writeTextFile {
name = "captureMouse.reg";
text = ./captureMouse.reg;
};
script = pkgs.writeShellScriptBin binName ''
#sane bash
set -eo pipefail
@ -70,6 +75,8 @@ let
mkdir -p "$launcherCachePers" "$WINEPREFIX/drive_c/users/$USER/AppData/Roaming/"
ln -s "$launcherCachePers" "$WINEPREFIX/drive_c/users/$USER/AppData/Roaming/"
${lib.optionalString captureMouse ("${regEdit} ${captureMouseReg.text}")}
#apply custom user registry files
${lib.concatMapStrings (x: "${regEdit} " + x + "\n") registryFiles}