132 Commits

Author SHA1 Message Date
gblues
1ef78d3e3d
Any pad can control the menu (#13173)
* Any pad can control the menu

== DETAILS
I am not sure I've quite got it so that any pad can *open* the
menu, but I do have it so any pad can control it.

- split out the input processing into a separate method
- track down and squish some hairy bugs that boiled down to
  bad pointer math
- it looks like `menu_driver.c` has a mix of line endings, so I
  ran it through `dos2unix` so it has consistent line endings
  again.
- verified that this change did not impact actual cores

* optimize out cumulative_bits

* Incorporate PR feedback

Many thanks to @jdgleaver for providing these optimizations.

* apply one more optimization
2021-11-03 16:32:15 +01:00
Autechre
7ea1d7d0da
Revert "Mac buildfixes (#11933)" (#11934)
This reverts commit 18a6880900637cac7ebd26ca810c2b9f2382a5db.
2021-01-24 03:56:05 +01:00
Autechre
18a6880900
Mac buildfixes (#11933)
* (Metal/WindowListener) Fix duplicate symbol errors by
moving implementation of WindowListener to cocoa_common.m

* (Apple) Cleanup some conditionals

* (Cocoa) Cut down on OSX ifdefs in Cocoa-specific code
2021-01-24 03:53:10 +01:00
Twinaphex
eea07ea367 (COcoa GL/Cocoa Common) Refactor code for eventual splitting up
of cocoa_gl_ctx.m into two files
2021-01-18 15:41:30 +01:00
Twinaphex
5444401e4f Add this back 2020-09-14 19:45:49 +02:00
twinaphex
8b18ae3018 (Cocoa) Fix keyboard input 2020-09-14 19:38:52 +02:00
twinaphex
1c5f4e1dee Start cutting down on input_state - move all joypad driver code up to
higher-level retroarch.c
2020-09-02 15:26:03 +02:00
twinaphex
2fde8c21a9 Remove set_rumble function from input driver 2020-09-02 00:38:11 +02:00
twinaphex
acc0f2143f Change input_key_pressed so we no longer need to pass joypad
to the poll function callback
2020-09-01 21:43:39 +02:00
twinaphex
1d67ae3c63 Fix Android error 2020-09-01 17:41:05 +02:00
twinaphex
565fd3496e Remove keyboard_event_apple.c 2020-08-31 20:53:17 +02:00
twinaphex
6f92c56ca3 Simplify input drivers 2020-08-31 02:07:43 +02:00
twinaphex
6c6bca9db9 Update cocoa_input.c 2020-08-30 18:48:58 +02:00
twinaphex
d4d8b6934a Put keyboard_mapping_blocked into p_rarch / rarch struct
instead
2020-08-30 18:47:29 +02:00
twinaphex
5f08605680 Refactor joypad drivers 2020-08-30 05:29:32 +02:00
twinaphex
cdf7516c0c (Cocoa) Optimize button bitmask code - do a bitwise OR on the output
of both apple joypad drivers
2020-08-28 19:06:43 +02:00
twinaphex
e725b7c013 Revert "(Cocoa) Optimize button bitmask code - do a bitwise OR on"
This reverts commit 00bea7f3b2f3038ea01317743fd782431fd8a1ef.
2020-08-28 17:33:15 +02:00
twinaphex
97ebed7c0e Revert "(Cocoa) Buildfix"
This reverts commit 2c07234a5d912b43735e62625f3f9b7c6ed2da43.
2020-08-28 17:32:57 +02:00
Twinaphex
2c07234a5d (Cocoa) Buildfix 2020-08-28 17:10:31 +02:00
twinaphex
00bea7f3b2 (Cocoa) Optimize button bitmask code - do a bitwise OR on
the output of both apple joypad drivers
2020-08-28 16:48:08 +02:00
Twinaphex
b1723f7cd0 Remove unused CocoaTouch menu - allows us to get rid of a lot of
dead code
2020-08-09 19:41:04 +02:00
twinaphex
689ac432d6 MOve input_joypad_analog call to inside retroarch.c instead of the
input driver itself, and make function static
2020-06-23 18:31:40 +02:00
twinaphex
c7cd327b5b Rearrange input state input drivers for ANALOG - do joypad
processing first, then keyboard second
2020-06-13 05:25:10 +02:00
twinaphex
d998f86f1f Cleanups 2020-06-12 18:41:09 +02:00
twinaphex
4a91b11806 Further input driver standardization 2020-06-12 18:28:07 +02:00
twinaphex
eb78b608d3 Cut down on code duplication 2020-06-12 00:50:08 +02:00
twinaphex
0b95a8838a (OSX) Cleanups 2020-06-12 00:30:24 +02:00
twinaphex
88a93dc648 (OSX) Buildfix 2020-06-11 21:00:28 +02:00
twinaphex
dee0c5dbca CTR buildfix + cleanups 2020-06-11 19:33:27 +02:00
twinaphex
f96e148f74 Change to 1 instead 2020-06-11 18:43:53 +02:00
twinaphex
e2e5366925 Cleanups 2020-06-11 18:43:30 +02:00
Twinaphex
dc967f41ec (Cocoa) Create cocoa_is_pressed 2020-06-11 18:40:14 +02:00
twinaphex
a7a03984f1 (input drivers) Cleanups 2020-06-10 04:00:40 +02:00
Alex Kornitzer
cdfb8348b0 cocoa: use absolute positioning over relative
Now that we clip the window to locate the cursor correctly on re-entry
we need to do our cursor calculations using absolute coordinates
2020-05-11 00:58:06 +01:00
Alex Kornitzer
edfafd9fad cocoa: fix mouse movement
The input driver was using absolute coordinate arithmetic while making
use of delta changes for each coordinate, as a result the absolute
change netted to zero. This fixes that and tries to mitigate cursor
event sync issues (sync issues will require more work).
2020-05-10 22:44:44 +01:00
twinaphex
26b3ccf2e5 Don't pass joypad_info by value 2020-02-27 07:33:14 +01:00
twinaphex
65b4c2595e Update set keyboard mapping code for input driver 2019-07-27 02:21:24 +02:00
twinaphex
bee9984745 Update all other input drivers 2019-07-22 01:20:00 +02:00
orbea
e13ec54dc6 Fix --disable-overlay. 2019-07-21 10:26:42 -07:00
twinaphex
f4104f5c9a Regression in
9c73d3305d
- joykey needs to be uint64_t and then is later cast to uint16_t -
is apparently important for hotkeys
2019-07-21 16:22:41 +02:00
twinaphex
9c73d3305d Insert input_joypad_pressed into drivers themselves 2019-06-23 18:20:48 +02:00
twinaphex
7a2fa44c4b (Cocoa) Add bitmask code 2019-06-23 17:05:01 +02:00
twinaphex
ee3208ac39 Integrate video_driver.c into retroarch.c 2019-06-17 15:10:22 +02:00
Yoshi Sugawara
2dde223d23 Support returning the number of touches in the current input to support multi-touch inputs, like using a 2 finger touch to reload or secondary fire in lightgun games 2019-06-11 11:49:27 -10:00
orbea
28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
orbea
bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
twinaphex
ea09c29e04 Update implementations for other input drivers - not all input
drivers support this yet
2018-07-15 14:34:02 +02:00
twinaphex
a82bb0ec94 Create special type input_bits_t 2018-04-08 20:21:12 +02:00
twinaphex
69f85556a3 Get rid of meta_key_pressed 2017-12-18 05:59:57 +01:00
twinaphex
7b210ccf37 Don't call meta key pressed if not bound 2017-12-18 05:49:17 +01:00