Commit Graph

78 Commits

Author SHA1 Message Date
Christoph "baka0815" Schwerdtfeger 0f228690ad evdev: Fix off by one error
The port for player1 is 0, not 1 (we're zero based here).
2018-08-27 10:01:08 +02:00
Stefanos Kornilios Mitsis Poiitidis ba8b9014a2
Merge pull request #1326 from reicast/EvdevControllerMapping_string2
evdev: Mapping name as string
2018-08-25 21:25:32 +03:00
Christoph "baka0815" Schwerdtfeger 8593c209d9 Fixed type of formatting argument 2018-08-25 10:55:52 +02:00
gameblabla 5f964de1fe
Fixes compiling if evdev is disabled 2018-08-24 23:13:41 +02:00
Christoph "baka0815" Schwerdtfeger ad20b55d2c Fix lgtm-warning 2018-08-21 00:33:18 -04:00
Christoph "baka0815" Schwerdtfeger c8baaac632 evdev/MapleType: Controller in port 1 defaults to VMU for Maple device, all other to None
Also allow 0 for "None"
2018-08-21 00:33:18 -04:00
Christoph "baka0815" Schwerdtfeger 638a97d1ae Maple: Reworked the way controllers are created
A new function was introduced to abstract the setup of input devices for each os: os_SetupInput().
I hope I implemented this everywhere correctly and the behaviour is identical to before.

The new function mcfg_CreateNAOMIJamma() creates the NAOMI Jamma interface and is hidden behind a compile flag (same as before).
The previous function mcfg_CreateDevices() was renamed to mcfg_CreateDevicesFromConfig() because it creates the devices based on the configuration (``nb`` setting).
2018-08-21 00:33:18 -04:00
Christoph "baka0815" Schwerdtfeger 7ef105822a evdev: Move creation of controllers
Don't expose mcfg_Create() directly, but use a proxy method mcfg_CreateController() to create the complete controller.
Using evdev the ``nb``-setting in the ``emu.cfg`` is no longer necessary (see #970) as the devices get created while initializing the controllers.

Moved the ``switch`` to it's own function.
2018-08-21 00:32:05 -04:00
Christoph "baka0815" Schwerdtfeger f75ba32fa9 evdev/maple: Set devices via config 2018-08-21 00:32:05 -04:00
Christoph "baka0815" Schwerdtfeger 891666d9ce evdev: Check for duplicate key assignment 2018-08-11 09:56:13 +02:00
Christoph "baka0815" Schwerdtfeger e2d186f7be evdev: Testing shows: You *can* assign the same device to multiple ports. 2018-08-10 10:16:29 +02:00
Flyinghead 960904c401 Exit cleanly in desktop platforms
Lighter and cleaner version of the previous PR
2018-07-23 19:52:50 +02:00
Christoph "baka0815" Schwerdtfeger e6854ef87d Removed unused code in core/linux-dist/main.cpp
This is a leftover from #964
2018-06-13 19:17:20 +02:00
Stefan 8c967b0591
Merge pull request #1 from OrN/rpi2-stuff
omx audio backend, and dispmanx window
2018-04-11 21:33:45 +02:00
Promi 5615694ea0 Fix #1051 2017-12-09 15:51:57 +01:00
Preston Smith 6f1fa1ab08 omx audio backend, and dispmanx window 2016-09-21 17:21:13 -05:00
Stefanos Kornilios Mitsis Poiitidis e5d8851316 Merge pull request #964 from Holzhaus/linux-rumble-support
Linux rumble support
2016-09-20 13:49:13 +02:00
Stefanos Kornilios Mitsis Poiitidis 42e6a62fac Merge pull request #877 from KrossX/purupuru
X360 controller support for Windows + Rumble
2016-09-17 22:26:46 +02:00
Jan Holthuis fdc3de7870 Port right motor adjustment to linux version
This adapts KrossX' commit c37c5c42e4 so
that we can use it in the linux version, too.
2016-09-13 14:54:29 +02:00
Phil Eichinger dde4647e55 Fix the check for the enviroment variable
I tried running reicast and it immediately died with:

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid
Aborted

I was missing the environment variable XDG_CONFIG_DIRS

Turns out find_system_config_dirs() checked for the existence of
XDG_DATA_DIRS but then tried to use XDG_CONFIG_DIRS (non-existent in my
case).

fixes #847
2016-01-30 10:29:36 +01:00
Jan Holthuis cc5719e845 Linux/evdev: Add Force Feedback/Rumble support 2015-12-14 01:09:03 +01:00
KrossX 832eeeb419 Might help compilation in other platforms
I cannot verify it though.
2015-12-07 21:27:19 -03:00
Stefanos Kornilios Mitsis Poiitidis 543e355259 Merge pull request #826 from reicast/holzhaus/merge-sdl-into-linux-dist
SDL: Merge sdl/ code into linux-dist/ code
2015-09-23 11:42:46 +02:00
Jan Holthuis 76dfeae55c SDL: Remove redundant sdl/ code 2015-09-12 16:31:32 +02:00
Stefanos Kornilios Mitsis Poiitidis 56f8ffac0e Merge pull request #807 from randomstuff/nixprof
Nixprof: some enchancements
2015-09-04 19:55:19 +02:00
Gabriel Corona ad068dcff2 Bind profiling in X11 to F10 2015-09-03 21:08:13 +02:00
Jan Holthuis 4267d51f90 stdclass: Make path getter function names more verbose 2015-09-02 15:49:00 +02:00
Jan Holthuis 5f6480e983 linux-dist: Also add /etc/reicast as system config dir 2015-09-02 15:48:59 +02:00
Jan Holthuis b6d0cddcaa stdclass: Add support for separate config/data dirs and system wide dirs
This adds support for separate config and data dirs.

On Linux, these will be compliant XDG Basedir Specification, i.e.
XDG_CONFIG_HOME and XDG_CONFIG_DIRS (or XDG_DATA_HOME and XDG_DATA_DIRS
respectively). On all other platforms, there currently just set to the
homedir path (so no previous behaviour has been changed).

If reicast wants to read and write a data file, it just calls
get_data_path("/samplefile.txt"). If it does not need to write to
that file, it just uses get_data_path("/samplefile.txt", false). That
way, we can also use system-wide dirs (like /usr/share/reicast on
linux), that the user usually doesn't have write access to.

The same applies for config file, where you use get_config_path(args)
respectively.
2015-09-02 15:48:53 +02:00
Jan Holthuis c24a5faf5b Linux: Use $XDG_CONFIG_HOME if possible
This coommit makes reicast use $XDG_CONFIG_HOME from XDG Base Directory
Specification[1] if possible.

For backwards-compatability with older installations, it checks if the
old-style config directory at $HOME/.reicast exists. If so, it'll use
that instead.

All new installation should use $XDG_CONFIG_HOME/reicast (or if
that environment variable is not set: $HOME/.config/reicast).

[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
2015-08-29 01:05:39 +02:00
Jan Holthuis 62029a40b1 linux-dist/joystick: Disable legacy joystick API by default 2015-08-26 01:34:49 +02:00
Jan Holthuis ceb2a11441 linux-dist/evdev: Clean up namespace a bit 2015-08-25 21:45:38 +02:00
Jan Holthuis 72778bdf39 linux-dist/evdev: Replace evdev_keycodes.cpp/.h with dynamic libevdev call 2015-08-25 21:45:37 +02:00
Jan Holthuis 528cd5a793 linux-dist: Drop hardcoded mappings in favor of mapping files 2015-08-25 21:45:32 +02:00
Jan Holthuis 5c01098cab linux-dist/evdev: Support custom mapping files 2015-08-25 21:38:18 +02:00
Jan Holthuis e466cba3e9 linux-dist: Remove unneeded code 2015-08-23 03:18:27 +02:00
Jan Holthuis e35518aca1 linux-dist/evdev: Fix evdev_config_key buffer overflow
Fixes #785.
2015-08-21 14:39:55 +02:00
Jan Holthuis b0e91185d2 linux-dist: Fix indentation 2015-08-19 12:02:47 +02:00
Jan Holthuis a2b2b4fd5f linux-dist: Fixed variable reference in Pandora's clean_exit 2015-08-19 11:59:47 +02:00
Jan Holthuis 1843fc3fe4 linux-dist: Move most x11 related code into a separate file 2015-08-19 11:59:47 +02:00
Jan Holthuis 729ded83f6 linux-dist: Move evdev/joystick code into separate files 2015-08-19 11:59:47 +02:00
Jan Holthuis 14ea9e4196 linux-dist: Refactor the evdev input code 2015-08-19 11:59:47 +02:00
Jan Holthuis 452374afab linux-dist: Add evdev multiplayer support 2015-08-19 11:59:47 +02:00
Jan Holthuis 845f101bf0 linux-dist: Add DPad support for xpad kernel driver (XBox 360) 2015-08-19 11:59:47 +02:00
Jan Holthuis 5fe9803743 linux-dist: Improve XBox360 controller support for legacy joystick api 2015-08-19 11:59:47 +02:00
Jan Holthuis 14f77c92d9 linux-dist: Fix bug where trigger values zeroes all the time 2015-08-19 11:59:46 +02:00
Jan Holthuis 275cd3eb73 linux-dist: Add XBox360 controller support via evdev 2015-08-19 11:59:46 +02:00
Jan Holthuis e3fc2cd1b9 linux-dist: Add missing newline in printf calls 2015-08-19 11:59:46 +02:00
Jan Holthuis a49c83b21c linux-dist: Make input devices configurable 2015-08-19 11:59:46 +02:00
Jan Holthuis d76e605aeb linux-dist: Use a switch case in UpdateInputState 2015-08-19 11:59:46 +02:00