summaryrefslogtreecommitdiff
path: root/src/setup
AgeCommit message (Collapse)Author
2015-04-11setup: Add OS X config for Gameport adapter.Simon Howard
The identified name/signature for this adapter is different under OS X. Also fix a mistake in the last commit.
2015-04-12Merge branch 'master' of https://github.com/chocolate-doom/chocolate-doomSimon Howard
2015-04-12setup: Add config for USB Gameport adapter.Simon Howard
This configuration supports the "Super Joy Box 7" USB gameport adapter, for people using old PC gameport joysticks / gamepads. The button configuration matches the original Vanilla configuration, for authenticity.
2015-04-10Add missing #includes.Simon Howard
2015-04-04setup: Add help URLs for configuration windows.Simon Howard
The wiki now has documentation pages for most of the windows in the setup tool. Add help URLs that link to these. One other minor change here is that the warp button on the main menu had to change to F2 instead of F1, which is now the help key.
2015-03-28net: Include port number in address strings.Simon Howard
When generating string representations of network addresses, include the UDP port number if it isn't the standard port number. This is necessary because the string version of the address is used by the setup tool when filling in the address field; if a non-standard port is used then it needs to be included. Also fix byte swapping on the address portion in the same function. Thanks to Alexandre-Xavier for the bug report on #469.
2015-02-20Refactor config file API.Simon Howard
The config file API previously relied on binding config variables using M_BindVariable() which took a void pointer. It occurred to me that if used on a boolean variable, this would be erroneous, but the void pointer would make it impossible to tell. Split this into separate M_Bind{Foo}Variable() functions based on type, which allows for proper type checking on the pointers that are passed. Vaguely related to #509.
2015-02-17setup: fix "control reaches end of non-void function" compiler warningFabian Greffrath
Actually, it is impossible to reach the end of these two functions without return()ing earlier from one of the switch() statements' branches. But since the compiler cannot know this and warns about it, and since this warning can be escalated into an error in later compiler versions, silence it by return()ing a dummy value at the end of each function. Fixes #508
2014-12-26allow building in subdirectory or outside source directoryDave Murphy
2014-11-04setup: Fix bug with strdup() of NULL pointer.Simon Howard
getenv() can return NULL if the environment variable is not set, but the result of getenv() was always being passed to M_StringDuplicate() without any check. This could cause crashes on some platforms. Instead, rework the code into a first stage that gets the player's name and a second that duplicates it into a mutable form. This fixes #455.
2014-10-28setup: dynamically set size of iwad_labels arrayFabian Greffrath
With the addition of the Freedoom IWADs, the number of IWADs supported by chocolate-doom has been raised to 10. However, the iwad_labels[] array only holds place for up to 8 pointers. Incidently, I have all 10 IWADs installed and trying to warp into a game from chocolate-doom-setup leads to an out-of-bounds access of this array and so the application crashes with a segmentation fault. Instead of increasing the array size to 10, which will bite us next time, I decided to set its size dynamically as soon as the number of IWADs of known.
2014-10-26Add gamepad config for PS4 DualShock 4.Simon Howard
Thanks to Matt Davis (3nT) for providing a detailed report for this gamepad.
2014-10-25Remove 1280x1000 scaling.Simon Howard
We already have 1280x960, which is the correct aspect ratio. This means that when running at 1080p the windowboxing borders will be slightly thicker, but if we're already showing borders anyway, it's better to at least use the correct aspect ratio. This fixes #460. Thanks to Doom_user for asking about this on Doomworld: http://www.doomworld.com/vb/post/1316735
2014-10-24Replace strdup() with M_StringDuplicate().Simon Howard
strdup() can theoretically fail and return NULL. This could lead to a crash or undesirable behavior. Add M_StringDuplicate() which does the same thing but exits with an error if a string cannot be allocated. This fixes #456. Thanks to Quasar for the suggestion.
2014-08-24setup: Add gamepad config for Buffalo Classic Gamepad.Simon Howard
The Buffalo Classic USB Gamepad is a USB gamepad that resembles the classic SNES controller. Thansk to Fabian Greffrath for sending in the report.
2014-08-18setup: Add config for Multilaser JS030 gamepad.Simon Howard
Thanks to "Absolute Zero" for the report with the gamepad settings.
2014-08-17setup: Add gamepad config for XBOX One controller.Simon Howard
The XBOX One controller apparently appears identical to the Xbox 360 controller. Thanks Brad Harding.
2014-08-13Merge branch 'master' of github.com:chocolate-doom/chocolate-doomSimon Howard
2014-06-12Add desktop entries for all the games, make the Setup launch genericMike Swanson
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.
2014-05-26setup: Add default config for Xbox360 on Linux.Simon Howard
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.
2014-05-17setup: Tweak joystick axis widget.Simon Howard
Reduce the width slightly (the previous size was excessively wide) and tweak "none" string to match the joystick button widget.
2014-05-16setup: Don't leave joystick subsystem running.Simon Howard
Only init the joystick subsystem when we need to call the joystick API functions, and quit the subsystem when we are finished. This avoids conflicts with the joystick widgets that quit the subsystem while the main code relies on it running. This fixes a bug where trying to calibrate the joystick twice would fail on the second attempt.
2014-05-16setup: Factor out axis configuration to widget.Simon Howard
Move code for configuring joystick axes into a separate widget, and add axis widgets to the configuration window for all possible movement.
2014-05-08'strife' is a valid game for chocolate-setup too!Rohit Nirmal
2014-05-05setup: Add Xbox360, Logitech joystick settings.Simon Howard
Recognise the Xbox360 controller and Logitech Dual Action controllers and set defaults as appropriate. Thanks to Brad Harding for the information about these controllers.
2014-05-05Clean up file headers.Simon Howard
This change rewrites and simplifies the copyright headers at the top of all source files: * Remove "Emacs style mode select" line; this line was included in the headers for the originally released source files and appears to be to set the file type for old versions of Emacs. I'm not sure entirely why it was required but I don't think it is any more. * Remove "You should have received a copy of..." text from copyright header. This refers to the old 59 Temple Place address where the FSF headquarters used to be located and is no longer correct. Rather than change to the new address, just remove the paragraph as it is superfluous anyway. This fixes #311. * Remove ---- separator lines so that the file headers are barer and more simplified.
2014-05-03setup: Add configuration for Wii remote.Simon Howard
The Wii remote is not a HID device, meaning it cannot be supported in a proper cross-platform way. However, it can be supported for individual platforms. Add a fingerprint and configuration for a Wii remote under OS X using the WJoy tool.
2014-05-03setup: Fix disabling of joystick button bindings.Simon Howard
When setting a joystick button binding to -1 to disable it, set it directly; do not go through to the physical button mapping layer. Also add a quick note to encourage users to send in details of their gamepads.
2014-05-03setup: Start a list of known gamepads.Simon Howard
Detect certain gamepads by name and automatically configure defaults for buttons and axes, to minimize setup time. Supported so far are the PS3 controller and AIRFLO gamepad.
2014-05-01setup: fix usejoystick/use_joystick typo in the previous commitMike Swanson
2014-05-01setup: Enable joystick after calibration.Simon Howard
If the user has just successfully calibrated the joystick, then turn on use_joystick as a convenience feature.
2014-05-01setup: Add control for joystick menu button.Simon Howard
The code is already in place for this but there was no control in the setup tool to configure it.
2014-05-01setup: Configure joystick buttons with virtual mapping.Simon Howard
Refactor how joystick buttons are reassigned. Define a fixed mapping from joyb* variables to virtual buttons, and change the button assignments at the virtual->physical mapping level.
2014-04-30joystick: Add virtual-physical button mapping.Simon Howard
The solution to solving #386 is to add a layer of indirection: the game code can only support up to ~20 joystick buttons, but this doesn't matter as long as we never want to bind more than 20 buttons to actions anyway. Redefine the game's notion of buttons to be based on "virtual" joystick buttons, and map these buttons to physical (SDL) buttons based on configuration file variables.
2014-04-29setup: Detect and ignore bad joystick axes.Simon Howard
In some cases a joystick axis can be "stuck" and have a large uncentered value. These must be detected and ignored, otherwise the axis can be chosen during calibration instead of the user's actual desired axis.
2014-04-29setup: Allow backspace or del to clear controls.Simon Howard
Backspace or delete clears other input boxes; make it do the same for keyboard, mouse and joystick inputs.
2014-04-28setup: Detect and configure hat-based D-pads.Simon Howard
As a second fallback, if all joysticks are centered and no buttons are pressed, look at the hats on the joystick to see if one of those is uncentered. Bizarre as it seems, some gamepads actually present the D-pad as a hat.
2014-04-28setup: Add support for button axis calibration.Simon Howard
Detect when we need to configure a "button axis" by falling back to buttons when none of the joystick axes are significantly outside of the centered range. Add extra calibration stages to get the D-pad buttons for right and down in these cases.
2014-04-19setup: Make iwad_t pointers const.Simon Howard
The table of IWAD data is stored in const memory, so make all iwad_t pointers const to fix compiler warnings.
2014-04-19setup: Change labelling to clarify gamepad support.Simon Howard
Vanilla Doom's setup.exe only made reference to "joysticks" as back then gamepads were relatively uncommon for PCs and ports for game controllers canonically known as "joystick ports". Nowadays it's far more likely (and ergonomic) that the player will be using a gamepad than a joystick. Change the labelling to refer to "Gamepad/Joystick" or "controller" instead.
2014-04-19joystick: Add joystick button to toggle menu.Simon Howard
When using a joystick or gamepad it's nice to be able to bring up the menu without having to reach for the keyboard. This makes modern gamepads more useful/usable.
2014-04-19joystick: Add an axis to allow strafing.Simon Howard
Modern gamepads typically have 2-3 D-pads and joysticks. This means that it's desirable to be able to use one joystick for turning and another for strafing. Add another axis in addition to the current X and y axes that performs strafe movement.
2014-04-13setup: Call TXT_Shutdown on exit.Simon Howard
Some systems (fbcon SDL driver) get messed up if not cleanly shut down. Make sure that we call SDL_QuitSubsystem on shutdown.
2014-04-12video: Change default for screen_bpp to 0.Simon Howard
Some machines don't work well with 8-bit screen depths any more. It's better to default to just using the machine's native color depth instead. Change the default to 0 (for SDL_SetVideoMode this means "use native color depth"), auto-adjust to native color depth on startup if screen_bpp=0 (so that debug messages at least make sense) and document for the config file value that a value of zero means "use native".
2014-04-10setup: Save selected game when browsing menus.Simon Howard
Once a game type (IWAD) has been selected, remember that selection rather than resetting to the first item in the list when the window is closed and reopened. This fixes #169 (thanks Alexandre Xavier).
2014-04-09setup: Show error when server address not entered.Simon Howard
Don't launch the game if a server address has not been entered; show a message to the user instead. This fixes #121.
2014-04-05setup: Add missing argument to M_StringJoin.Simon Howard
Last argument to M_StringJoin needs to be NULL.
2014-04-05setup: Adjust positioning of sound dialog.Simon Howard
When configuring Chocolate Strife the sound dialog can become quite tall, and the dialog is visibly uncentered vertically. Move it up slightly to counterbalance it.
2014-04-01textscreen: Use safe string functions.Simon Howard
Define TXT_{StringCopy,StringConcat,snprintf,vsnprintf} as analogs of the m_misc.c versions so that the textscreen library does not need a dependency on the Doom code, and change all textscreen code to use these instead of unsafe functions. This fixes #372.
2014-04-01setup: Eliminate use of sprintf().Simon Howard
Use M_snprintf() or M_StringJoin() instead where appropriate. This fixes #371.