From ea6bc745c64b7832d3cea2d5ae3748c0f81109c3 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 26 May 2014 14:11:25 -0400 Subject: setup: Add default config for Xbox360 on Linux. The Xbox360 controller is handled differently by different operating systems, and the layout is different on Linux to Windows. Detect the Linux layout and set some appropriate defaults. --- src/setup/joystick.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/setup') diff --git a/src/setup/joystick.c b/src/setup/joystick.c index b57667f4..4cc62fe1 100644 --- a/src/setup/joystick.c +++ b/src/setup/joystick.c @@ -206,6 +206,26 @@ static const joystick_config_t xbox360_controller[] = {NULL, 0}, }; +// Xbox 360 controller under Linux. +static const joystick_config_t xbox360_controller_linux[] = +{ + {"joystick_x_axis", CREATE_HAT_AXIS(0, HAT_AXIS_HORIZONTAL)}, + {"joystick_y_axis", CREATE_HAT_AXIS(0, HAT_AXIS_VERTICAL)}, + // Ideally we'd like the trigger buttons to be strafe left/right + // But Linux presents each trigger button as its own axis, which + // we can't really work with. So we have to settle for a + // suboptimal setup. + {"joyb_fire", 2}, // X + {"joyb_speed", 0}, // A + {"joyb_jump", 3}, // Y + {"joyb_use", 1}, // B + {"joyb_strafeleft", 4}, // LB + {"joyb_straferight", 5}, // RB + {"joyb_menu_activate", 7}, // Start + {"joyb_prevweapon", 6}, // Back + {NULL, 0}, +}; + // Logitech Dual Action (F310, F710). Thanks to Brad Harding for details. static const joystick_config_t logitech_f310_controller[] = { @@ -249,6 +269,13 @@ static const known_joystick_t known_joysticks[] = xbox360_controller, }, + // Xbox 360 controller as it appears on Linux. + { + "Microsoft X-Box 360 pad", + 6, 11, 1, + xbox360_controller_linux, + }, + { "Logitech Dual Action", 4, 12, 1, -- cgit v1.2.3 From 46dbe96efd039d49a4a43603f823340520eccfaa Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Thu, 12 Jun 2014 18:03:39 -0700 Subject: Add desktop entries for all the games, make the Setup launch generic The same icon is used for all four games, even though it's designed to resemble Doom's logo and looks a bit silly with all of them lined up. Also the Setup Desktop Entry now only launches chocolate-setup, which then prompts for the game to configure. This avoids cluttering up a DE's Preferences menu, control panel, or however it will be displayed. --- src/setup/setup.desktop.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/setup') diff --git a/src/setup/setup.desktop.in b/src/setup/setup.desktop.in index 4b1cf69c..91decb41 100644 --- a/src/setup/setup.desktop.in +++ b/src/setup/setup.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] -Name=@PACKAGE_NAME@ Setup -Exec=@PROGRAM_PREFIX@doom-setup +Name=@PACKAGE_SHORTNAME@ Setup +Exec=@PROGRAM_PREFIX@setup Icon=@PROGRAM_PREFIX@setup Type=Application -Comment=Setup tool for @PACKAGE_NAME@ +Comment=Setup tool for @PACKAGE_SHORTNAME@ Categories=Settings -- cgit v1.2.3