Skip to content

Commit 51eabc8

Browse files
committed
DevilutionX: Controller support
Starts DevilutionX with a generated SDL2 game controller config. Follow-up to batocera-linux#2510, made possible by batocera-linux#2552. DevilutionX version bumped to get fixed for the following controller issues on the DevilutionX side: * diasurgical/DevilutionX#930 * diasurgical/DevilutionX#931 Signed-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>
1 parent 16ad21e commit 51eabc8

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

package/batocera/core/batocera-configgen/configgen/configgen/generators/devilutionx/devilutionxGenerator.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import Command
44
from generators.Generator import Generator
5+
import controllersConfig
6+
57

68
class DevilutionXGenerator(Generator):
79

@@ -10,5 +12,9 @@ def generate(self, system, rom, playersControllers, gameResolution):
1012
"--config-dir", "/userdata/system/config/devilutionx",
1113
"--save-dir", "/userdata/saves/devilutionx"]
1214
if system.isOptSet('showFPS') and system.getOptBoolean('showFPS') == True:
13-
commandArray.append("-f")
14-
return Command.Command(array=commandArray)
15+
commandArray.append("-f")
16+
return Command.Command(
17+
array=commandArray,
18+
env={
19+
'SDL_GAMECONTROLLERCONFIG': controllersConfig.generateSdlGameControllerConfig(playersControllers)
20+
})

package/batocera/emulators/devilutionx/devilutionx.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#
55
################################################################################
66

7-
# The first commit that allows specifying `--config-dir` (24 Nov 2020)
8-
DEVILUTIONX_VERSION = 9c7d6c96
7+
DEVILUTIONX_VERSION = b10b4381
98
DEVILUTIONX_SITE = $(call github,diasurgical,devilutionx,$(DEVILUTIONX_VERSION))
109
DEVILUTIONX_DEPENDENCIES = sdl2 sdl2_mixer sdl2_image sdl2_ttf libsodium
1110

0 commit comments

Comments
 (0)