Commit Graph

4936 Commits

Author SHA1 Message Date
Giovanni Cascione
8431d59abd LIBRETRO: BUILD: add debug flag 2023-09-09 00:36:15 +02:00
Giovanni Cascione
b486ca6881 LIBRETRO: use cpu_features_get_time_usec to get current time 2023-09-09 00:36:14 +02:00
Giovanni Cascione
da563c7bf4 LIBRETRO: cover settings update following reset to defaults 2023-09-09 00:36:13 +02:00
Giovanni Cascione
524c270ded LIBRETRO: fix settings descriptions w/o categories 2023-09-09 00:36:12 +02:00
Giovanni Cascione
ad2e4d1512 LIBRETRO: add retropad mapping settings
* Major libretro-os-inputs rework
2023-09-09 00:36:12 +02:00
Giovanni Cascione
3d4475da76 LIBRETRO: fix sample rate setting default value 2023-09-09 00:36:11 +02:00
Giovanni Cascione
6cc96ef4ac LIBRETRO: fix frame rate in inverse_acceleration_time 2023-09-09 00:36:10 +02:00
Giovanni Cascione
90adba467e LIBRETRO: use retro_get_system_av_info in retro_run 2023-09-09 00:36:09 +02:00
Giovanni Cascione
84ebccb5af LIBRETRO: add dynamically displayed options 2023-09-09 00:36:09 +02:00
Giovanni Cascione
5c13a41324 LIBRETRO: add libretro-mapper.h 2023-09-09 00:36:08 +02:00
Giovanni Cascione
88e97990f6 LIBRETRO: clean up retropad input 2023-09-09 00:36:07 +02:00
Giovanni Cascione
eb1aa4037b LIBRETRO: fix cursor speed reduction 2023-09-09 00:36:06 +02:00
Giovanni Cascione
e7a8d1dea4 LIBRETRO: simplify OSystem_libretro::getMouseXYFromButton() 2023-09-09 00:36:06 +02:00
Giovanni Cascione
260bd5b918 LIBRETRO: add OSystem_libretro::getMouseXYFromButton() 2023-09-09 00:36:05 +02:00
Giovanni Cascione
9617f010b5 LIBRETRO: add OSystem_libretro::getMouseXYFromAnalog() 2023-09-09 00:36:04 +02:00
Giovanni Cascione
ba58463669 LIBRETRO: add OSystem_libretro::refreshRetroSettings() 2023-09-09 00:36:03 +02:00
Giovanni Cascione
ca0eb94933 LIBRETRO: remove processMouse arguments 2023-09-09 00:36:02 +02:00
Giovanni Cascione
c92f3dba01 LIBRETRO: extended retro_set_controller_port_device to additional devices 2023-09-09 00:36:02 +02:00
Giovanni Cascione
96710cd093 LIBRETRO: refactor retro_input_device and add get function 2023-09-09 00:36:01 +02:00
Giovanni Cascione
76d177cec6 LIBRETRO: expose input_cb and refactor 2023-09-09 00:36:00 +02:00
Giovanni Cascione
b320082bd2 LIBRETRO: refactor log_cb 2023-09-09 00:35:59 +02:00
Giovanni Cascione
4cb49b3682 LIBRETRO: add retro settings export functions 2023-09-09 00:35:59 +02:00
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
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
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
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
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
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
bdc6d72e0b ANDROID: Added ARM NEON detection in backend init 2023-08-13 00:22:10 +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
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
Miro Kropacek
18dafa1742 BACKENDS: ATARI: Disable director & remove unused dat files 2023-08-12 17:38:49 +02:00
Miro Kropacek
7e3b9cceec BACKENDS: ATARI: Direct rendering support
Similar to SuperVidel's but requires an additional C2P pass.

Also, a few optimizations added like cursor is being assumed to be in
a persistent memory so we don't copy it over. And it's using a mask
instead of key.

This graphics mode is not perfect though and works reliably only with
source surfaces allocated via Surface::init() otherwise wrong memory
location is being read.

Still, can gain quite a few CPU cycles, especially on 640x480 screens.
2023-08-12 17:38:49 +02:00
antoniou79
b347be081c ANDROID: Support two finger touch mouse wheel 2023-08-11 16:52:06 +03:00
antoniou79
ba815489f8 ANDROID: Add delay for jump move and mouse down in direct multitouch
This fixes right click and hold behavior to choose a verb action from the "verb coin" in tony tough

Previously, in direct touch mode, the action selected would refer to the previous item that was under the cursor
before the jump to the new touch point.
2023-08-11 16:52:06 +03:00
antoniou79
fbf91a4b28 ANDROID: Add another delay (move to button down) for direct touch mode
Some engines seems to also expect such a delay (tested with Curse of Monkey Island and Tony Tough).

Without this added delay, direct touch mode would work ok in the launcher and GMM GUI but in-game there would be issues.
In Curse of Monkey Island, early difficult selection screen, it was not possible to select the difficulty with a simple tap (direct touch mode).
And in gameplay proper, a simple tap would move the cursor to the touched position but Guybrush would walk to the last position of the cursor (before it jumped to the new one)
Tony Tough had similar issues with its menu.
2023-08-08 10:56:53 +03:00
antoniou79
7959c431aa ANDROID: Make virtual keyboard arrow keys similar to physical
Basically treats the arrow keys from the virtual keyboard in a special manner

It translates them to KEYCODE_UP(/DOWN/LEFT/RIGHT) and if held down sents consecutive KEYUP / KEYDOWN events
instead of the previous behavior of setting the kbdRepeat flag and just sending repeated KEYDOWN events and one final KEYUP.
Previous behavior would result in poor navigation on lists when the arror keys were held down. The new system works better.
2023-08-07 17:31:02 +03:00
antoniou79
95f1ca2847 ANDROID: Fix double tap and right click hold for direct mouse mode
Also re-work slightly the system for handling the delayed mouse up touch event
2023-08-07 17:31:02 +03:00
antoniou79
3bb60278d6 ANDROID: JANITORIAL: Fix formatting 2023-08-07 17:31:01 +03:00
Thierry Crozat
fc51e86b3d IOS7: Prevent sleep when a task is running 2023-08-06 23:07:35 +02:00
sluicebox
dc0ba4e14a WIN32: Re-enable Win32PluginProvider
In 2006, Win32PluginProvider was removed from Windows builds:
df5be19409

Instead, SdlPluginProvider became the provider used in Window builds.
Currently, no code uses Win32PluginProvider.

The two classes are small and effectively do the same thing, but
Win32PluginProvider has the advantage of using our Windows string
conversion functions for paths, just like the rest of backend code.
We've seen problems before where SDL handles encoding differently:
0ab9653556f837ced66f73de8499170dcd3079be
2023-08-06 14:16:16 +02:00
Thierry Crozat
a719b6301d IOS7: Register a default iconspath 2023-08-05 17:16:13 +02:00
Lars Sundström
38eb53f1db IOS7: Add X and Y buttons to virtual controller 2023-07-21 23:06:01 +02:00
Lars Sundström
9a980c9dd4 IOS7: Fix show/hide of virtual controller in iOS 15
The change in commit 1b3c783b9e assumed
that the orientation already had been updated when the system called
viewWillTransitionToSize. This seems to be true for iOS 16 while in
iOS 15 the orientation seems to be updated a bit later.

In iOS 16, make sure that the current orientation is updated when the
function viewWillTransitionToSize is called to make sure it's updated
when the adjustViewFrameForSafeArea is called. This makes sure that the
screen size is updated correctly when forcing the orientation based on
the backend user setting.
In iOS 15 (and below), set the current orientation when the transition
animation finishes to make sure that the interface orientation has been
updated to make sure the virtual controller is connected/disconnected
properly based on the orientation.
2023-07-21 23:06:01 +02:00
elasota
88fcfad6ca BACKENDS: ANDROID: Fix build 2023-07-20 19:07:20 +02:00
Cameron Cawley
511a8913d0 DS: Fix building with the text console enabled 2023-07-20 17:43:32 +01:00
Miro Kropacek
d9a5de0fe6 BACKEND: ATARI: Screen shaking and some fixes
- surface setup for optimized 4-bit C2P routine wasn't properly detected

- STFA pretends to support Falcon sampling frequencies on TT leading to
  suboptimal sample mixing

- delayMillis() should check also for other events (fixes Future Wars)
  but avoid doing it for SCI as its MIDI timer would call itself in a
  recursive loop

- SuperVidel doesn't need to use VsetScreen() in VBL anymore

- Wetlands, Teen Agent, Shivers and Private Eye need non-aligned
  surface  widths

- However Wetlands and Private Eye use setCursorPalette, see
  https://bugs.scummvm.org/ticket/14524

- Added warning for Phantasmagoria's 630x450, nothing can be done there
  as the game also requires non-aligned surfaces and at the same time
  the buffer has to be aligned on 16 bytes.

- BDF scaling disabled by default
2023-07-19 22:22:11 +02:00
elasota
b8acbe6bee COMMON: Archive path refactoring, add getFileName and getPathInArchive that unambiguously return the filename or the full path 2023-07-19 18:51:37 +02:00
Lars Sundström
1d63f4f0af IOS7: Update virtual controller on orientation changes
The virtual controller layout is not updated properly on
orientation changes. Buttons can be placed outside the screen.
Make sure to set the GCControllerView properties on orientation
changes by connecting the virtual controller based on the
user settings.

On iPhones the virtual game controller buttons does not fit
within the screen borders in portrait mode. Disconnect the
virtual controller on iPhones when changing orientation to
portrait mode.
2023-07-17 21:42:25 +02:00
Lars Sundström
77244e516f IOS7: Set virtual gamepad controller properties
Utilize an undocumented way to find the GCControllerView by drilling
down the subviews. When found, set the GCControllerView frame size
to full screen size to make sure all buttons do fit within the
screen boundries. This is important to do on devices with safe areas
like iPhones with the sensor panel.

Set the GCControllerView alpha to the user specified value.
2023-07-17 21:42:25 +02:00
Lars Sundström
3c85d6a7a6 IOS7: Add on-screen opacity to iOS backend options
Let the user configure the opacity for the on-screen controls using
a slider with allowed values from 1 to 10, where 10 is 100%.
2023-07-17 21:42:25 +02:00
Le Philousophe
538fd65ed6 ANDROID: Make 3 fingers multitouch easier to trigger
We can receive a move event while having two fingers pressed but this
doesn't always mean we really moved.
2023-07-14 20:53:35 +02:00
Le Philousophe
a58bac8ccb ANDROID: Avoid calling native code from UI thread
This can lead to race conditions.
When synchronizing virtual keyboard state, just set a variable in UI
thread.
The variable will be read in worker thread during event polling, this
will ensure that graphics code is configured at a proper time.
2023-07-14 11:22:06 +02:00
antoniou79
8e6be2beec ANDROID: Don't trigger haptic feedback on double tap 2023-07-11 18:15:54 +03:00
Giovanni Cascione
0c3e3aaebc LIBRETRO: JANITORIAL: fix typo in setting description 2023-07-11 01:20:05 +02:00
Giovanni Cascione
77f7e24097 LIBRETRO: add sample rate setting 2023-07-11 01:19:50 +02:00
Giovanni Cascione
3d67e4bcc1 LIBRETRO: add empty audio buffer to use for GUI framerate control 2023-07-11 01:19:25 +02:00
Giovanni Cascione
d18ad98339 LIBRETRO: add framerate cap setting 2023-07-11 01:19:10 +02:00
Giovanni Cascione
7d846d9a82 LIBRETRO: switch thread in GUI on poll event only 2023-07-11 01:18:55 +02:00
Giovanni Cascione
f86ca443dd LIBRETRO: set auto frameskip based on frame time 2023-07-11 01:18:42 +02:00
Giovanni Cascione
968adcb49d LIBRETRO: drop min_auto_frameskip 2023-07-11 01:18:24 +02:00
Giovanni Cascione
e4f6f5d7f8 LIBRETRO: simplify timer 2023-07-11 01:18:05 +02:00
Giovanni Cascione
e2b5bc1f67 LIBRETRO: merge cons scr updates w timing inaccuracies setting 2023-07-11 01:17:49 +02:00
Giovanni Cascione
edfd3d0b10 LIBRETRO: add min_auto_frameskip reset 2023-07-11 01:17:20 +02:00
antoniou79
e9db16350e ANDROID: Don't use the long press haptic feedback for multitouch 2023-07-09 17:51:40 +03:00
Le Philousophe
e3877d2606 ANDROID: Move game at the top of screen when keyboard is shown 2023-07-09 11:48:27 +02:00
Le Philousophe
e62b59f16c ANDROID: Synchronize keyboard status between Java and C++
Without this, if keyboard is displayed by the user, the C++ side never
knows about it.
2023-07-09 11:48:27 +02:00
Lars Sundström
1b3c783b9e IOS7: Update current orientation before animation completes
The overided viewWillTransitionToSize instance method did update the
current orientation when animation to the new orientation completed.
However, that made the handling of safe areas on devices having such,
e.g. iPhones with the sensor bar on top, racy. The correct orientation
was set after the adjustViewFrameForSafeArea function was called.

Set the new orientation before the animation completes.
2023-07-08 18:49:54 +02:00
Lars Sundström
34d7cd3769 IOS7: Implement setting of requested screen orientation
Implement function to trigger the device to set the screen
orientation according to the configration in the backend
options tab.

The implementation to trigger the setting is different for
devices running iOS prior version 16 and version 16+.
The screen orientation update is triggered when user has
applied the setting in the backen options tab, when the GUI
launcher is loaded and when starting a game.
The orientation is only changed if going from any portrait
mode to any landscape mode and the opposite.

Based on the setting, an UIInterfaceOrientationMask property
is set to hold the allowed interface orientations. If the
setting is "Portrait" the property will be set to
UIInterfaceOrientationMaskPortrait, allowing to only change
the orientation to normal or upside down portrait modes.
If the setting is "Landscape" the UIInterfaceOrientationMask
will be set to UIInterfaceOrientationMaskLandscape allowing
the device to rotate the screen orientation only to either
right or left landscape mode. If set to "Auto" all orientations
will be allowed.

When the device orientation changes, the system calls the
instance property method supportedInterfaceOrientations on the
root view controller or the topmost modal view controller that
fills the window. If the view controller supports the new
orientation, the system rotates the window and the view
controller. The system only calls this method if the view
controller's shouldAutorotate method returns YES, which is the
default value.

The event handler is refactored to receive the internal screen
orientation value instead of the enum value of the UIKit enum
UIInterfaceOrientation. The convertion from UIInterfaceOrientation
to ScreenOrientation is done in iPhoneView class instead when
sending the new orientation value to the event handler.
This also makes the convertion aligned with the screen orientation
settings in the function setSupportedScreenOrientation.
2023-07-08 18:49:54 +02:00
Lars Sundström
147d41b360 IOS7: Add screen orientation settings to backend menu tab
Add options to let the user configure the screen orientation when
in games and in launcher. The option can be set per game as well
to allow for some games to start in landscape mode while others
in landscape mode.

This commit implements the options in the backend menu tab. The
code is very much similar as the one implemented in the Android
backend.
2023-07-08 18:49:54 +02:00
Thierry Crozat
885ee122c7 IOS7: Factorize code to get the interface orientation 2023-07-08 18:49:54 +02:00
Le Philousophe
36418c7ebd ANDROID: Increase timeout to trigger middle click to 1.5s 2023-07-06 20:54:39 +02:00
Le Philousophe
c2ee0fb250 ANDROID: Notify user when a touch will trigger a right or middle click 2023-07-06 20:54:29 +02:00
Thierry Crozat
481f849c5a IOS7: Fix hiding keyboard in portrait mode when not in game 2023-07-04 23:14:49 +01:00
Le Philousophe
7f0d75bbfc ANDROID: Fix cursor position in touchpad mode while rotating
Without this, the cursor ends up in limbo and you need to scroll several
times to make it appear again.
2023-07-04 21:09:13 +02:00
Lars Sundström
06e231a649 IOS7: Show keyboard automatically when in game and portrait mode
Open the iOS system keyboard automatically when starting a game and
screen orientation is portrait. If orientation changes to portrait,
open the keyboard automatically only if game is running.
2023-07-03 21:50:32 +02:00
Lars Sundström
3ee048d922 IOS7: Update logic for touch events for Apple TV remote
The Apple TV remote sends touch events of type UITouchTypeIndirect
since it's not touches made on the screen. In iOS touchpads might
send UITouchTypeIndirect touch events as well as mouse move events.

So in iOS we want to block touches of type UITouchTypeIndirect
while in TV OS we want them to be handled.

Touchpad mode for touch events is also required for the Apple TV
remote to work properly. Make sure to disable the possibility to
disable touchpad mode in TV OS.
2023-07-03 21:50:32 +02:00
Lars Sundström
d8bc349b37 IOS7: Resize main frame depending on keyboard size and orientation
It's important that the main frame, displaying the OpenGL rendered
graphics, has the proper dimensions and depending on the device
orientation. It's also important that the frame is not covered by
the iOS keyboard.

This commit calculates the frame size depening on the orientation
and the keyboard status. The keyboard knows its parent view and
can resize it when the keyboard becomes visible or hidden.

There are multiple scenarios where the frame size is changed.
 - When the keyboard is hidden/shown which can be automatically
   change depending on the device orientation
 - If the system demands the keyboard to get visible or hidden
 - When rotating the device
 - When suspending/resuming the application

There can also be combination of the scenarios above, e.g. if
suspending the application in landscape mode and resume it in
portrait mode.

A lot of effort has been put into testing different scenarios to
verify that the screen size becomes correct. However there might
be some scenario which has not been covered.
2023-07-03 21:50:32 +02:00
Lars Sundström
5d5564fceb IOS7: Hide word suggestion list in newer iOS versions
Since iOS 15 or 16 both auto correction and spelling check have to
be disabled to hide the word suggestion list above the keyboard.
2023-07-03 21:50:32 +02:00
Lars Sundström
598bc231ab IOS7: Cancel pending button if touch is moved within 250 ms
If not in "click-and-drag" mode, left mouse button down and up
events are sent on touches ended if the touch lasted less than
250 ms. If the touch lasted longer it was considered as a move
and no button events are sent.

This commit mimic that behaviour in touchpad mode when "click-
and-drag" mode is enabled. The left mouse button down event is
queued for 250 ms. If the touch is dragged within 250 ms it is
considered as a move and the queued mouse button down event is
cacelled. If no movement is made withing 250 ms the queued
mouse button event is processed.
2023-07-03 21:50:32 +02:00
Lars Sundström
b324c70748 IOS7: Implement switching of 2D/3D graphics managers
Implement the same "hacky" way to switch between the 2D and 3D
iOSGraphicsManagers as the Android and SDL backends.

This commit enables 3D capable games to utilise the horse powers
in the GPU to render graohic. Older iPhones and iPads (iPhone 6,
iPad Mini v1) are able to run quite advanced games without any
stuttering if run in Release mode.
2023-07-03 21:50:32 +02:00
Lars Sundström
fb4f7d6de2 IOS7: Remove old IOS7 graphic handling
Delete the old graphic handling in the IOS7 backend which is not
used anymore after implementing iOSGraphicsManager.

The Accelerate framework is not used anymore. The OpenGLGraphics
manager handles the different color formats.
2023-07-03 21:50:32 +02:00
Lars Sundström
d36074773b IOS7: Add internal event for signalling screen changes
When the screen dimension changes, e.g. on rotation of the device,
the graphic manager has to be informed of the new dimension to be
able to resize the surfaces.

To quickly redraw the entire screen, Common::EVENT_SCREEN_CHANGED
event is passed to the event handler.
2023-07-03 21:50:32 +02:00
Lars Sundström
e0ae1a1d47 IOS7: Rework mouse movements to use iOSGraphicsManager
Previously the mouse position in the view was tracked using the
pointerPosition property. Scaling and relative mosue movements
were calculated in the view using screen properties stored in the
videoContext structure. Now when moving to iOSGraphicsManager all
that handling will be handled by the WindowedGraphicsManager,
which the iOSGraphicsManager inherit.

Rework the input code to send down pure x and y position values,
scaled according to the view content scale factor.

Remove code related to mouse movement that is no longer needed.
2023-07-03 21:50:32 +02:00
Lars Sundström
208aa43d5b IOS7: Render openGLContext
Implement callbacks to set up OpenGL context, destroy context, get
scale factor and screen sizes. Implement rendering of graphics drawn
by the iOS graphicsManager.

This commit will enable graphics to be shown again. Screen rotation
and mouse movements are still to be adapted.
2023-07-03 21:50:32 +02:00
Lars Sundström
580d8424ca IOS7: Change OSystem_iOS7 to be a ModularGraphicsBackend
Remove all pure virtual functions in OSystem_iOS7 since they are
implemented by ModularGraphicsBackend.

This commit will break the graphics implementation in the ios7
backend and crash due to no OpenGL context created for the
graphicsManager to use.
2023-07-03 21:50:32 +02:00
Lars Sundström
e6232547d5 IOS7: Add iOSGraphicsManager class
The ios7 backend implements the graphic handling in the backend code.
iOS supports OpenGL through the OpenGL Framework since iOS 2.0. It's
marked as deprecated but is still shipped with the SDKs for iPhoneOS
and tvOS and will hopefully be so for some time.
The ios7 backend can therefore utilize the OpenGLGraphicsManager to
handle all graphics.

Implement an iOSGraphicsManager class that can be used in the ios7
backend. The iOSGraphicsManager will require some callback functions
in the ios7 backend. createOpenGLContext() will be called to ask the
backend to create an OpenGL context in which the graphic manager can
draw. The function returns the ID of the renderbuffer which shall be
used when creating the framebuffer object this differ iOS from other
platforms). A custom RenderBufferTarget class is added to address
this.

destroyOpenGLContext() will be called to make sure that the old GLES
context is not reused. notifyContextDestroy() does call the function
OpenGLContext.reset() but that will not destroy the context.

refreshScreen() will be called to ask the backend to present the
drawn graphics on the screen. getSystemHiDPIScreenFactor() is called
to get the screen scaling factor. getScreenWidth() and
getScreenHeight() are called to get the width and height of the
surface to draw on.

This commit adds the class but the ios7 backend doesn't make use of
it quite yet. To use it require the ios7 to be a child class of the
ModularGraphicsBackend. That change requires a lot of changes which
will be targeted in separate commits.

Update docportal and github ci worker to only disable the feature
opengl_classic_game since opengl and opengl_shaders are required to
compile the OpenGLGraphicsManager.
2023-07-03 21:50:32 +02:00
Le Philousophe
7d816c23db ANDROID: Reload keyboard on display configuration change
This ensures that keyboard is properly resized
2023-07-01 16:26:19 +02:00
Le Philousophe
d371b50d30 ANDROID: Add setting to to disable screen rotation 2023-07-01 16:26:19 +02:00
Le Philousophe
3a838c99f9 ANDROID: Various small fixes
- Comment and space fixes
- Remove outdated setting
2023-07-01 16:26:19 +02:00
Le Philousophe
1cffb9c86a ANDROID: Don't make GL calls when there is not context
This is forbidden by EGL specification
2023-06-26 15:25:27 +03:00
Le Philousophe
8e731782cc ANDROID: Fix ifdef
isRunningInMainThread is used by GLTHREADCHECK when ANDROID_DEBUG_GL is
defined
2023-06-26 15:25:27 +03:00
Cameron Cawley
33b09af3b2 ANDROID: Allow screen rotation 2023-06-26 15:25:27 +03:00
Le Philousophe
bc438d078a ANDROID: When resizing don't reset everything
Only reinitialize the needed bits.
EGLSurface needs to be reset to take the new size into account.
GLSurfaceView in AOSP does the same thing.
2023-06-26 15:25:27 +03:00
Le Philousophe
14d57b2b61 ANDROID: Don't use a framebuffer when it's not needed
This also fixes a bug in frame buffer placement in vertical aspect ratio
2023-06-26 15:25:27 +03:00
Le Philousophe
75b3be75b3 ANDROID: Don't improve score when bits is not enough 2023-06-26 15:25:27 +03:00
Thierry Crozat
13d449e553 IOS7: Add GUI option to show/hide the keyboard accessory bar 2023-06-25 21:49:33 +01:00
Giovanni Cascione
dc8161ef4e LIBRETRO: update libretro-common 2023-06-23 01:30:47 +02:00
Giovanni Cascione
84587e9762 LIBRETRO: reduce timer interval 2023-06-23 01:30:13 +02:00
Giovanni Cascione
687f605815 LIBRETRO: fix delay thread switch function 2023-06-23 01:30:02 +02:00
Giovanni Cascione
c8fff523d6 LIBRETRO: rework _nextSwitchTime slip 2023-06-23 01:29:41 +02:00
Giovanni Cascione
c8e9853463 LIBRETRO: fix timing.fps 2023-06-23 01:29:26 +02:00
PushmePullyu
e7fa161386 AMIGAOS: Cleanup and free signals via atexit()
Fixes #6956 "ScummVM returned with unfreed signals (AmigaOS4)"
2023-06-21 08:27:04 +03:00
Miro Kropacek
2ce02658ec BACKENDS: ATARI: DMA playback is not always active
E.g. in the overlay there's no need to steal cycles for playing empty
sample buffer.

Also make STMIDI default audio driver for the slim version.
2023-06-15 22:57:55 +02:00
Miro Kropacek
5537759c53 BACKENDS: ATARI: Rework
- Atari TT support
- all video and audio is now handled via XBIOS
- reworked IKBD handling using Kbdvbase vectors, esp. Kbdvec()
- video uses proper triple buffer
- arbitrary game screen size support
- many fixes and optimizations
2023-06-15 22:57:55 +02:00
Le Philousophe
caa7e5c8df ALL: Add limits for all codebase 2023-06-06 08:14:25 +02:00
Le Philousophe
287b228af0 POSIX: Add AppImage support
And add a target to generate the image
2023-06-01 20:39:17 +02:00
Thierry Crozat
0eca37a262 BACKENDS: Remove old iPhone backend
This backend was no longer maintained and have had no release
and no daily builds for several years.
2023-05-31 19:31:19 +01:00
Lars Sundström
8e97e8dff4 IOS7: Refactor touchpad mode to utilize delta mouse function
Instead of having duplicated code, utilize the delta mouse function
also for touches when in touchpad mode.
2023-05-15 12:43:39 +02:00
Lars Sundström
01b9f728de IOS7: Implement relative mouse movements for touches
Send relative mouse movements from backend for touch events. The
relative x and y values are necessary for some games, e.g. Myst3.
2023-05-15 12:43:39 +02:00
Lars Sundström
d397938107 IOS7: Implement support for setting mouse pointer speed
Implement support to set the mouse pointer speed in settings.
The mouse pointer speed is applied to both mouse input and touch
input when in touchpad-mode.
2023-05-15 12:43:39 +02:00
Lars Sundström
72518221d8 IOS7: Scale mouse movements
The delta values are in number of pixels on the native screen
resolution. Need to scale down the delta values based on the
game resolution. Store reminders that are added to next deltas
to mitigate "dead zones" if doing small movements.
2023-05-15 12:43:39 +02:00
Lars Sundström
568b06940e IOS7: Add mouse input events
Add input events that can be used by mouse devices, e.g. mices and
touchpads. This event sends the raw input actions and doesn't care
about different controller modes such as click-and-drag.

Make the mouse controller utilize the new mouse input events.
2023-05-15 12:43:39 +02:00
Lars Sundström
5a0eccf337 IOS7: Rename mouse events to touch events
The current mouse events are handling events created from both touch
and mouse input. The events have lots of logic to deal with gestures
and different modes (touchpad mode, click-and-drag etc) which are not
applicable for hardware inputs.

Rename the current "mouse events" to "touch events" to clarify which
input that triggered an event. As this is the first commit in multi-
commit change, the mouse input need to use the "touch events" until
a new "mouse event" is implemented.
2023-05-15 12:43:39 +02:00
D G Turner
f1d2ba701a WII: Add Code for GDB Debugging Over Ethernet using TCP
The Gecko USB serial adapter is no longer easy to obtain and using
the Ethernet adapter instead is supported by devkitPro/libogc.

However, when enabled, this fails to link when dynamic plugins are
enabled due to missing symbols for gdbstub_getoffsets() found in
devkitPro/libogc/libdb/debug_supp.c. To be exact, this is the
u8 __text_fstart[],__data_fstart[],__bss_fstart[] which should be
implicitly provided by the linker(?)

A monolithic static build with this enabled does succeed, but has not
yet been tested.
2023-05-15 00:51:27 +01:00
elasota
ee758dee53 BACKENDS: Undo some formatting-only changes. 2023-05-14 22:42:59 +02:00
elasota
6c8ceeae25 BACKENDS: Refactor some things to make getDoubleClickTime behavior with event recorder simpler. 2023-05-14 22:42:59 +02:00
elasota
126ccc5983 BACKENDS: Fix double click time pull from event recorder not working correctly. 2023-05-14 22:42:59 +02:00
elasota
74ddbe5eaa BACKENDS: Add double-click time feature to support OS-configurable double-click intervals, implement it for Windows. 2023-05-14 22:42:59 +02:00
Hubert Maier
bce0eeb91c AMIGAOS: amigaos.cpp - Set default gfxmode to "surfacesdl" 2023-05-14 23:07:10 +03:00
Giovanni Cascione
14335f50aa LIBRETRO: refactor OSystem_libretro 2023-05-14 18:56:15 +02:00
Giovanni Cascione
a062f06bd1 LIBRETRO: add auto setup for extra/theme folders 2023-05-11 20:50:48 +02:00
Giovanni Cascione
2e98da4e9e LIBRETRO: add core path as fallback for system and save folders 2023-05-11 20:50:35 +02:00
Giovanni Cascione
3590bb387c LIBRETRO: add osd_notification 2023-05-11 20:50:22 +02:00
Giovanni Cascione
20ce78d889 LIBRETRO: move retroQuit in close_emu_thread loop 2023-05-11 20:50:06 +02:00
Giovanni Cascione
bf7938991d LIBRETRO: update libretro-common 2023-05-11 20:49:54 +02:00
Miro Kropacek
a6a5b8ab42 BACKENDS: ATARI: Handle themes in installation script
- "fat" version uses repacked (zip -0) archives; also separate "data"
  and "themes" folders
- "slim" version doesn't use any external themes (for speed reasons)
2023-05-11 00:03:44 +02:00
Miro Kropacek
76d3706492 BACKENDS: ATARI: Add build scripts
- consolidate public #define's (just ATARI)
- cpu compiler flags are specified in the script
- allow explicit move16, SV and SV Blitter features enabled/disabled

Provide two build scripts:

1. "Fat" one targeted at 040/060 machines (possibly with SuperVidel)

This one is optimized for 68020-60 (so it's still possible to try
highres engines on 68030 machines).

2. "Slim" one targeted at 030 machines (Falcon030+DFB/CT2 or TT030)

This one is optimized for 68030 and stripped from even more features:
"fancy" (highres) themes, move16 & SuperVidel routines and most
importantly the highres engines.
2023-05-10 22:58:26 +02:00
Giovanni Cascione
72c3b53ae4 LIBRETRO: update libretro-deps 2023-05-09 21:57:15 +02:00
Giovanni Cascione
a96eca3025 LIBRETRO: add git version to debug log 2023-05-09 21:51:54 +02:00
Lars Sundström
4de20a8032 IOS7: Adjust the frame on safeAreaInsetsDidChange calls
There is a race condition when iOS updates the safe insets and
the view is updated on orientation changes. When rotating the
device the callback function interfaceOrientationChanged is
called. This triggers rebuildSurface to be called, which will
call updateOutputSurface, which will trigger initSurface. That
function will finally will adjust the main frame towards the
safe areas by calling the function adjustViewFrameForSafeArea.

But it seems that when adjustViewFrameForSafeArea is called the
safe insets values are not updated which will lead to wrong
offset values in the frame for touches which will make the mouse
pointer inaccurate.

The iOS system makes calls to safeAreaInsetsDidChange whenever
the safe insets values are updated. Make sure to update the frame
on these calls to get correct touch offsets.
2023-05-09 14:33:56 +02:00
Giovanni Cascione
842a52fd42 LIBRETRO: fix delayMillis regular method 2023-05-07 15:25:11 +02:00
Giovanni Cascione
6be7019fb0 LIBRETRO: move timer handler calls 2023-05-06 13:30:52 +02:00
Lars Sundström
5817e72d0d IOS7: Implement Apple GCVirtualController
Apple introduced the GCVirtualController in iOS 15 which is a
software emulation of a real controller. The virtual controllers
can be configurable with different inputs. See more info at:
https://developer.apple.com/documentation/gamecontroller/gcvirtualcontroller

A simple gamepad configuration with a dPad and A and B buttons
is added. The user can enable/disable the virtual game controller
swiping two fingers right to left, or through the port-specific
option dialog.
2023-05-05 22:35:03 +02:00
Lars Sundström
045ddca927 IOS7: Add dpad actions to gamepad controller
Some game engines requires the dpad to control a character. The GRIM
engine is an example of this where the user steer the character by
the arrow keys or dpad controller.
2023-05-05 22:35:03 +02:00
Lars Sundström
fac7008914 IOS7: Call correct delegate method
The wrong delegate method was called for touchesCancelled. This
led to button presses ended too early if moving the fingers.
2023-05-05 22:35:03 +02:00
Lars Sundström
6d325f26c6 IOS7: Write changes to mouse modes to ConfMan
When changing "Touchpad mode" or "Mouse-click-and-drag mode" by
swipe gestures, these changes must be stored in ConfMan.
2023-05-05 22:35:03 +02:00
Lars Sundström
7861bca156 IOS7: Don't disable "touchpad" mode when enabling "click-and-drag"
The "touchpad" mode and "click-and-drag" mode was mutual exclusive
when enabling "click-and-drag" using swipe gesture.

The difference between "touchpad" mode and "click-and-drag" mode
is how the button down/up events are sent. In touchpad mode the
button down and button up events are sent on touches ended, while
in click-and-drag the button down event is sent on touches began
and button up on touches ended.
2023-05-05 22:35:03 +02:00
Lars Sundström
a690552301 IOS7: Remove legacy gesture recognizers
These gesture recognizers were inherited from the iphone port. The
ios7 port use the UIGestureRecognizers to accomplish the same.
2023-05-05 22:35:03 +02:00
Lars Sundström
9bc623a8a4 IOS7: Implement port-specifc option widget
Include the newly added ios7_options implementation to the project.
Change the file type to .mm which is Objective C++ to be able to use
the @availble mechanism.

Implement virtual functions and fix build errors in initial code.
Also add help section for the tvOS port when building for tvOS.

Add ios7_options to POTFILES to get automatic translation on the
help section.
2023-05-05 22:35:03 +02:00
D G Turner
91b8c1bb89 WII: Fix Build When Debugging Wii Memory Usage 2023-05-05 18:16:57 +01:00
Giovanni Cascione
b84bc71c25 LIBRETRO: rework delayMillis 2023-05-05 04:50:43 +02:00
Giovanni Cascione
b71a9808a6 LIBRETRO: add libretro timer 2023-05-05 04:50:25 +02:00
Thierry Crozat
0b92f048dc IOS: Add back new delegate methods but keep old ones
On iOS 12 and below, the one delegate methods are called. On iOS13.2
and above if both sets are implemented only the new delegate methods
are called, which prevent getting the deprecation warning.
2023-05-03 21:35:17 +01:00
Thierry Crozat
d2554266b3 Revert "IOS7: Implement new delegate methods replacing deprecated ones"
This reverts commit 46d6a76b8e.
The commit broke saving and restoring state when compiling with SDK 13
or above and running on iOS 12 or below. The functions to save/restore
were no longer called.
2023-05-03 01:54:22 +01:00
Giovanni Cascione
90680549f4 LIBRETRO: improve auto frameskip 2023-05-02 22:53:35 +02:00
Giovanni Cascione
65aed42e7f LIBRETRO: add retroDestroy() 2023-05-02 18:03:15 +02:00
Eugene Sandulenko
d362dc924e
BACKENDS: IOS7: Add inital code for port-specifc options 2023-05-02 11:13:02 +02:00
Lars Sundström
46d6a76b8e IOS7: Implement new delegate methods replacing deprecated ones
The delegate methods application:shouldRestoreApplicationState
is replaced with application:shouldRestoreSecureApplicationState
and the method application:shouldSaveApplicationState with
application:shouldSaveSecureApplicationState.

To support older versions of iOS, put them in a version check
macro.
2023-05-02 08:02:12 +02:00
Lars Sundström
50b67d97c4 IOS7: Implement use of Timer Dispatch Sources to drive timeHandler
The timeHandler was driven by calls to the pollEvent callback function.
Each time pollEvent was called the timeHandler called the TimeManager
handle function to advance in time and make sure scheduled tasks were
triggered.

This worked good for most game engines but some, e.g. the Hypno engine
was using the TimeManager to schedule tasks without calling pollEvent
since it was expecting nor handling events at the specific point in
time.

Since iOS have threads the timerHandler can be called from a separate
thread and not rely on pollEvent.
Implement timerHandler to use a Timer Dispatch Source which and make
it operate on a background thread rather than the main thread.
Read more on Dispatch Sources here:
https://developer.apple.com/library/archive/documentation/General/
Conceptual/ConcurrencyProgrammingGuide/GCDWorkQueues/GCDWorkQueues.html
2023-05-02 08:02:12 +02:00
Giovanni Cascione
b5ca1b340e LIBRETRO: BUILD: add test for zip availability 2023-04-29 03:22:55 +02:00
Giovanni Cascione
b25798ac34 LIBRETRO: BUILD: define LDFLAGS as simple expanded var 2023-04-29 00:00:00 +02:00
Giovanni Cascione
e6a7bac64b LIBRETRO: add LIBRETRO_DEBUG mode 2023-04-28 23:59:41 +02:00
Giovanni Cascione
6722fbf5c3 LIBRETRO: align scummvm and libretro log levels 2023-04-28 23:59:18 +02:00
Thierry Crozat
59c6d6fe4b IOS7: Add check of size for log file to make sure it does not grow too much 2023-04-27 01:24:30 +01:00
Thierry Crozat
c9b8bf2ca1 IOS7: Fix orientation detection when the view becomes visible 2023-04-27 01:24:30 +01:00
Thierry Crozat
e8d87fb92a IOS7: Create log file in Document folder
Previously no log file was used as it attempted to create it in
a directory not accessible by the application. The commit also fixes
accessing the log file from the Options dialog (it needs the
sandboxed path and not the full path).
2023-04-27 01:24:30 +01:00
Thierry Crozat
a36dba4db9 IOS7: Cleanup code to access Document and app bundle paths 2023-04-27 01:24:30 +01:00
Thierry Crozat
a0e32ee370 IOS7: Remove support for non-sandboxed mode 2023-04-26 22:31:31 +01:00
Thierry Crozat
4413600f2a IOS7: Fix missing override keyword 2023-04-26 08:29:59 +02:00
Thierry Crozat
788411b5fe IOS7: Remove checks that @available can be used
This was used in the past to make sure the code can be compiled
with old compilers that do not support using @available. But we
already dropped support for those old compilers, and in many
places already used @available without checking first that it can
be used.
2023-04-26 08:29:59 +02:00
Thierry Crozat
924d9e63e0 IOS7: Fix detection of orientation on some devices
The main change in to use the interface orientation and not the device
orientation. This may be different for example when locking the orientation.
This also changes the way orientation changes are detected using the
documented method. However this means dropping support for iOS 7 as this
method is only available since iOS 8, and alternative methods available in
iOS 7 have been deprecated in iOS 13.

Another change is to properly detect the interface orientation instead of
infering it from the view bounds, which was incorrect on some devices.
2023-04-26 08:29:59 +02:00
Giovanni Cascione
5873ee9688 LIBRETRO: remove unneeded exit_to_frontend on core unload 2023-04-24 02:01:58 +02:00
Giovanni Cascione
41606901e3 LIBRETRO: BUILD: temp disable fortify for android builds 2023-04-23 23:20:43 +02:00
Giovanni Cascione
ce2e2f353d LIBRETRO: refactor close content functions 2023-04-23 23:20:15 +02:00
antoniou79
135cd721c5 ANDROID: Prevent getPath() when getExternalFilesDir(null) returns null
According to documentation getExternalFilesDir returns the absolute path to application-specific directory

May return null if shared storage is not currently available.
This will not happen for getFilesDir() which returns the internal app path (always guaranteed to be available)
2023-04-23 13:36:53 +03:00
Giovanni Cascione
2fd912be59 LIBRETRO: BUILD: change optimization for android builds 2023-04-23 01:59:40 +02:00
Giovanni Cascione
9a861391c8 LIBRETRO: fix close content from quick menu 2023-04-23 00:58:16 +02:00
Giovanni Cascione
1800abaaa7 LIBRETRO: BUILD: add -Wno-undefined-var-template 2023-04-23 00:58:16 +02:00
Giovanni Cascione
74b91f3bf3 LIBRETRO: fix core reset feature 2023-04-21 18:08:54 +02:00
Giovanni Cascione
ab15b39465 LIBRETRO: simplyfy core unloading 2023-04-21 18:08:33 +02:00
Giovanni Cascione
9176a80269 LIBRETRO: add log_scummvm_exit_code function 2023-04-21 18:08:16 +02:00
Giovanni Cascione
ba2abf6d92 LIBRETRO: add scummvm_main parameters init function 2023-04-21 18:07:53 +02:00
Giovanni Cascione
598cc489e9 LIBRETRO: reset EMU_EXITED flag on emu thread deinit 2023-04-21 18:07:34 +02:00
Giovanni Cascione
3ecc32331b LIBRETRO: fix retro_get_memory_data return value 2023-04-20 13:07:16 +02:00
Giovanni Cascione
2b141e63b6 LIBRETRO: add g_system->destroy() 2023-04-20 13:07:03 +02:00
Giovanni Cascione
6cf91e9438 LIBRETRO: fix emu thread deinit 2023-04-20 13:06:51 +02:00
Giovanni Cascione
5e808c17be LIBRETRO: BUILD: add LITE flag for PSVita 2023-04-19 12:45:22 +02:00
Giovanni Cascione
f404d025ac LIBRETRO: add scummvm_main return code log 2023-04-19 12:45:22 +02:00
Giovanni Cascione
1d1fa646d0 LIBRETRO: add audio_status initial value 2023-04-16 20:44:55 +02:00
Giovanni Cascione
fbac0c281e LIBRETRO: fix current_frame initial value 2023-04-09 00:57:37 +02:00
Giovanni Cascione
3448c9808c LIBRETRO: JANITORIAL: drop unused vars 2023-04-09 00:57:37 +02:00
Giovanni Cascione
1d5d6056ea LIBRETRO: drop call to audio_cb on mute 2023-04-09 00:11:32 +02:00
Giovanni Cascione
ebcce94d3b LIBRETRO: drop call to video_cb on frame skip 2023-04-09 00:11:30 +02:00
Giovanni Cascione
f568826067 LIBRETRO: remove redundant latency update 2023-04-09 00:11:29 +02:00
Giovanni Cascione
0707a3db54 LIBRETRO: drop reduce framerate workaround 2023-04-09 00:11:28 +02:00
Giovanni Cascione
3c5bfb83c0 LIBRETRO: count single frames skipped for auto perf tuner 2023-04-09 00:10:21 +02:00
Giovanni Cascione
c49c7dbf6d LIBRETRO: add current frame to frameskip debug log 2023-04-09 00:10:18 +02:00
Giovanni Cascione
b3c1dc48bb LIBRETRO: do not frameskip if within THREAD_SWITCH_UPDATE loop 2023-04-09 00:10:18 +02:00
Giovanni Cascione
8d6700f346 LIBRETRO: fix first loop with fixed frameskip 2023-04-09 00:10:17 +02:00
Giovanni Cascione
ebb3095541 LIBRETRO: update latency in all cases when flagged 2023-04-09 00:10:16 +02:00
Giovanni Cascione
fd754d3f2a LIBRETRO: always use auto framerate reduction and drop setting 2023-04-09 00:10:15 +02:00
Giovanni Cascione
7460d2c3d7 LIBRETRO: change auto perf tuner actions order 2023-04-09 00:10:14 +02:00
Giovanni Cascione
ebd8997375 LIBRETRO: simplify reduce framerate option 2023-04-09 00:10:14 +02:00
Miro Kropacek
a4e85dab01 BACKENDS: ATARI: Remove double buffering & vsync
ScummVM engines are not built for synchronous screen locking (i.e.
updateScreen() can't be really used for any sort of blocking updates
otherwise performance suffers).

Single buffering now means deliberate tearing as a speed optimization
and triple buffering provides a tearingless picture with slight overhead.
2023-04-08 20:27:43 +02:00
Miro Kropacek
9ed3d0b5fe BACKENDS: ATARI: Avoid depletion of mixer slots
This was a bad idea from the beginning (see https://github.com/scummvm/scummvm/pull/4687/files#r1096804842)
but fortunately there is an easy and safe workaround: providing a buffer
with zero length. That way mixCallback() is always called while mixing
is avoided.

Also rename "output_samples" to "audio_buffer_size" to be on par with
the official documentation: https://docs.scummvm.org/en/latest/advanced_topics/understand_audio.html#buffer.
2023-04-07 17:31:40 +02:00
Donovan Watteau
d2e01fc709 MACOSX: Fix missing includes for older OSX releases 2023-04-05 15:51:27 +02:00
Antoniou Athanasios
12c5b7bb2b ANDROID: Improve support for gamepads and joysticks
Detect motion on DPAD (HATs), and on right stick as separately from the left stick

Also detect left and right trigger presses (when available)
2023-04-04 22:16:24 +03:00
Giovanni Cascione
b3959adb5f LIBRETRO: drop unneeded THREAD_SWITCH_RECT 2023-04-04 15:55:33 +02:00
Giovanni Cascione
492dad0fdb LIBRETRO: force framerate reduction for cons screen updates 2023-04-04 15:55:22 +02:00
Giovanni Cascione
ffc7d644ef LIBRETRO: add auto perf tuner reset on engine exit 2023-04-04 15:55:22 +02:00
Giovanni Cascione
c509343b6e LIBRETRO: add auto perf tuner restore feature 2023-04-04 15:55:21 +02:00
Giovanni Cascione
f1caf916ee LIBRETRO: chenge auto perf tuner logs to debug 2023-04-04 15:55:20 +02:00
Giovanni Cascione
5fd7646c12 LIBRETRO: invert consecutive_screen_updates setting action 2023-04-04 15:55:20 +02:00
Giovanni Cascione
b0f6af2332 LIBRETRO: rename Performance settings group to Timing 2023-04-04 15:55:19 +02:00
Giovanni Cascione
a47e0933c5 LIBRETRO: auto perf tuner to upper level
- add platform dependant flag to set default value
2023-04-04 15:55:18 +02:00
Giovanni Cascione
cb04a93042 LIBRETRO: drop OSD for auto perf tuner 2023-04-04 15:55:17 +02:00
Giovanni Cascione
ad822b3001 LIBRETRO: use auto frameskip with perf tuner 2023-04-04 15:55:17 +02:00
Giovanni Cascione
a9ab90c456 LIBRETRO: send NULL to audio_batch_cb if on mute 2023-04-04 15:55:16 +02:00
Giovanni Cascione
4135efbb68 LIBRETRO: add consecutive screen updates to auto perf tuner 2023-04-04 15:55:15 +02:00
Giovanni Cascione
7c8cc4df52 LIBRETRO: let auto perf tuner override settings 2023-04-04 15:55:15 +02:00
Giovanni Cascione
c3df289896 LIBRETRO: expose 'consecutive screen updates' as user setting 2023-04-04 15:55:14 +02:00
Giovanni Cascione
cd7a8e58cc LIBRETRO: JANITORIAL: fix BUG_REPORT.md typo 2023-04-04 15:55:13 +02:00
Miro Kropacek
64c864b5d3 BACKENDS: ATARI: Add "data" folder to search set
"make dist-generic" doesn't automatically look for files in "data"
folder. Commit be98f2a8 is somewhat related to this problem but only
for debugging purposes.

As relative "data" clashes with game's relative "data" (e.g. Full
Throttle demo), do the right thing and add it as absolute path.
2023-04-03 20:19:46 +02:00
Miro Kropacek
4e4aea1463 BACKENDS: ATARI: Don't call clock() and usleep()
Avoiding overhead when accessing system functions / variables.
2023-04-03 20:19:04 +02:00
antoniou79
64797234e6 ANDROID: Add Control tab for mouse pointer speed
and joystick deadzone. By supporting kFeatureKbdMouseSpeed and kFeatureJoystickDeadzone and registering default values

Both of these config settings (kbdmouse_speed, joystick_deadzone) factor in virtual mouse movement.

Helps handle virtual mouse pointer speed when controlled with DPAD or is too fast for the user
2023-04-02 21:55:56 +03:00
Le Philousophe
ecc050e83c ANDROID: Bundle cacert.pem and don't disable certificate checks 2023-04-02 11:39:44 +02:00
Giovanni Cascione
f614c53191 LIBRETRO: add framerate reduction option 2023-04-02 05:27:33 +02:00
Giovanni Cascione
addf767ceb LIBRETRO: simplify audio retrieve test and drop unused isInGUI() 2023-04-02 05:27:33 +02:00
Giovanni Cascione
bf42315fcd LIBRETRO: reorder audio retrieving 2023-04-02 05:27:33 +02:00
Giovanni Cascione
99f71d3e41 LIBRETRO: test frame_skip before thread switch 2023-04-02 05:27:33 +02:00
Giovanni Cascione
dbd7608f55 LIBRETRO: simplify audio_batch_cb call 2023-04-02 05:27:33 +02:00
Giovanni Cascione
f6010ebdaf LIBRETRO: reorder frameskip_type tests 2023-04-02 05:27:33 +02:00