Commit Graph

8643 Commits

Author SHA1 Message Date
Thierry Crozat
e302590cab SDL: Improve AmigaOS workaround for numpad
The previous workaround was introduced to fix fighting using the keypad
in Indy 3. It enforced genering a number on KEYCODE_KP# events even
when KBD_NUM is not set. The issue on AmigaOS is that SDL never reports
KBD_NUM as being set. Instead we get different keycodes depending if
numlock is on or off (e.g. KEYCODE_KP3 and KEYCODE_PAGEDOWN).

The new workaround is to set the KBD_NUM modifier whenever we receive
a KEYCODE_KP# event from SDL. This way we also generate a number, but
in addition this is consistent with the modifier and works with code
that checks the KDB_NUM modifier (such as the GUI code or the AGI
engine).
2022-03-13 21:33:39 +00:00
Cameron Cawley
460bc32cd9 OPENGL: Fix OpenGL ES v1 builds without GLAD 2022-03-07 17:40:01 +01:00
Paweł Kołodziejski
ee11c85f85 IOS: Added support for GLAD 2022-03-06 21:44:19 +01:00
antoniou79
5795fb6aea ANDROID: Remove extra parenthesis from virtual shortcut name
"ScummVM data (Ext))" is now corrected to "ScummVM data (Ext)"
2022-03-06 20:05:10 +02:00
Cameron Cawley
a4c99343b3 OPENGL: Fix shader compilation with older Android GPU drivers 2022-03-06 11:09:50 +01:00
Paweł Kołodziejski
016152971a
IOS: Fixed compiler warnings 2022-03-06 09:19:54 +01:00
C.W. Betts
b9d234e986 MACOSX: Improve conversion of path from NSString to C string
Use `-[NSString fileSystemRepresentation]` if you are going to pass
a path to a lower-level function, like `fopen()`.
2022-03-05 19:28:10 +00:00
Paweł Kołodziejski
e87773484c
BACKENDS: Add guard for SDL backend code under USE_OPENGL flag 2022-03-04 18:02:29 +01:00
Antoniou Athanasios
3ee5a99619 ANDROID: More safeguards against empty path in browser 2022-03-02 14:29:56 +02:00
Thierry Crozat
f3dc1df7d8 SDL: Get a user-specified screenshotpath from ConfMan at the start
There are two ways the user can specify a screenshot path: by
editing the config file manually, or by passing it on the command
line. In the later case it is added to the transient domain that
is cleared when opening the launcher, so it only worked when also
specifying a game to start on the command line. With this change
a screenshot path specified on the command line will be used until
quitting ScummVM.

This could be confusing if the user had the ability to specify the
path in the ScummVM Options, as then we would probably want to use
the new specified path immediately. But since the path does not
appear in the options, this change should work fine.
2022-02-16 22:24:07 +00:00
Thierry Crozat
533693437d SDL: Do not query directly ConfMan for the screenshotpath in Windows and macOS backends
Instead we call the OSystem_SDL implementation of getScreenshotsPath(),
as done in the POSIX backend. This change means that if we change how
we handle a user-specified screenshot path in the SDL backend, the
Windows and macOS backends will still get the correct path.
2022-02-16 22:24:07 +00:00
Kalle Kietavainen
31cfac5d6f SDL: Fix SDL_SetWindowMouseRect in HiDPI mode
In HiDPI mode, the window coordinates and the drawable area coordinates
might be on a different scale. The allowed mouse area needs to be scaled
accordingly before passing it to SDL_SetWindowMouseRect().

This fixes bug #13152.
2022-02-16 22:15:43 +00:00
Kalle Kietavainen
ca2405ed05 SDL: Fix mouse clip to game area in HiDPI mode
The mouse position is set in window coordinates, but it's clipped to the
game area in drawable area coordinates. Previously, the scaling between
these two was not taken into account when calculating the right/bottom
edges of the game area. When the clipped mouse position was converted
back to window coordinates and rounded to the nearest integer, it could
end up on the edge of the game area, not inside of it. This leads to a
loop in which the clipped mouse position is outside of the game area and
needs to be clipped again.

This fixes bug #12646.
2022-02-16 22:15:43 +00:00
Paweł Kołodziejski
d091e9e69c
PS3: Enable networking also if only SDL_NET is enabled 2022-02-12 14:55:56 +01:00
Paweł Kołodziejski
d0c1da03c8
PS3: Lower down stack size to 256KB 2022-02-09 22:08:04 +01:00
Le Philousophe
9f84198643 ANDROIDSDL: Remove deprecated port 2022-02-06 21:34:08 +01:00
Paweł Kołodziejski
fb3a63c78c
PS3: Implemented getting IP address for local web server 2022-02-06 21:20:49 +01:00
Le Philousophe
6fbd4a3abc ANDROID3D: Remove deprecated backend 2022-02-05 21:50:00 +01:00
Paweł Kołodziejski
9b6bb77f80
PS3: Set program stack size from default 64KB to 1MB 2022-02-03 00:56:33 +01:00
Cameron Cawley
cdcdb26ac8 WIN32: Fix bug in SHGetFolderPathFunc fallback code 2022-01-31 08:32:05 +02:00
Cameron Cawley
ff5700cd44 WIN32: Detect SHGetSpecialFolderPath at runtime 2022-01-31 08:32:05 +02:00
Thunderforge
fd129ebc0c JANITORIAL: "Mac OS X" and "OS X" to "macOS" in comments
Apple's desktop operating system was formerly called "Mac OS X" and "OS X", but since 2016 it has been called "macOS" (starting with version 10.12).

Changing across all comments and documentation to use this current terminology, except in cases where the historical versions are explicitly referenced. No code changes are made; we should consider changing those in future PRs.
2022-01-29 14:15:05 +01:00
Le Philousophe
f11295edda GRAPHICS3D: Don't build opengl stuff when it's not needed 2022-01-18 16:49:03 +01:00
Le Philousophe
1c18c269dc ANDROID: Add GLAD support 2022-01-18 16:49:03 +01:00
Le Philousophe
d9b4e457e8 ALL: Remove USE_GLES2 define
Replace it with USE_FORCED_GLES2
2022-01-18 16:49:03 +01:00
Cameron Cawley
a14c5a4a53 SDL: Replace gfx_mode with scale_factor in initSizeHint() 2022-01-16 13:22:37 +02:00
Paweł Kołodziejski
4f0e5ed3c0 GRAPHICS: Moved shader code where it's actually used 2022-01-10 03:34:48 +01:00
Paweł Kołodziejski
e291436b54 ANDROID: Attempt to fix Android linking 2022-01-10 03:08:57 +01:00
Paweł Kołodziejski
3dd3e76bc2 BACKENDS3D: Shader code files shouldn't be moved 2022-01-10 02:38:44 +01:00
Paweł Kołodziejski
27773309b7 BACKENDS: Corrected include paths for Android 2022-01-10 02:23:17 +01:00
Paweł Kołodziejski
f24bffc8cf BACKENDS: Drop glBegin/glEnd 2022-01-10 02:13:40 +01:00
Paweł Kołodziejski
d1d77f887e BACKENDS3D: Moved Surfaces and Texture specific backend code to backends 2022-01-10 01:21:49 +01:00
Le Philousophe
6bad1ba0ff SDL: SDL_SetWindowMouseRect is in 2.0.18 according to the documentation
2.0.17 is a development version while 2.0.18 is the first release
containing this function.
2022-01-08 11:13:15 +01:00
Le Philousophe
e59400315d ANDROID: Improve chooseEglConfig to make it select ES2 config first 2022-01-06 23:11:33 +01:00
Paweł Kołodziejski
d054f7785c GRAPHICS3D: MorphOS special code case is no longer needed 2022-01-03 14:29:32 +01:00
Le Philousophe
92dd9c0911 ANDROID: Keep last touch mode when displaying overlay 2022-01-02 17:45:32 +01:00
Le Philousophe
523b226243 ANDROID: Allow user to enable touch controls 2022-01-02 17:45:32 +01:00
Le Philousophe
639d633f12 ANDROID: Add touch controls to 2D backend
This is not usable for now as it's always disabled
2022-01-02 17:45:32 +01:00
Le Philousophe
dcd02117cf OPENGL: Make back buffer accessible from derivated classes 2022-01-02 17:45:32 +01:00
Le Philousophe
b6c0a1c6c8 ANDROID: Refactor touch controls to be graphics backend agnostic 2022-01-02 17:45:32 +01:00
Le Philousophe
325c47f954 ANDROID: Use Android runtime to open touch controls image
This allows to use PNG file for sure and don't make us use TGA decoder
2022-01-02 17:45:32 +01:00
Le Philousophe
b60c99ce98 OPENGL: Allow backends to draw textures clipped 2022-01-02 17:45:32 +01:00
Le Philousophe
7b36b56925 ANDROID: Rework Android 3D texture interfaces 2022-01-02 17:45:32 +01:00
Eugene Sandulenko
823bc16312
ALL: Update copyright year 2022-01-01 00:00:45 +01:00
Le Philousophe
675695c708 PSP: Fix build failures with latest PSP toolchain
The new PSP toolchain automatically links system libraries which wasn't
the case before. The ordering of libraries builtin in GCC and our spec
file collided. This fixes the order.
PSP SDK includes time.h so it needs an exemption.
A warning was emitted about a if without curly braces which are needed.
2021-12-31 09:50:53 +01:00
Cameron Cawley
21b0d6ded1 BACKENDS: Replace GLEW with GLAD, part of PR #3463 2021-12-30 14:53:48 +01:00
Cameron Cawley
43d87cb029 BACKENDS: Support detecting OpenGL ES 2 at runtime for 3D games 2021-12-30 13:57:50 +01:00
rsn8887
142f1d0c81 BUILD: Use ScummVM Team as author name on Switch platform
This change was discussed with and agreed to by Cpasjuste on
Discord
2021-12-28 19:25:07 -06:00
Eugene Sandulenko
d79b75dce5
DOCS: Moved all non-main licenses to LICENSES/ directory. Synced all lists
I could potentially break some port packaging as my changes were not tested
2021-12-27 14:58:23 +01:00
antoniou79
62c2e13650 ANDROID: Set relMouse for touch scroll events
Needed for Myst 3 mouse look, probably other games too

This should be followed up by similar update of relMouse for the cases of mouse look using a hardware mouse, a joystick, trackball, pen etc. We should also check if we need to do this for the cases of moving the mouse while holding down a button and for multitouch events that emulate that (eg. hold two fingers down and move).
2021-12-26 22:22:15 +02:00