9434 Commits

Author SHA1 Message Date
Walter Agazzi
d117a48aaf DISTS: Keep Catharon license original naming 2023-09-03 22:27:43 +02:00
Walter Agazzi
ab6b7b0360 DISTS: Add Catharon license and include in builds 2023-09-03 22:27:43 +02:00
Lars Sundström
f943fba3d0 IOS7: Enable kFeatureCpuNEON in IOS7 backend
Make use of the NEON optimisations in iOS and tvOS.
2023-09-03 22:26:37 +02:00
Le Philousophe
154fab3952 TEST: Silence logs by default
Else tests on INI parser spam with expected warnings.
2023-09-02 11:42:29 +02:00
elasota
9892bedc61 COMMON: Add createReadStreamForAltStream to open Mac resource fork and metadata streams 2023-08-30 00:31:00 +02:00
Le Philousophe
fa450e060e PSP2: Add missing function for plugins 2023-08-29 12:45:30 +02:00
antoniou79
9f4a32f88b ANDROID: Remove hack for virtual keyboard arrow key repeats
This hack was simulating repeated key presses (EVENT_KEYDOWN, then EVENT_KEYUP) for the arrow keys like the ones a physical keyboard sends

The hack could potentially cause further issues like spamming the events queue with many unnecessary events, and sending the events too quickly for some engines to handle
(thus missing some of them). We're now making use of the allowKbdRepeats() for the Up/Down/Left/Right event actions in the gui-manager, which will handle the case of a key
being kept pressed, sending an initial EVENT_KEYDOWN event and then subsequent EVENT_KEYDOWN events with the kbdRepeat flag set, and finally a single EVENT_KEYUP in the end.
Android itself handles repeated key events similarily (instead of a kbdRepeat flag, it updates a counter for the key repeats, which we translate to a simple flag).

This (and the hack that this replaces) affect things like moving the selection in the GUI lists (like the added games list) upwards or downwards continuously
while keeping the respective arrow key from the Android virtual keyboard pressed down.
2023-08-29 04:30:00 +03:00
D G Turner
bef992a940 WII: Add Debug Output to OSystem Graphics API for Mouse Cursor
This indicates that the cause of the vanishing mouse cursors appears to
be the loss of the palette data from a CLUT8 game cursor when the GMM
cursor which is ARGB is switched in. The SetMouseCursor implementation
currently does not setup the game cursor palette so the cursor is drawn
as all transparent i.e. default palette contents.
2023-08-29 00:24:36 +01:00
D G Turner
75023fcc08 WII: Move All Palette Code Implementation into OSystem Graphics Module 2023-08-29 00:10:53 +01:00
D G Turner
6c7467831d WII: Add Console Message When Console is Shown / Hidden
It is possible to toggle showing the text console as an overlay on the
screen by holding the Up direction arrow on the Wiimote and pressing
Button 1. This shows messages printed out via printf() / debug() and thus
can be used as a basic mechanism for debug output.
2023-08-28 23:12:20 +01:00
D G Turner
a489921fd4 WII: Minor Formatting Fix in GDB Network Debugging Defines
This does not work with the current libogc GDB stub on the Wii as the
GDB network stub support only works with the BBA (Broad Band Adapter)
for the Gamecube.
2023-08-28 23:10:03 +01:00
Le Philousophe
5bdd9e6f50 ALL: Unify zlib and gzio API
zlib is used when available and falls back on gzio.
This allows performance improvements as our CRC32 and gzio
implementations are slower than base zlib.
As zlib is available when libpng is present, this is sensible to
benefit from it.
2023-08-28 21:49:03 +02:00
Cameron Cawley
54423ab73d SURFACESDL: Move the AspectRatio class into the graphics manager class 2023-08-26 01:25:51 +02:00
Thierry Crozat
309eda6913 LURE: Use kFeatureTouchscreen instead of LURE_CLICKABLE_MENUS define 2023-08-22 23:37:11 +01:00
Thierry Crozat
ef7c881416 OSYSTEM: Add kFeatureTouchscreen to identify backends with a touchscreen 2023-08-22 23:37:11 +01:00
Kaloyan Chehlarski
3a31521b27 RISCOS: Add log2f to function to link 2023-08-22 13:30:34 +03:00
Lars Sundström
2df8aee335 IOS7: Handle all deletes in UITextInput proto func deleteBackward
The UITextField protocol function:
"textField: shouldChangeCharactersInRange: replacementString:"
was sometimes called with empty replacementStrings on key press
releases on keyboard. That triggered a backspace keyboard char to
be sent which caused problems when trying to remap actions to
other keyboard keys. No matter which key you were pressing the
resulting key would always be the backspace key.

Only handle text input using the UITextField protocol function
when the replacement string isn't empty. Handle all deletes through
the UITextInput protocol function "deleteBackword".

This has been tested in both cases when the UITextField is empty
(but GUI text field has text) and when the UITextField has text
(which has been added using the SoftKeyboard).
It has also been tested on Apple TV where a software keyboard is
shown with a big text field.
2023-08-20 21:38:52 +01:00
Lars Sundström
8576e9e1f3 IOS7: Register inputs based on capabilities
Instead of register input based on if hardware is connected or not
register input based on backend capabilities.
Mouse support is default supported through touch events on screen
(iOS) or touch on controller (Apple TV), and through connected
mouse hardwares. Gamepad controllers are supported from iOS 14 and
later.

Register mouse and gamepad input based on above capabilities to be
able to map actions to buttons on these input devices.

Keyboard support is to be added but not in this commit.

Remove the "isConnected" methods for each input and change the same
method for game controllers to a "isSupported" function to deal
with the iOS version support.

Remove the sending of the EVENT_INPUT_CHANGED event due to the
above reasons. The overide of the isConnected property function is
also removed due to this reason. It caused problems that key
mappings were reset on connections/disconnections.
2023-08-20 21:38:52 +01:00
Lars Sundström
7c96a7ff76 IOS7: Fix gamepad controller dpad button presses
The gamepad controller dpad button vaule change handler callback,
also called for the virtual controller dpad buttons, sent events
also for buttons not being pressed or released.
E.g. when the left dpad button was pressed an event was sent,
JOYSTICK_BUTTON_DPAD_LEFT with value 1 meaning it's pressed DOWN.
However, the other dpad buttons also did send their events but with
value 0 meaning UP. This had no impact for most of the games but
"The Griffon Legend" handles the dpad events a bit different where
the character is kept moving when the button is released. It meant
that the engine was triggering movements on both the event
EVENT_CUSTOM_ENGINE_ACTION_START and EVENT_CUSTOM_ENGINE_ACTION_END.

This commit changes the dpad button input handling so it remembers
the current state for UP/DOWN and LEFT/RIGHT. This ensures that only
the button that changes state is triggering an event.
2023-08-20 21:38:52 +01:00
Lars Sundström
0d77f8a262 IOS7: Delete deprecated and unused event variables
These class member variables aren't used anymore.
2023-08-20 21:38:52 +01:00
Lars Sundström
77d56abc66 IOS7: Fix scenario where "right button" was kept pressed
The UITapGestureRecognizer is used to identify taps with two fingers,
sending an ESC key event. The UITapGestureRecognizer will not stop
touchesBegan from being called when doing a touch with two fingers.
Touching with two fingers when _mouseClickAndDragEnabled is enabled
will send a EVENT_RBUTTONDOWN.

But if doing a double tap the UITapGestureRecognizer with two fingers
will cancel the touchesEnded from being called meaning that no event
EVENT_RBUTTONUP will be sent to the engine. In some engines, e.g.
lure, this will cause problems since the engine might wait for mouse
clicks to be released before processing other events.

Fix the scenario above by introducing a delay of sending the event
EVENT_RBUTTONDOWN. If the UITapGestureRecognizer is triggered before
this timeout it will cancel the EVENT_RBUTTONDOWN by overwriting the
_queuedInputEvent with the ESC key event.

This commit also deletes the legacy implementation handling double
tap with two fingers to trigger an ESC event.
2023-08-20 21:38:52 +01:00
yoshisuga
30b121f4e9
IOS: Support keyboard as hardware input so that controls can be mapped by default 2023-08-20 21:30:52 +01:00
antoniou79
948f004a78 KEYMAPPER: Fix size of _joystickAxisPreviouslyPressed array
It should include all the valid axis defined in defaultJoystickAxes so the size should now be 8

The 2 extra since the previous size (6) is due to the addition of support for HAT_X and HAT_Y axis.
This fix allows the HAT_X+/- and HAT_Y/+- to operate as valid incoming events when mapped to an action (see Keymapper::convertToIncomingEventType())
2023-08-14 14:09:41 +03:00
Cameron Cawley
5d58b7768c BACKENDS: Remove leftover code 2023-08-14 00:40:42 +02:00
Cameron Cawley
3f38f6c500 SDL: Improve CPU detection with older SDL versions 2023-08-14 00:40:42 +02:00
antoniou79
554f094dd6 ANDROID: Improvements for controller movement detection
Removed unnecessary normalization as Android already does this

Also fixed a wrong comparison in a clause for deciding to stop movement that was repeating
2023-08-13 23:25:18 +03:00
Le Philousophe
79c3063979 ANDROID: Improve CPU detection
CPU architecture can be determined at build time.
Add support for x86 extensions.
2023-08-13 12:58:45 +02:00
Le Philousophe
3b1465120a ANDROID: Fix build
cpu-features needs to be compiled by us
2023-08-13 12:58:45 +02:00
Eugene Sandulenko
583227655a
BACKENDS: Fix incorrect enum member name 2023-08-13 10:50:56 +02:00
Wyatt Radkiewicz
55550f85ac BACKENDS: Move SIMD detection to more stable SDL2 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
787837ca41 ALL: Add Cpu prefix to SIMD extension features 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
f5dfa6b8d1 WII: Removed extra ")" in backend hasFeature 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
59fa0a9208 BACKENDS: Cpu feature flags now use bit shifts 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
64a6548041 BACKENDS: Fixed BaseBackend AVX2 detection 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
2947e87e59 BACKENDS: BaseBackend now detects SSE4.1 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
eebadf4495 GRAPHICS: Optimize alpha blend NEON and Generic
I optimized the NEON and Generic paths for ManagedSurface::blendBlitFrom
and the new TransparentSurface::blit. Now (on arm), the new blit function
matches the speed of the old blit function even with the added
inderections that the runtime extension detection code adds in.

Other than that, I made a benchmark for this code and you can make it
using this command:
CFLAGS="-DTEST_BLEND_SPEED" make test

I reverted wii to not use altivec anymore since it doesn't.

I also removed graphics/blit-neon.cpp from graphics/module.mk because
simply including the .cpp file in graphics/blit-alpha.cpp was a better
option because then I didn't need to instantiate every version of the
templates that I needed.
2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
139eb6ad61 MAC: Basic Altivec detection implemented 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
8cc1ab7efa PS3: Backend now detects altivec extenions 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
ffb845f241 WII: Backend detects Altivec extensions 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
c3554dd7f0 BACKENDS: BaseBackend detects NEON on aarch64 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
bdc6d72e0b ANDROID: Added ARM NEON detection in backend init 2023-08-13 00:22:10 +02:00
Wyatt Radkiewicz
f062addfe2 BACKENDS: BaseBackend detect x86 SIMD extensions
Rebase conflict
Conflicts:
  backends/base-backend.h
2023-08-13 00:22:10 +02:00
Le Philousophe
a68e8fcea8 ANDROID: Fix CA path retrieval
The old way doesn't work anymore since directories are not FSNode.
The SearchMan could also return files which were not accessible through
filesystem.
2023-08-12 22:12:59 +02:00
Le Philousophe
fde8a0b463 NETWORKING: Use a String for CA path
This allows to build the path inside the function and return it.
2023-08-12 22:12:58 +02:00
antoniou79
a674b65c95 ANDROID: Support connection change for some bluetooth keyboards
Some bluetooth keyboards also need "navigation" supported as configuration change

Tested with a new Lamtech bluetooth (BLE5) keyboard and also this is suggested here as well:
https://stackoverflow.com/a/27238892
2023-08-12 20:34:58 +03:00
Miro Kropacek
2ab9ba353a BACKENDS: ATARI: Remove the SCI hack
It was wrong (other engines are allowed to do infinite recursions?) and
Future Wars still isn't working properly at all times. I've decided to
remove it (i.e. Future Wars and Operation Stealth are not supported
anymore).

Small updates in readme.txt.
2023-08-12 17:38:49 +02:00
Miro Kropacek
46939cca9b BACKENDS: ATARI: Fix regression in unlockScreen() 2023-08-12 17:38:49 +02:00
Miro Kropacek
87f1cd25be BACKENDS: ATARI: Don't initialize GEM before initBackend()
This caused unnecessary desktop redraw, clearing text output from the
console.
2023-08-12 17:38:49 +02:00
Miro Kropacek
f8f22c6e85 BACKENDS: ATARI: Fix a stuck key repeat
Sometimes the new IKBD handler would take over before TOS got a message
about key release event, leading to an infinite key stuck sound.
2023-08-12 17:38:49 +02:00
Miro Kropacek
c1354b8589 BACKENDS: ATARI: Fix crash when exit() is called
exit() can be handled at user level via atexit(), there's no need to use
the critical handler routine.

Removed GEM restore from the critical handler as this uncovered its
instability while being in the critical handler.
2023-08-12 17:38:49 +02:00