Commit Graph

4627 Commits

Author SHA1 Message Date
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