Commit Graph

231 Commits

Author SHA1 Message Date
Stefanos Kornilios Mitsis Poiitidis 62018cf203 linux/softrend: Fix porting bugs, hackplement X11 drawing
- Fix RECT fields oder (initialized via {} on the code)
- Initialize shuffle_alpha (duh ...)
- X11 Image drawing (hacky, depends on internal X11 details)
- Untwidle code w/ optional flipping (X11 doesn't use inverted bitmaps)
- rgba shuffling (not needed yet, but left for documentation)
2015-12-13 14:00:25 +01:00
Stefanos Kornilios Mitsis Poiitidis 5e377399d3 linux/softrend: builds & runs, doesn't push to screen yet 2015-12-13 14:00:25 +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 def93ca4be linux/x11: Map X11 ESC key to exit emulator 2015-08-28 04:06:36 +02:00
Jan Holthuis 62029a40b1 linux-dist/joystick: Disable legacy joystick API by default 2015-08-26 01:34:49 +02:00
Jan Holthuis 25b8bb5f29 linux-dist/evdev: Move *_inverted in mappings to compat section 2015-08-26 01:11:16 +02:00
Jan Holthuis 7eab958472 linux-dist/evdev: Print error msg if unable to open mapping file 2015-08-25 21:45:39 +02:00
Jan Holthuis c97727984d linux-dist/evdev: Add absolute mapping file path support 2015-08-25 21:45:39 +02:00
Jan Holthuis e3b796e812 linux-dist/evdev: Always show Keycode names if possible 2015-08-25 21:45:38 +02:00
Jan Holthuis b12f1fa199 linux-dist/evdev: Remove unecessary newlines 2015-08-25 21:45:38 +02:00
Jan Holthuis 785b819cb9 linux-dist/evdev: Introduce a more consistens button naming scheme 2015-08-25 21:45:38 +02:00
Jan Holthuis ceb2a11441 linux-dist/evdev: Clean up namespace a bit 2015-08-25 21:45:38 +02:00
Jan Holthuis 7018ca42c4 linux-dist/evdev: Make controller axes invertable 2015-08-25 21:45:37 +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 e4e7e092c2 linux-dist/evdev: Add controller axis value autoconversion 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 c0ede35263 Merge pull request #788 from reicast/holzhaus/evdev-raw-keycodes-in-mappings
linux-dist/evdev: Use raw button codes
2015-08-21 19:57:39 +02:00
Jan Holthuis 7b963c941a linux-dist/evdev: Use raw button codes 2015-08-21 15:03:08 +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 71021175df x11: Add some typecasting so that gcc is happy ;-) 2015-08-21 02:29:14 +02:00
Jan Holthuis e404a5201d x11: Get rid of one platform ifdef 2015-08-21 02:16:48 +02:00
Jan Holthuis ac18a59906 x11: Remove unused code 2015-08-21 02:10:31 +02:00
Jan Holthuis 4dee5652ee x11: Allow starting in fullscreen via config 2015-08-21 02:07:03 +02:00
Jan Holthuis dc6758d847 x11: Use the default x11 display (not always 0) 2015-08-20 17:15:06 +02:00
Jan Holthuis fc2d1edea9 linux-dist/x11: Enable fullscreen toggling via F11 button 2015-08-19 18:47:42 +02:00
Jan Holthuis b0e91185d2 linux-dist: Fix indentation 2015-08-19 12:02:47 +02:00
Jan Holthuis 1661c23680 linux-dist: Fix missing const members in keyboard mapping
On some compiler versions, this caused an error:
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_DPad_X’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_DPad_Y’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_DPad2_X’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_DPad2_Y’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_Analog_X’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_Analog_Y’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_Trigger_Left’
../../core/linux-dist/evdev_mappings.cpp:57:3: error: uninitialized
const member ‘s_evdev_controller_mapping::Axis_Trigger_Right’
2015-08-19 11:59:48 +02:00
Jan Holthuis 223b1284fe linux-dist: Separate xpad and xboxdrv controller mappings 2015-08-19 11:59:48 +02:00
Jan Holthuis 32c3cca681 linux-dist: Fix evdev mapping detection for xboxdrv 2015-08-19 11:59:48 +02:00
Jan Holthuis a408e27cda linux-dist: Don't print EV_MSC events (evdev) 2015-08-19 11:59:48 +02:00
Jan Holthuis 3b2472766d linux-dist: Add evdev keyboard support & option to disable x11 keyboard 2015-08-19 11:59:48 +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
Jan Holthuis 73a9269fbd linux-dist: Remove redundant code in input_evdev_handle 2015-08-19 11:59:46 +02:00
Jan Holthuis 87b6a79199 linux-dist: Consolidate evdev/joystick code even further 2015-08-19 11:59:46 +02:00
Jan Holthuis 9dac10ae10 linux-dist: Replace platform ifdefs with USE_EVDEV and USE_JOYSTICK 2015-08-19 11:59:45 +02:00
Jan Holthuis 064b22f237 linux-dist: Harmonize input device fd names 2015-08-19 11:59:45 +02:00
Jan Holthuis 3dc9713262 linux-dist: Move evdev/joystick setup into their own functions 2015-08-19 11:59:45 +02:00
Jan Holthuis 77cac7b0f9 linux-dist: Fix code spacing and alignment 2015-08-15 17:12:48 +02:00
Jan Holthuis 154c92bd59 linux-dist: Remove unnecessary for-loop 2015-08-15 17:12:44 +02:00
Jan Holthuis ab33f473b3 linux-dist: Fix indentation and reformat code 2015-08-12 01:57:29 +02:00
Jan Holthuis 5fbfc0fb8b linux-dist: Rely on USES_HOMEDIR for home dir detection
Neither Mac nor Emscripten define USES_HOMEDIR in their Makefiles, so checking
if HOST_OS != OS_DARWIN && !defined(TARGET_EMSCRIPTEN) is pointless.
2015-08-11 21:36:14 +02:00
Jan Holthuis 60c827cf0c linux-dist: Clean up home dir detection 2015-08-11 21:31:57 +02:00
Jan Holthuis 6808bbba66 linux-dist: Add brackets to else expression 2015-08-11 20:27:51 +02:00
Jan Holthuis 64152635b5 linux-dist: Remove unnecessary if case 2015-08-11 20:20:12 +02:00
Stefanos Kornilios Mitsis Poiitidis 990470e19a linux: Fix input for rpi2 & co 2015-08-11 18:08:06 +02:00
TwistedUmbrella 795e84f3b1 Remove an overlapping ifdef 2015-08-11 12:05:09 -04:00
Stefanos Kornilios Mitsis Poiitidis 45f0a47eec OSX: Basic keyboard input 2015-08-11 07:57:22 -04:00
Stefanos Kornilios Mitsis Poiitidis 0153145950 emscripten: Fix build 2015-07-29 06:22:59 +02:00
~skmp 376a36bf57 Emscripten: Hacky support, can boot bios
- Add TARGET_BOUNDED_EXECUTION, TARGET_EMSCRIPTEN
- Add emscripten makefile

Of course, there's no jit at this point
2015-07-29 04:08:08 +02:00
Stefanos Kornilios Mitsis Poiitidis 9cf9bacd13 build: Refactor HOST_NO_REC everywhere 2015-07-25 13:19:26 +02:00
Jan Holthuis f6d2e3fa7e Added OSS audio backend
This adds the OSS audio backend and removes OSS code from
core/linux-dist/main.cpp and core/sdl/main.cpp.
The OSS backend will be included during compilation if the USE_OSS
flag is set.

Although OSS code in core/linux-dist/main.cpp depended on the
TARGET_PANDORA flag instead of USE_OSS, the latter should work too
since it is defined in the Pandora Makefile (lines 7 & 83).
2015-06-27 20:42:40 +02:00
Jan Holthuis e3f1784a0f Implement audio backend system
This makes it possible to have multiple audio backends compiled into
reicast (e.g. ALSA & OSS on Linux). These can then selected by the user
via a config option ("backend" iin the "audio" section). It *should*
also be possible to reduce the number of platform-specific ifdefs with this
approach.

Audio backends need to define a struct (audiobackend_t) that holds a
pointer to it's init, push and term function and also a slug and a name
as string. They then need to pass a pointer to this struct to
RegisterAudioBackend() before InitAudio() is called.

For now, I defined a function (RegisterAllAudioBackends) that get's
called exactly once (i.e. upon first call of InitAudio()), where
we can put ifdef'd RegisterAudioBackend() calls into for each backend
that reicast supports.

Please note that this commit just implements the basic audio backend
system - no backends have been ported to the new API yet. For the meantime,
reicast will run without any audio support accross all systems.
2015-06-27 20:41:49 +02:00
Jan Holthuis 35968c8291 Rename os_Push() to PushAudio() for consistency 2015-06-27 20:41:05 +02:00
~skmp 4ea7398d8a Linux: fix building 2015-05-16 11:23:31 +03:00
Stefanos Kornilios Mitsis Poiitidis 65ca1382d8 Merge remote-tracking branch 'remotes/origin/skmp/ios-wip' into feat/segfault-context-consolidation
Android/windows builds fine again. Android not tested yet, iOS/OSX not compiled yet
2015-05-16 07:12:19 +02:00
Stefanos Kornilios Mitsis Poiitidis d33ad6edfb Updating from linux/x64 2015-05-08 17:49:23 +02:00
~skmp 0783875b84 Linux GLX/3.1 support
My setup is only 2.1 right now, so this is totally untested
2014-12-30 13:21:05 +02:00
Stefanos Kornilios Mitsis Poiitids f14932c362 Building on osx w/o rec or rend 2014-09-30 12:00:46 +03:00
Stefanos Kornilios Mitsis Poiitidis e356515198 compiles for lin86 (no rendering yet) 2014-03-20 17:13:53 +02:00
Stefanos Kornilios Mitsis Poiitidis 7ef9de3cae Moving code around, cleanups 2013-12-28 22:20:08 +01:00