Commit Graph

796 Commits

Author SHA1 Message Date
twinaphex 9a3e5073e6 (PS3) Make ps3_input_get_joypad_driver more robust 2014-10-05 18:30:23 +02:00
twinaphex 6862c70328 (PS3) Build fix + implement rumble function callback in ps3 joypad driver 2014-10-05 18:29:22 +02:00
twinaphex 06f84b6f25 (Apple HID) Cleanups 2014-10-05 18:25:32 +02:00
twinaphex b7f18050f2 (PSP/XDK) No dependencies on upper-layer input driver pointer struct
in joypad drivers
2014-10-05 18:21:17 +02:00
twinaphex 5ffba915c4 (PS3_ ps3_input_joypad.c - more cleanups 2014-10-05 18:19:36 +02:00
twinaphex e5877e887b (PS3) Cleanup ps3_mouse_device_state 2014-10-05 18:14:40 +02:00
twinaphex f6d04ff01e (Android) Input driver cleanups 2014-10-05 18:08:22 +02:00
twinaphex cc4068d936 (GX) Move joypad code over to gx_input_joypad.c - TODO: try to
separate libsickaxis code from gx_input_joypad.c driver
2014-10-05 18:00:43 +02:00
twinaphex 2742849d6c (XDK) Move joypad code over to xdk_xinput_input_joypad.c 2014-10-05 17:39:54 +02:00
twinaphex 8af1734043 (PSP) Move joypad code over to psp_input_joypad.c 2014-10-05 17:28:57 +02:00
twinaphex 544f1ba41e Move most joystick code over to ps3_input_joypad.c 2014-10-05 17:19:25 +02:00
twinaphex 5fa4723a22 Comment out ununused inline functions for now 2014-10-05 17:02:30 +02:00
twinaphex 3c170fe079 android_input_joypad.c - cleanups 2014-10-05 16:51:58 +02:00
twinaphex 1d7dea392d Use BIT_CLEAR/BIT_SET for android_input.c 2014-10-05 16:05:16 +02:00
twinaphex ea0d572ef1 Create new macros BIT_SET/BIT_CLEAR/BIT_GET based on input_common.h helpers 2014-10-05 15:58:06 +02:00
twinaphex 21d9185e96 (connect_ps3.c) Optimize 2014-10-05 03:48:55 +02:00
twinaphex 3a0327f67c (iOS) Update apple_joypad_ios.c same way 2014-10-05 03:33:26 +02:00
Twinaphex aa5ae7fe85 (iOS) Build fix 2014-10-05 03:31:58 +02:00
Twinaphex df0fbb7cf3 (OSX) More optimal polling of buttons/axis from pad_connection 2014-10-05 03:28:43 +02:00
Twinaphex d1e26a6911 apple_joypad_hid - cleanup apple_joypad_button somewhat 2014-10-05 03:12:32 +02:00
twinaphex 2df2346301 Move input_keys_pressed from input_common.c to runloop.c 2014-10-05 02:45:38 +02:00
Twinaphex a8ef8ff7e4 Merge pull request #1091 from mprobinson/joypad-driver
Joypad driver
2014-10-04 23:42:43 +02:00
Mike Robinson 02185efe10 Add support for bind autoconfiguration 2014-10-04 22:27:02 +01:00
Mike Robinson f3a0e58bd9 Add HAVE_PARPORT build option 2014-10-04 22:04:38 +01:00
twinaphex d4a14c4cb9 Move joypad_connection code to input/connect 2014-10-04 23:02:48 +02:00
Twinaphex 907b83065b (pad_connection) Add pad_connection_init 2014-10-04 22:32:43 +02:00
Twinaphex 7b5407379c (iOS/OSX) Nit 2014-10-04 22:32:43 +02:00
Twinaphex 8c269f119d Set a function pointer inside each pad_connection device for
send_control
2014-10-04 22:05:38 +02:00
Twinaphex c90c2c5829 (Apple) More Wiimote integration 2014-10-04 21:46:18 +02:00
twinaphex 59b3f96e5f Integrate wiimote.c into apple_joypad_wii.c 2014-10-04 21:40:59 +02:00
Twinaphex 6464b98191 Get rid of some apple_input.h header includes 2014-10-04 21:13:08 +02:00
twinaphex 4565b824a9 Change apple_pad_* implementations into pad_connection_* 2014-10-04 21:11:20 +02:00
Twinaphex 9e26dec5fa (iOS/OSX) Build fixes 2014-10-04 21:04:40 +02:00
twinaphex 5af2d315c4 Divorce pad_connection pad implementations from any Apple input-specific
implementations
2014-10-04 20:53:58 +02:00
Mike Robinson bf5cbfacee Fix autodetection of non-connected status pins 2014-10-04 19:00:09 +01:00
Mike Robinson aab4f3032a Add reporting of autodetected non-connected pins 2014-10-04 18:59:31 +01:00
twinaphex 311ab7072b Update apple_joypad_ps3.c and apple_joypad_ps4.c as well 2014-10-04 19:25:43 +02:00
Twinaphex 1fe04654ce (Apple) Build fixes 2014-10-04 19:14:04 +02:00
twinaphex 640fa534cd Move common code to joypad_connection.c - will still need
iOS/OSX build fixes
2014-10-04 19:07:59 +02:00
Mike Robinson 531ad20ddd Attempt to autodetect non-connected pins 2014-10-04 18:03:00 +01:00
twinaphex b7a0098c80 rename joypad_connection_connect to pad_connection_connect 2014-10-04 18:51:26 +02:00
twinaphex 30a255e70a Rename apple_joypad_has_interface to pad_connection_has_interface 2014-10-04 18:49:45 +02:00
twinaphex e9239316f8 Rename apple_joypad_disconnect to pad_connection_disconnect 2014-10-04 18:48:02 +02:00
twinaphex 4d14540997 Rename apple_joypad_packet to pad_connection_packet 2014-10-04 18:45:59 +02:00
twinaphex 14b17ed7d5 Rename apple_joypad_connect to joypad_connection_connect 2014-10-04 18:43:30 +02:00
twinaphex 5b4df0edd2 Start adding stub joypad_connection.c/joypad_connection.h files 2014-10-04 18:41:23 +02:00
twinaphex c93982ef73 Rename apple_pad_send_control to pad_connection_send_control 2014-10-04 18:38:01 +02:00
twinaphex 2e4c2fedb2 Change apple_pad_interface to pad_connection_interface 2014-10-04 18:35:23 +02:00
twinaphex c2c73c02b6 (Apple) Change apple_pad_connection to pad_connection 2014-10-04 18:31:37 +02:00
twinaphex d2367b9342 (input/wiimote) Style nits/cleanups 2014-10-04 18:27:19 +02:00
Mike Robinson 44df93dfd1 More robust error and register state handling 2014-10-04 17:26:28 +01:00
twinaphex 09e27f523d (Apple/iOS) Cleanups 2014-10-04 18:11:39 +02:00
Twinaphex 8b79b12002 (Apple) Cleanups 2014-10-04 17:01:56 +02:00
Twinaphex cfdf720614 (iOS) Get rid of implicit declaration warning 2014-10-04 16:55:12 +02:00
twinaphex 6fc4aa5f62 (iOS) apple_joypad_ios.c - cleanups 2014-10-04 16:54:01 +02:00
Twinaphex b16d6d72a5 (OSX) Build fix 2014-10-04 16:47:44 +02:00
twinaphex 1e2f8651b9 (Apple) OSX HID - some cleanups 2014-10-04 16:46:52 +02:00
Twinaphex c07aa7ec0a (iOS/Apple) Dehardcode some code 2014-10-04 16:34:52 +02:00
Twinaphex f957390f5f (Apple) Integrate apple_input_hid.c code into apple_joypad_hid.c 2014-10-04 15:49:09 +02:00
Twinaphex eb8a532824 (Apple HID) Cleanups 2014-10-04 15:44:02 +02:00
Twinaphex a6dabc5b78 (Apple) Build fixes 2014-10-04 15:38:31 +02:00
twinaphex f20baeb221 (Apple) Joypad refactor pt. 2 2014-10-04 15:37:09 +02:00
twinaphex 377a2e6c63 (Apple) Split up apple_joypad code into two - HID driver and iOS driver 2014-10-04 15:36:04 +02:00
twinaphex 9bcd163b04 (Apple/Udev) Small cleanups/style nits 2014-10-04 15:14:39 +02:00
Twinaphex 7950de0460 Revert "(Apple) apple_input.c - cleanups"
This reverts commit 24f091491e.
2014-10-04 14:44:21 +02:00
twinaphex 24f091491e (Apple) apple_input.c - cleanups 2014-10-04 14:40:28 +02:00
Mike Robinson d258775926 Add parallel port joypad driver 2014-10-04 04:18:36 +01:00
twinaphex 0983689b60 (Apple) Remove apple_keycode_hidusage_to_name - seems to be unused right now 2014-10-03 16:03:44 +02:00
twinaphex f4733cf1d0 (Apple) apple_input.c - cleanups 2014-10-03 16:01:43 +02:00
Twinaphex eb09aa526c (Apple) include "apple_keycode.h" for Apple 2014-10-03 15:33:24 +02:00
twinaphex de2392be89 Move apple_key_map_hidusage over to input_common.c 2014-10-03 15:31:34 +02:00
twinaphex ade2f71662 Cleanup do_state_checks 2014-10-03 14:53:04 +02:00
Twinaphex 7027f974eb Merge pull request #1080 from mprobinson/joypad-driver
Fix joypad driver setting
2014-10-03 09:53:47 +02:00
Mike Robinson 6203c3162e Fallback to first working joypad driver if init failed
Fallback to the old behavior on init failure so there's no
regression if the user did not select a working joypad driver.
2014-10-03 03:05:35 +01:00
Mike Robinson b165b8fa82 Fix joypad driver setting
input_common.c was loading the first available joypad driver no
matter what input driver was selected, and the joypad driver menu
was non-functional. Allow choice of joypad driver from the menu.
2014-10-03 01:40:47 +01:00
twinaphex 532938c5fa Refactor meta_input_keys_pressed 2014-10-03 00:55:44 +02:00
twinaphex 8a1f15c460 Move rarch_check_block_hotkey to input/input_common.c and make
the function static
2014-10-03 00:46:14 +02:00
twinaphex 245dc71658 Get rid of MODE_OSK_ENTRY_SUCCESS/MODE_OSK_ENTRY_FAIL 2014-10-02 21:19:11 +02:00
Higor Eurípedes 9bcf72a7e2 (SDL2) Implement joypad vendor/product id detection 2014-10-02 08:29:06 -03:00
twinaphex cd4a2d43a8 (input_autodetect.c) Silence potential uninitialized variable warnings 2014-10-01 15:14:26 +02:00
twinaphex 0d19d33f04 (QNX/Blackberry) Pass VID/PID to autoconfig too 2014-10-01 15:00:36 +02:00
Twinaphex 41351fc73c (Apple HID) Implement VID/PID passing 2014-10-01 14:24:55 +02:00
twinaphex ec9a217090 Change VID/PID passing to autodetect function - now int32_t
values
2014-09-30 20:35:58 +02:00
Toad King b0ade7e010 add getVendorId and getProductId to android device detection (needs testing) 2014-09-30 12:31:37 -05:00
Twinaphex e6f3f82440 (Apple OSX) Build fix 2014-09-30 18:19:20 +02:00
twinaphex aea679456d (Input autodetect) Start setting up input autodetect so that it
can look at matching VID/PIDs
2014-09-30 18:18:02 +02:00
twinaphex d43b9082e7 Move input_autodetect code to input_autodetect.c 2014-09-30 17:48:31 +02:00
twinaphex 03378289d7 (Apple) hid_device_input_callback - cleanup 2014-09-30 17:38:06 +02:00
twinaphex 41f9a47a01 (Apple) HID - indenting nits 2014-09-30 17:08:11 +02:00
Twinaphex 4349ef0311 (Apple) Cleanup 2014-09-30 16:56:25 +02:00
twinaphex 40894b2cc3 (QNX) Input - cleanups 2014-09-30 16:50:28 +02:00
Twinaphex 9b8fb4cac5 (Apple) Reimplement apple_bind_button_pressed 2014-09-30 16:38:30 +02:00
Twinaphex 01b39fd81a (Apple) Build fix 2014-09-30 16:35:49 +02:00
twinaphex 05eb9a0af8 (Apple) apple_input.c - refactor 2014-09-30 16:34:40 +02:00
Twinaphex 1cbb290d3b (Apple) Input - cleanups 2014-09-30 15:49:26 +02:00
Twinaphex 807818d4c6 (Apple) Reimplement input - get rid of g_current_input_data global
and instead initialize driver.input_data
2014-09-30 15:44:40 +02:00
Twinaphex f137f680c3 (Apple) Refactor apple_input_data_t 2014-09-30 15:03:22 +02:00
Twinaphex b285044e78 (Apple HID) Refactor input_device_hid_callback pt. 3 2014-09-30 14:28:50 +02:00
twinaphex b9ed7362eb (Apple/OSX) Refactor hid_device_input_callback pt. 2 2014-09-30 13:53:36 +02:00
Twinaphex faf8f27bf4 (Apple/OSX) Refactor hid_device_input_callback 2014-09-30 13:51:30 +02:00
Twinaphex ea6a97f33b (OSX) Comment out PS4 pad code for now 2014-09-30 13:30:05 +02:00
Twinaphex 90d6aec985 (Apple joypad PS4) Some changes 2014-09-30 11:31:23 +02:00
Twinaphex 597f25624a (apple_joypad_ps4.c) - build fixes 2014-09-30 10:55:52 +02:00
twinaphex e65831a778 (Apple) Start backporting meancoot's DualShock4 code from MFIWrapper 2014-09-30 10:52:46 +02:00
Twinaphex 9f5031188b Merge pull request #1066 from CyberShadow/pull-20140930-083313
Refactor old_state out of meta_input_keys_pressed into rarch_main_iterate
2014-09-30 10:40:43 +02:00
Vladimir Panteleev 0c104ffef8 Refactor old_state out of meta_input_keys_pressed into rarch_main_iterate 2014-09-30 08:35:41 +00:00
twinaphex ca9bfa18e4 Refine meta_input_keys_pressed 2014-09-29 21:23:35 +02:00
twinaphex c8ec8d9a7d Remove unused joy_keys_pressed function now 2014-09-29 21:01:59 +02:00
Vladimir Panteleev d0e970f175 Fix/reimplement input flushing
This fixes:

- menu toggle erratically not working on Android
- stray input going to libretro core when resuming content
- bound keys triggering as soon as they're bound on Android
- menu key repeat also repeating keys which should not be repeated
- issues caused by relying on timeouts for flushing

Architectural changes:

- menu_ctx_driver_t::input_postprocess now takes state and old_state
  (this allows getting rid of menu_handle_t::trigger_state)

Related changes:

- remove some no-op input_postprocess handlers (same effect as NULL)
- menu_iterate now uses the parameters passed to it, instead of
  polling menu_input
- menu_input is now merged into meta_input_keys_pressed
2014-09-29 12:58:52 +00:00
twinaphex cdefbcfc61 (retroarch.c/overlay.c) - cleanups 2014-09-28 17:52:15 +02:00
twinaphex 8b309fbeaa Move clear_bit/get_bit/set_bit to input_common.h 2014-09-28 17:07:44 +02:00
Twinaphex 9edb88caba (Apple joypad) Comment out WiiU/DualShock4 checks 2014-09-28 16:07:38 +02:00
twinaphex a0f24d0bb2 (Apple HID) Get vendor ID/product ID too 2014-09-28 15:32:17 +02:00
Twinaphex d7fe629afa (Apple) apple_pad_interface - cleanups 2014-09-28 15:21:59 +02:00
Twinaphex db4818ff9b (Apple) Input - cleanups in apple_joypad_ps3.c 2014-09-28 15:19:03 +02:00
twinaphex afd090edd9 apple_pad_interface - use void * 2014-09-28 15:06:51 +02:00
Twinaphex 747badfa6c (Apple HID) Show message queue message when disconnecting joypad 2014-09-28 09:05:11 +02:00
twinaphex f3004d29d1 (Udev) add comment 2014-09-28 08:58:16 +02:00
twinaphex 0a4ef36218 (Apple HID) Cleanups 2014-09-28 08:35:51 +02:00
Twinaphex b0fb6f483d (Apple/OSX) Split up HID code into separate file 2014-09-28 08:29:45 +02:00
Twinaphex d8100d299a (iOS) Build fixes 2014-09-28 07:01:39 +02:00
Twinaphex 764e7f930d Go through ID API for generaltools. 2014-09-27 21:36:04 +02:00
twinaphex b2b9cf5717 Rewrite input_push_analog_dpad 2014-09-26 12:56:03 +02:00
twinaphex d94e8329e8 Move stuff to config.features.h 2014-09-25 08:12:58 +02:00
twinaphex 715eeb0062 (Android) Fix build 2014-09-25 06:49:55 +02:00
twinaphex 00e605d9ba Take out MODE_MENu - and introduce g_extern.is_menu 2014-09-25 06:33:28 +02:00
twinaphex aa6d779fbc Added 1-second timeout when binding hotkeys 2014-09-25 04:44:24 +02:00
twinaphex 8015061720 Refactor menu_input - add input_keys_pressed in addition to
meta_input_keys_pressed
2014-09-25 04:19:09 +02:00
twinaphex 94a269dbca (Android) Build fix 2014-09-18 05:54:39 +02:00
twinaphex f16a065cdd Fixes 'block hotkey enable' 2014-09-18 04:04:33 +02:00
twinaphex 92938fe45f Optimizations - prevent static bools everywhere in check_* functions
- input_keys_pressed_func takes a pointer and sets it to the last
input state. We then pass this around functions and use it where
necessary
2014-09-17 06:55:03 +02:00
twinaphex 4a84e0e609 Refactor input_keys_pressed_func 2014-09-17 00:46:16 +02:00
twinaphex 310438f15b Refactor away input_key_pressed_func 2014-09-17 00:29:47 +02:00
twinaphex c391249e3f Optimizations -
* reduce amount of calls to input_key_pressed_func all throughout
rarch_main_iterate - call input_keys_pressed_func only once and
then pass an input state value around to all subsequent functions
* define retro_input_t typedef - simply an uint64_t for now since
meta binds don't exceed 64 entries yet
2014-09-16 09:26:08 +02:00
twinaphex eeda9df418 input_common.c - small cleanups 2014-09-16 07:06:23 +02:00
twinaphex 191f0b6383 Move input_key_pressed to input_common.h 2014-09-16 07:02:57 +02:00
Lioncash f8499aa71a Sanitize against NULL in some free-like functions. 2014-09-15 09:30:27 -04:00
twinaphex 8437e4bd2a Style/indent nits 2014-09-15 07:03:54 +02:00
Higor Eurípedes 52f300b3ac (Makefile.common) Add missing xinput autoconfig object 2014-09-13 23:09:14 -03:00
Lioncash 64272ef327 Squash some more potential null pointer dereferences 2014-09-11 23:04:02 -04:00
Lioncash 736561ecbe dinput: Guard against the case where malloc fails 2014-09-11 20:41:46 -04:00
twinaphex 080a79d9c5 (DirectInput) Build fix 2014-09-11 07:37:59 +02:00
twinaphex 75d2e13dcb Make drivers non-const 2014-09-11 07:06:20 +02:00
Twinaphex 511f0ab075 Merge pull request #960 from lioncash/sign
apple_input: Fix a signed-unsigned mismatch warning
2014-09-09 22:08:28 +02:00
Lioncash 070d68186a apple_input: Make MAC_NATIVE_TO_HID array static. 2014-09-09 14:54:29 -04:00
Lioncash 32a191b873 apple_input: Fix a signed-unsigned mismatch warning 2014-09-09 14:49:08 -04:00
twinaphex 689cd6322f Indenting / style nits 2014-09-09 18:15:17 +02:00
twinaphex 3d931d946e Indent/style cleanups 2014-09-09 17:34:28 +02:00
Higor Eurípedes 1833467c2c C++ build fixes 2014-09-06 22:14:09 -03:00
Lioncash 6b84ccdcef Make some functions static 2014-09-06 00:10:52 -04:00