Commit Graph

456 Commits

Author SHA1 Message Date
Twinaphex
8c8a3085a5 (OSX) Buildfix 2016-01-15 22:22:37 +01:00
twinaphex
8323d06d3d (Cocoa) No more dependencies on get_chosen_screen or
get_backing_scale_factor
2016-01-15 22:20:46 +01:00
Diablodiab
e738b57cf8 Add handling of Nvidia Shield Virtual Controller
The NVIDIA Button on the Nvidia Shield Controller and inputs received from CEC remotes
are detected as a "Virtual" controller on the Shield TV.

If a virtual controller is detected on the Shield TV before an actual game controller
then it will be configured as "Shield Virtual Device". This allows the use of the
buttons on a CEC remote to control the Retroarch menu and games.

When an actual controller is connected the Virtual Device will be overwritten and
the NVIDIA button of the Virtual device will be mapped to the controller as the
menu button.

This also fixes the situation where you press the NVIDIA Button before any other
button on the game controller and it does nothing. Now it will go into the
Retroarch menu even if it is the first button pressed.

A matching profile for "Nvidia Shield Virtual Controller" has been sent as a pull request to
the "retroarch-joypad-autoconfig" repository.
2016-01-15 18:41:17 +01:00
Diablodiab
9245113738 Fix if clause that could result in a keyboard key being handled as gamepad input 2016-01-14 21:16:54 +01:00
Diablodiab
2c08dc0f4f Extends Android keyboard functionality to allow for up to three keyboards.
This solves the problem with volume buttons on phones being detected as
keyboards and blocking a real keyboard from being mapped afterwards.

Renamed id_1 and id_2 to pad_id1 and pad_id2
Renamed id_3 to kbd_id and change it to an array

Implement function is_keyboard_id(int id) which checks if an id is mapped as
a keyboard
2016-01-14 20:59:25 +01:00
Diablodiab
afe8d2d617 Fixed two bugs in Android keyboard functionality and changed the way the keyboard
is registered (introduced an id_3 value)
2016-01-12 21:48:09 +01:00
twinaphex
f374af9dbc Revert "Add keyboard input functionality to Android version"
This reverts commit 17bdb549d4.
2016-01-12 15:52:42 +01:00
Twinaphex
db51b5a2c0 Merge pull request #2636 from diablodiab/android-keyboard-support
Add keyboard input functionality to Android version
2016-01-11 22:26:51 +01:00
Diablodiab
17bdb549d4 Add keyboard input functionality to Android version 2016-01-11 21:06:46 +01:00
twinaphex
347a18cb30 Update input headers 2016-01-10 04:33:01 +01:00
twinaphex
ef7a786527 Attempt to prevent segfault when pressing Enter in DRM/KMS mode 2016-01-02 22:28:21 +01:00
twinaphex
697351ee67 (input) Use string_is_empty 2015-12-26 07:54:17 +01:00
twinaphex
b8bbdc6f4c Revert udev drivers 2015-12-17 03:02:48 +01:00
radius
4b082daa7e fix input labels empty on android 2015-12-12 20:56:42 -05:00
radius
48fbc5eda4 Improve the shield portable workaround and reimplement the workaround for the shield atv,
This workaround could be used as a foundation for other console like devices.
2015-12-11 17:25:03 -05:00
twinaphex
4727ddb52d Create RARCH_INPUT_CTL_KEY_PRESSED 2015-12-10 12:47:36 +01:00
twinaphex
7a791fa6e8 Turn primary_id/secondary_id into static variables 2015-12-09 22:17:55 +01:00
Twinaphex
2bb440bc08 Merge pull request #2535 from fr500/master
new workaround for pads implemented as two independents hid devices
2015-12-09 22:16:43 +01:00
twinaphex
23c13c0043 Delay reinit, gets rid of the remaining concurrency errors 2015-12-09 20:30:55 +01:00
radius
08f42beefb add ARCHOS gamepad 2015-12-09 10:00:32 -05:00
twinaphex
959b781c06 (Android) Implement input_alive 2015-12-08 13:47:46 +01:00
twinaphex
629a660af4 Check if android_app or android variables are NULL in android_input_poll_memcpy 2015-12-08 08:53:26 +01:00
twinaphex
c1312d3b41 Buildfix 2015-12-07 21:21:13 +01:00
twinaphex
84bcf896b6 Set SET/UNSET_FRAME for Android 2015-12-07 21:17:55 +01:00
twinaphex
1e522f4035 (Android) Start calling SET_STUB_FRAME for LOST_FOCUS/GAINED_FOCUS 2015-12-07 21:07:04 +01:00
radius
e28450368f reset the ids when the driver is reinitialized 2015-12-06 23:39:42 -05:00
radius
17aa00db1a change variables 2015-12-06 23:20:47 -05:00
radius
cbd8819fb3 new workaround for pads implemented as two independents hid devices 2015-12-06 22:58:54 -05:00
Higor Eurípedes
b64ecfae92 (android_input) Fix negative port issue 2015-12-06 21:08:27 -03:00
twinaphex
c6359d6dbc Divorce g_system_menu from global state 2015-12-06 19:31:47 +01:00
Higor Eurípedes
1cd0a0ff0a (android_input.c) Fix usage of signed/unsigned
This caused a segmentation failure in android_keyboard_state_get()
2015-12-05 19:23:02 -03:00
twinaphex
3517fdc02a (Android) Buildfix 2015-12-05 21:18:06 +01:00
twinaphex
c0a1a6a3fe Move system->shutdown to runloop_ctl, turn it into a local
static variable
2015-12-04 12:44:12 +01:00
twinaphex
f21a9f2fd2 dinput.c - buildfix 2015-12-04 11:28:13 +01:00
twinaphex
a53334fba6 Backport/rewrites wmarquesr - pt. 4 2015-12-04 10:41:05 +01:00
twinaphex
071912871b (android_input.c) Attempt to only grab dlopen handle once 2015-12-03 21:19:16 +01:00
twinaphex
8ae39377e7 (Android) Cleanups 2015-12-03 01:59:43 +01:00
twinaphex
694e64831b Create thread duplicate variant of android_input_data_t variable 2015-12-02 23:23:21 +01:00
twinaphex
923433ead7 Move engine_handle_dpad code to android_input.c - copy
hat and analog state to intermediary on android_app during
poll time
2015-12-02 22:33:27 +01:00
twinaphex
69ee18cea6 Create android_input_data_t 2015-12-02 22:12:43 +01:00
twinaphex
e859fae4ee (Android) Move sensorManager and sensorEventQueue to android_app 2015-12-02 21:38:21 +01:00
twinaphex
b7d7dcef1c Expand android_app 2015-12-02 19:28:15 +01:00
twinaphex
cfe5491b05 (Android) Reimplement how shutdown gets signalled 2015-12-02 17:55:31 +01:00
twinaphex
d6b5dd6ac4 Flesh out android_native_app_glue.c implementation some more 2015-12-02 17:46:20 +01:00
twinaphex
986e4bf40d (Android) Native activity updates 2015-12-02 08:54:24 +01:00
twinaphex
0db7cda264 Start moving rewind code to rewind.c 2015-11-30 22:25:13 +01:00
twinaphex
9824eb7ea9 Rename rarch_main_ctl to runloop_ctl 2015-11-30 21:42:59 +01:00
twinaphex
4e333302ae Rename RARCH_MAIN_CTL* to RUNLOOP_CTL* 2015-11-30 21:35:50 +01:00
twinaphex
7cb78cca58 Make g_epoll static 2015-11-30 18:14:07 +01:00
twinaphex
54655c37cd Create epoll_waiting 2015-11-30 18:08:00 +01:00
twinaphex
ecbfc72e9b Create epoll_common 2015-11-30 18:05:10 +01:00
twinaphex
6d90c42bb5 We need to check for the instance where udev is only initialized
for the joypad part and not the general input driver
2015-11-30 16:56:32 +01:00
twinaphex
62260cf892 Turn g_udev static 2015-11-30 16:52:29 +01:00
twinaphex
28602d84af Make g_udev_mon static 2015-11-30 16:47:43 +01:00
twinaphex
b76481b21e Create udev_mon_hotplug_available 2015-11-30 16:42:52 +01:00
twinaphex
2db1197942 Expand udev_common.c 2015-11-30 16:39:22 +01:00
twinaphex
5b6641b077 (linuxraw_input.c) Remove unused driver reference 2015-11-30 02:50:10 +01:00
twinaphex
5e1b2b3bfa Move driver->input_data to input_driver.c 2015-11-29 18:18:25 +01:00
twinaphex
9a743ec357 Create input_driver_key_pressed 2015-11-29 16:45:38 +01:00
twinaphex
d018f65e95 Rename cocoa_input_keyboard_event 2015-11-29 16:26:13 +01:00
twinaphex
025d2c6328 (Android) Cleanups 2015-11-29 16:20:04 +01:00
twinaphex
2d455d78b3 Move inptu state to android_joypad.c 2015-11-29 16:18:29 +01:00
twinaphex
f1fe78eb1a (cocoa_input.c) Include header 2015-11-29 15:52:37 +01:00
twinaphex
2deeb36a81 Rename apple_keycode.h 2015-11-29 15:50:27 +01:00
twinaphex
99cc4c59c3 (Apple) Buildfix 2015-11-29 15:46:01 +01:00
twinaphex
bc748951c6 Start no longer having dependencies on apple input data for
keyboard_event_apple.c
2015-11-29 15:44:21 +01:00
twinaphex
dff44d8d49 (udev) split up keyboard code to separate files 2015-11-29 15:35:34 +01:00
twinaphex
6c7da0e503 (udev) Change function signature of callback 2015-11-29 06:34:35 +01:00
twinaphex
9fd9fd10e8 Create input_x11_common 2015-11-29 03:34:09 +01:00
twinaphex
127448f848 Use video_driver_window_get 2015-11-29 01:39:28 +01:00
twinaphex
0044d853f8 Move display_type / display_window etc all to gfx/video_driver.c -
no more dependencies on driver_t
2015-11-29 01:12:49 +01:00
Twinaphex
3001729545 Revert "Go through input_driver_get_data_ptr whenever we need input data"
This reverts commit 52c9a2ec43.
2015-11-28 18:58:33 +01:00
twinaphex
52c9a2ec43 Go through input_driver_get_data_ptr whenever we need input data
state
2015-11-28 18:51:12 +01:00
twinaphex
7856c4e940 (Android) Cleanups 2015-11-28 18:39:43 +01:00
twinaphex
b06d08a32e Remove some references to driver->input_data 2015-11-28 18:33:59 +01:00
twinaphex
c23846c5dc Merged input_joypad.c and input_joypad_driver.c 2015-11-28 16:22:49 +01:00
twinaphex
1df5d44bdb Rename input/keyboard_line 2015-11-28 16:13:16 +01:00
twinaphex
a6ccc188a8 Rename input_common.c to input_config.c 2015-11-28 02:22:58 +01:00
twinaphex
a8d868f187 (Android) Implement 'focused' callback for androidegl_ctx 2015-11-27 20:38:29 +01:00
twinaphex
a1ecc5eee3 (Android) Some cleanups in engine_handle_cmd 2015-11-27 18:27:30 +01:00
twinaphex
daeb8cacaf Set idle when APP_CMD_LOST_FOCUS 2015-11-27 00:23:47 +01:00
twinaphex
a3e52a9369 Put M_PI inside retro_miscellaneous.h 2015-11-24 00:05:37 +01:00
Alcaro
7b66b65823 Add some error messages if the null drivers are used. 2015-11-23 19:42:46 +01:00
twinaphex
389cf13db5 Don't reference driver->video_data outside of gx/video_driver.c anymore 2015-11-23 18:51:04 +01:00
twinaphex
60fec26bcf (sdl_input.c) Use video_driver_get_ident 2015-11-23 14:57:24 +01:00
twinaphex
9b41061143 Rename driver->video 2015-11-23 14:14:12 +01:00
twinaphex
074f14b132 Add verbosity.c/verbosity.h 2015-11-23 12:03:38 +01:00
twinaphex
806c124eae Merge video_viewport.c and video_driver.c 2015-11-21 13:01:23 +01:00
twinaphex
5cea9e5400 Add RARCH_DISPLAY_CTL_IS_FOCUSED 2015-11-20 15:24:24 +01:00
Twinaphex
e27d533fcd (iOS/Cocoa) Try this - prefer MFi analog value over BTStack one 2015-11-18 05:37:41 +01:00
Alwin Garside
e5b0a5858a Fix rwebinput driver
input/drivers/rwebinput_input.c:
 -  rwebinput_key_pressed() was defined twice. Not sure why, but removed the first instance of it.
 -  in rwebinput_input_state() the device was hardcoded to INPUT_DEVICE_TYPE_NONE which would result in it always returning 0
2015-11-18 02:45:41 +01:00
Alwin Garside
83d63fcdd1 Merge remote-tracking branch 'libretro/master' 2015-11-18 02:12:47 +01:00
Alwin Garside
58748da89d Emscripten related fixes.
- audio/audio_dsp_filter.c:  append_plugs() should only be called if HAVE_DYLIB
- emscripten/library_rwebaudio.js: Performance improvements, and fallback support for browsers that don't support the Performance API. (e.g. mobile Safari)
- emscripten/library_rwebinput.js: Improve mouse handling. Still not optimal, but works with browsers that don't support mouse capturing.
- frontend/drivers/platform_emscripten.c: Added global function for easy access to certain RetroArch features from JavaScript.
- gfx/video_driver.h: Disabling HAVE_MENU incorrectly disabled set_texture_enable()
- input/drivers/rwebinput_input.c: Missing header file: "../input_joypad.h".
- Makefile.emscripten: Cleanup and make sure the appropriate functions are exported.
2015-07-17 12:46:08 +02:00
twinaphex
450c665619 Create meta_key_pressed 2015-07-17 03:31:51 +02:00
twinaphex
a2af5252c1 Get rid of input_driver_key_pressed 2015-07-17 03:09:12 +02:00
twinaphex
f5566cbe3b Cleanup warnings 2015-07-16 10:11:28 +02:00
fr500
ca682d38eb better shield portable hack 2015-07-16 03:22:28 -04:00
twinaphex
56f273b0b5 Put in the Nvidia Shield hack back in for Shield Portable
explicitly
2015-07-15 06:26:32 +02:00
Twinaphex
1ff9f89e7d Merge pull request #1952 from fr500/master
Proposals
2015-07-12 21:13:01 +02:00
radius
6f9467817e Shield Fix 2015-07-12 13:56:34 -05:00
twinaphex
7fb1265227 (PSP/CTR) Should fix lifecycle state menu toggling 2015-07-12 10:46:20 +02:00
twinaphex
23348f41ac (GX) Menu button toggle should work again 2015-07-12 10:41:49 +02:00
twinaphex
2a881d64be Name some functions the same across drivers 2015-07-12 08:51:13 +02:00
twinaphex
fbc504acfe Turn one C++ comment into C 2015-07-12 08:46:41 +02:00
twinaphex
32b3aa6b00 (Cocoa) cocoa_input.c - Simplifications 2015-07-12 08:45:12 +02:00
twinaphex
c2c9ace028 Input driver's 'input_key_pressed' implementation does not
have to query for overlay state - this is done in an upper-level
function already
2015-07-12 08:39:34 +02:00
twinaphex
135ee2f503 Use UINT64_C(1) everywhere instead of 1ULL 2015-07-12 07:53:46 +02:00
twinaphex
c9814c9b12 (Overlay) Don't expose input overlay handle to outside 2015-07-12 07:22:52 +02:00
twinaphex
af752ba24b (PS3) ps3_input.c - cleanup 2015-07-12 02:55:29 +02:00
twinaphex
9e61a5ebf4 (udev_input.c) Cleanup add_device 2015-07-12 02:44:53 +02:00
twinaphex
0107be2485 (GX) Refactor controls 2015-07-12 01:58:43 +02:00
twinaphex
2bdce53651 (PSP) Refactor input code 2015-07-12 01:55:51 +02:00
twinaphex
69a406809e (CTR) Refactor code 2015-07-12 01:53:32 +02:00
twinaphex
6f99b4d381 (Android) Implement 'Back As Menu Toggle Enable' setting 2015-07-11 03:13:38 +02:00
twinaphex
f50751909c (QNX) Don't depend on global state for input driver 2015-07-10 18:52:23 +02:00
twinaphex
2eab572773 (CTR) Don't depend on global state in input driver 2015-07-10 18:51:04 +02:00
twinaphex
2698d4622a (PSP) Don't depend on global state in input driver 2015-07-10 18:47:56 +02:00
twinaphex
25ffeb1ed9 (Xenon) Don't depend on global state in input driver 2015-07-10 18:45:22 +02:00
twinaphex
e2d510e4f6 (GX) No longer depend on global pointer in input driver 2015-07-10 18:44:11 +02:00
twinaphex
8fc5c85589 Move keymaps to input drivers 2015-07-10 09:55:29 +02:00
twinaphex
e99a23a5e2 (Android) More cleanups 2015-07-10 00:36:46 +02:00
twinaphex
dc96b4820f (Android) Cleanup android_input.c 2015-07-10 00:27:05 +02:00
twinaphex
ab604524dc (Android) Get rid of some more hardcoded stuff 2015-07-09 21:39:47 +02:00
twinaphex
8c1a918899 (Android) Cleanup 2015-07-09 18:11:53 +02:00
twinaphex
63c7104ab1 (Android) android_input.c - cleanups 2015-07-09 18:09:45 +02:00
twinaphex
d104a878f1 (Android) Code cleanups 2015-07-09 17:55:52 +02:00
twinaphex
abf7a80f27 (Android) Buildfixes and remove unused variable warnings 2015-07-09 07:48:56 +02:00
twinaphex
954121b99c Kill off some console-only hacks to do with lifecycle state 2015-07-09 06:35:18 +02:00
Toad King
26b4dc79d0 [Android] clear bindings on context reset, they end up getting rebound anyway
bump version
2015-07-02 23:06:53 -05:00
Toad King
d0866995bd set back button to menu toggle if not set through autoconf 2015-07-02 21:48:06 -05:00
David Shah
c2d26cfb23 Fix input on KitKat for S7800B and other devices with a VID or PID of 0 2015-07-02 14:28:38 +01:00
twinaphex
96c119bb1d Move retroarch_logger.h to libretro-common/include 2015-06-30 00:38:10 +02:00
Alcaro
4ca6c2398c More C89 cleanups, part 3 2015-06-26 18:35:52 +02:00
Alcaro
1bbd54f597 Some C89 strict fixes 2015-06-26 17:03:12 +02:00
twinaphex
aa6cdf5d5a Put extern "C" around cocoa_keyboard_event 2015-06-26 16:32:30 +02:00
twinaphex
a132fa0fba Some C89 build fixes 2015-06-26 15:53:18 +02:00
twinaphex
0fa871a296 Use rarch_system_info_get_ptr 2015-06-25 13:46:32 +02:00
twinaphex
6ee5029bb0 (android_input.c) Use rarch_system_info_get_ptr 2015-06-25 13:20:53 +02:00
twinaphex
bdb3cd9b1c (GX) Build fix 2015-06-22 08:01:13 +02:00
Higor Eurípedes
e6ea0319c7 (linuxraw) Fix boolean return in void function 2015-06-21 19:50:58 -03:00
Toad King
8929887f25 allow closing text input windows with cancel button 2015-06-18 21:37:54 -05:00
Twinaphex
55eaff9793 (Menu) Cleanups 2015-06-19 03:46:54 +02:00
twinaphex
0e046c2fbb Create input_driver_keyboard_mapping_is_blocked/input_driver_keyboard_mapping_set_block 2015-06-19 03:45:23 +02:00
twinaphex
ad5954862b Cleanup some strcmps 2015-06-14 19:42:25 +02:00
twinaphex
ca4b8385fe (udev_input.c) Include <unistd.h> 2015-06-13 19:16:42 +02:00
twinaphex
daf4f5719b (Input) Cleanups 2015-06-13 00:02:28 +02:00
twinaphex
6acdd3db05 (linuxraw_input.c) Add unistd.h header 2015-06-08 11:57:07 +02:00
twinaphex
c7e0163450 (PS3) Buildfix 2015-06-08 00:32:21 +02:00
twinaphex
2b10519fb8 (linuxraw_input.c) Style nits 2015-06-03 21:38:27 +02:00
twinaphex
77ba9c650f (udev) Use {{0}} for initialization 2015-06-03 21:29:08 +02:00