From 1d25bb4d8124ccfdb2c776c9b9089fbeeaa68432 Mon Sep 17 00:00:00 2001 From: Mathieu Comandon Date: Sat, 30 Dec 2017 23:50:14 -0800 Subject: [PATCH] Add option to override architecture of Xinput libs --- lutris/runners/wine.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lutris/runners/wine.py b/lutris/runners/wine.py index 0a24c407c..1912bd9a8 100644 --- a/lutris/runners/wine.py +++ b/lutris/runners/wine.py @@ -585,6 +585,15 @@ class wine(Runner): 'default': False, 'help': "Use the dlls from kozec/dumbxinputemu" }, + { + 'option': 'xinput-arch', + 'label': 'Xinput architecture', + 'type': 'choice', + 'choices': [('Same as wine prefix', ''), + ('32 bit', 'win32'), + ('64 bit', 'win64')], + 'default': '' + }, { 'option': 'Desktop', 'label': 'Windowed (virtual desktop)', @@ -928,7 +937,8 @@ class wine(Runner): for dll_file in dll_files: xinput_dest_path = os.path.join(x360ce_path, dll_file) - dll_path = os.path.join(datapath.get(), 'controllers/{}-{}'.format(mode, self.wine_arch)) + xinput_arch = self.runner_config.get('xinput-arch') or self.wine_arch + dll_path = os.path.join(datapath.get(), 'controllers/{}-{}'.format(mode, xinput_arch)) if not os.path.exists(xinput_dest_path): source_file = dll_file if mode == 'dumbxinputemu' else 'xinput1_3.dll' shutil.copyfile(os.path.join(dll_path, source_file), xinput_dest_path)