Commit Graph

8840 Commits

Author SHA1 Message Date
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
Paweł Kołodziejski
20cb0ae228
ALL: Cleanup ResidualVM -> ScummVM 2021-12-26 21:19:38 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Andrea Boscarino
2c84382525 ANDROID/AUDIO: Convert the output buffer size value given to the Mixer from bytes to frame size 2021-12-19 12:53:27 +01:00
Matthew Duggan
466c8b8c76 ANDROID: Fix audio buffer size calculation from true buffer frames 2021-12-19 17:50:25 +09:00
Matthew Duggan
53c22e4f9a ANDROID: Fix softkeyboard button for Chromebooks
On a Chromebook, the keyboard may be present but hidden (not available for
use) because the device is flipped around in Tablet mode.  In this case we want
the soft keyboard to be available.  This change also hides the soft keyboard
button if the hardware keyboard is available, since it doesn't do anything.

Fixes #13138.
2021-12-18 16:32:43 +01:00
Le Philousophe
6aea08860f ANDROID: Chooose the best surface formats offered by the system 2021-12-16 00:09:25 +01:00
Le Philousophe
24565a5bd8 ANDROID: Rework 3D GLES textures
The abstraction added will allow the backend to allow surface
customization
2021-12-16 00:09:25 +01:00
Le Philousophe
35fff1ab79 ANDROID: Add cursor scaling to 3D backend 2021-12-16 00:09:25 +01:00
Le Philousophe
8094b77d21 ANDROID: Simplify 3D backend 2021-12-16 00:09:25 +01:00
Andrea Boscarino
5d04286237 ANDROID: Keep track of actual AudioTrack buffer size 2021-12-09 22:04:28 +01:00
Andrea Boscarino
f37489dd80 AUDIO/BACKENDS: Store output audio buffer size in Mixer 2021-12-09 22:03:40 +01:00
Cameron Cawley
424d76f0e7 OPENGL: Log more information about the GL context 2021-12-05 21:53:07 +01:00
Cameron Cawley
35e12e2491 OPENGL: Lower the minimum GLSL version to 1.10 2021-12-05 21:53:07 +01:00
Le Philousophe
04e05e7a5f ANDROID: Sync 3D backend HiDPI with 2D one 2021-12-05 16:43:30 +01:00
Le Philousophe
f12409d321 ANDROID: Simplify texture setup in 3D
There is no specific format for the game texture, use 16-bit one
2021-12-05 16:43:30 +01:00
Le Philousophe
30baf0e599 ANDROID: Unbind everything to ensure engine don't use our stuff 2021-12-05 16:43:30 +01:00
Le Philousophe
05e5e10dec ANDROID: Rework 3D backend to not mangle game GL state
We don't need scissor test in 3D, it was a leftover from 2D.
Don't split code in multiple functions when it's not needed.
2021-12-05 16:43:30 +01:00
Le Philousophe
91cf76aa64 ANDROID: Reset the framebuffer when initializing back the surfaces
It's needed when application is paused and resumed
2021-12-05 16:43:30 +01:00
Paweł Kołodziejski
948923c62c
GRAPHICS3D: Move viewport change to save/restore surface, framebuffer 2021-12-05 10:36:10 +01:00
Eugene Sandulenko
fa685f83ac
CLOUD: Fix overridden methods 2021-12-01 00:30:47 +01:00
Le Philousophe
e7b6cff4dd ANDROID: The virtual controls now generate fake joystick events
This allows to use the keymapper and not have hardcoded keyboard events
2021-11-29 00:04:45 +01:00
Le Philousophe
d6f37a161b ANDROID: Remove again updateEventScale
It was removed in android in #1695 but not in android3d in ResidualVM.
2021-11-29 00:04:45 +01:00
Le Philousophe
5b62141b8f ANDROID: Fix code style 2021-11-29 00:04:45 +01:00
Le Philousophe
2bb9d5f3df ANDROID: Remove outdated piece of code 2021-11-29 00:04:45 +01:00
Le Philousophe
3cb81ff31c ANDROID: Don't use unsigned int 2021-11-29 00:04:45 +01:00
Le Philousophe
afcb0c54e7 ANDROID: Use real size instead of magical constant 2021-11-29 00:04:45 +01:00
Le Philousophe
40a036ac0b ANDROID: Use nullptr where appropriate 2021-11-29 00:04:45 +01:00
Le Philousophe
8321056107 ANDROID: Remove superfluous asserts
new never returns nullptr, it throws exception or aborts
2021-11-29 00:04:45 +01:00
Le Philousophe
8a6f74b5a1 ANDROID: Remove global variables 2021-11-29 00:04:45 +01:00
Le Philousophe
2792b474e1 ANDROID: Remove superfluous ifdefs 2021-11-29 00:04:45 +01:00
Le Philousophe
7145b3c2f2 ANDROID: Add support for kSupportsArbitraryResolutions in 3D 2021-11-29 00:04:45 +01:00
Le Philousophe
20df3369b4 ANDROID: Rework 3D screen setup
All the setupScreen functions were useless as there is only one place
where it's called.
_opengl was always true.
_game_pbuf was never initialized.
2021-11-29 00:04:45 +01:00
Le Philousophe
d4e9c0eca4 ANDROID: Always enable blending when drawing all the layers 2021-11-29 00:04:45 +01:00
Le Philousophe
faa8986fc8 ANDROID: Display the game below the overlay menu 2021-11-29 00:04:45 +01:00
Le Philousophe
e4390abd86 ANDROID: Introduce back the touch controls for 3D 2021-11-29 00:04:45 +01:00
Le Philousophe
ebeb731ad7 ANDROID: Disable depth test as we don't use it in final rendering 2021-11-29 00:04:45 +01:00
Le Philousophe
f0aef09021 ANDROID: Make sure glDrawArrays succeeds 2021-11-29 00:04:45 +01:00
Le Philousophe
0988f3d6d8 ANDROID: Fix OpenGL debug in 3D backend 2021-11-29 00:04:45 +01:00
Le Philousophe
9ce3b692c6 ANDROID: Reinitialize some state before stopping 3D manager
This avoids breaking the 2D graphics manager
2021-11-29 00:04:45 +01:00
Le Philousophe
881f48b24d ANDROID: Set up scissor box when resizing
We enable the scissor test when the overlay is hidden so the box must be
correctly defined
2021-11-29 00:04:45 +01:00
Le Philousophe
2a444f981e ANDROID: Fix indentation 2021-11-29 00:04:45 +01:00
Le Philousophe
7352207555 ANDROID: Free frame buffer when it's unused 2021-11-29 00:04:45 +01:00
Le Philousophe
74c12b5e5a ANDROID: Use 5551 format for overlay instead of 4444
This allows for more color (but only 1 bit of alpha)
2021-11-29 00:04:45 +01:00
Le Philousophe
bb2871cd63 ANDROID: Implement modes completely to allow switching between 3D and 2D 2021-11-29 00:04:45 +01:00
Le Philousophe
5248999c95 ANDROID: Better debug of which graphic backend is used 2021-11-29 00:04:45 +01:00
Le Philousophe
5d56c1cdf0 ANDROID: Merge 3D graphics backend
Move each graphic part in backends/graphics and backends/graphics3d
2021-11-29 00:04:45 +01:00
Le Philousophe
706de81bb0 ANDROID: Switch to GLES2 2021-11-29 00:04:45 +01:00
Le Philousophe
dd038d72e8 OPENGL: Fix compilation with USE_BUILTIN_OPENGL
GL_FUNC2_DEF doesn't have the same arguments as GL_FUNC_DEF
2021-11-29 00:04:45 +01:00
Paweł Kołodziejski
606294d039
BACKENDS: Restore reference PixelSurface in Android3D 2021-11-28 09:45:40 +01:00
Paweł Kołodziejski
2a7aa00c85
BACKENDS: Remove PixelBuffer leftovers 2021-11-27 21:22:09 +01:00
Cameron Cawley
c0ea8e26c7 OPENGL: Fix crash when scaling small areas 2021-11-23 23:18:12 +00:00
Cameron Cawley
3bd4e8c6a4 OPENGL: Restore cursor scaling 2021-11-23 23:17:30 +00:00
Cameron Cawley
a21961516a GRAPHICS: Split ScalerPluginObject into two classes 2021-11-23 23:32:58 +01:00
Eugene Sandulenko
254db11419
BACKENDS: MACOS: Trigger GMM on the touchbar icon tap 2021-11-22 23:32:13 +01:00
Torbjörn Andersson
4c11b57ca0 BACKEND: Make it possible to check for other audio track numbers than 1 2021-11-22 19:38:40 +02:00
Cameron Cawley
35adc961be
Revert "OPENGL: Implement cursor scaling" (#3555)
This reverts commit 2db20b702e.
2021-11-21 12:40:28 +01:00
Cameron Cawley
2db20b702e OPENGL: Implement cursor scaling 2021-11-20 01:06:23 +01:00
Cameron Cawley
fe5b87d0f1 OPENGL: Implement scaler support 2021-11-20 01:06:23 +01:00
Cameron Cawley
30c093bbd9 OPENGL: Combine TextureCLUT8 and FakeTexture 2021-11-20 01:06:23 +01:00
Eugene Sandulenko
92ec44b6ab
BACKENDS: NETWORKING: Preparations for aborting the request
Looks like we need API for removing DumpFile, but that must be done
in a safe way.
2021-11-20 00:55:44 +01:00
Cameron Cawley
c6836c9b77 SDL: Use SDL_SetWindowMouseRect to confine the mouse area 2021-11-19 19:52:58 +01:00
Eugene Sandulenko
1507559a66
BACKENDS: NETWORKING: Fix local file downloading when stream is reused 2021-11-18 22:38:44 +01:00
Eugene Sandulenko
5df691a3a6
BACKENDS: NETWORKING: Properly signal end of downloaded file 2021-11-18 22:38:43 +01:00
Eugene Sandulenko
db7cec6935
CLOUD: SessionRequest now can save downloaded files to disk 2021-11-18 22:38:43 +01:00
Eugene Sandulenko
65020829fc
BACKENDS: CLOUD: Fix overridden methods 2021-11-18 22:38:42 +01:00
Eugene Sandulenko
768cac42f9
BACKENDS: NETWORKING: Make SessionRequest correctly process HTTP error codes 2021-11-18 22:38:42 +01:00
Eugene Sandulenko
a89cb7f85e
BACKENDS: NETWORKING: Added binary mode to SessionRequest 2021-11-18 22:38:42 +01:00
Eugene Sandulenko
cf1b6c5eb6
BACKENDS: NETWORKING: Add session.cpp to compilation 2021-11-18 22:38:42 +01:00
Cameron Cawley
4d206e5286
GRAPHICS: Clean up OpenGL defines (#3551) 2021-11-18 00:56:21 +01:00
athrxx
def88b7bae BACKENDS: (SURFACESDL) - improve comment
(we don't have "shake views" - these  changes of mine come from a long-abandoned experimental branch which allowed limiting the screen shaking to a certain area)
2021-11-16 20:48:04 +01:00
athrxx
3b061ae0e8 BACKENDS: (OPENGL/SURFACESDL) - include mouse pointer in screen shakes
This is the original behaviour of DOS games (where the screen shakes are done by writing certain offsets into the crt cotnrol register of the vga adapter).

Usually it doesn't matter much, since the shake is an effect that passes quickly. But the difference can be noticed in cases like DOTT when switching on the stereo in green tentacle's room. The shaking will continue until the stereo is turned off again. In that case it is really more appealing if the mouse cursor "sticks" to the background.
2021-11-16 20:34:20 +01:00
Eugene Sandulenko
b0001ef9f6
BACKENDS: MACOSX: Display OSD messages on the Touchbar
Okay, so Apple now deprecated the Touchbar in their line of
MacBooks. Exciting! Time to finally add support for it!
2021-11-15 17:45:30 +01:00
Orgad Shaneh
44219dfa1a BACKENDS: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Orgad Shaneh
b11c5ace90 BACKENDS: JANITORIAL: Remove 'virtual' when override is specified 2021-11-14 14:31:41 +02:00
Le Philousophe
174e0cc98a WIN32: Fix compilation for good ol' Windows 9x
Set _WIN32_IE to 0x500 everywhere and remove where it's not needed.
As we gracefully check if the function is present or not, it's OK to set
this define without having IE 5.0 installed on target
2021-11-14 10:45:09 +01:00
Orgad Shaneh
2e68b4ffdc JANITORIAL: Use override
Using clang-tidy modernize-use-override
2021-11-14 02:59:23 +02:00
sluicebox
6842e6f5a9 WIN32: Disable update checks in Portable Mode 2021-11-13 21:22:28 +01:00
sluicebox
3d6524c9f4 WIN32: Add Portable Mode
Adds support for a self-contained portable mode in which the
executable's directory is used for application files instead
of directories in the user's profile.

Portable mode is activated by placing a scummvm.ini file in
the executable's directory. The directory must be outside of
the system's Program Files directory to comply with UAC.
2021-11-13 21:22:28 +01:00
Cameron Cawley
5022489277 BACKENDS: Refactor the API for creating Mutexes 2021-11-12 20:19:45 +01:00
Eugene Sandulenko
c69fadfa65 BUILD: Added gui-icons.dat to the list of redistributable files 2021-11-12 14:46:34 +01:00
Le Philousophe
724dcd36e9 OPENDINGUX: Rework build_odbeta.sh to avoid environment variables 2021-11-12 11:59:48 +01:00
Le Philousophe
213168047e OPENDINGUX: Integrate all OpenDingux platforms in configure script 2021-11-12 11:59:48 +01:00
Orgad Shaneh
7a4e5612de JANITORIAL: Replace new[]/memset with new[]()
Mostly done using the following Ruby script:

(Dir.glob('**/*.cpp') + Dir.glob('**/*.h')).each do |file|
  s = File.read(file, encoding: 'iso8859-1')
  t = s.gsub(/(([\w_.\[\]]+)\s*=\s*new\s+\S+?\[[^\]]+?\](?!\())([^\{\}]*?)\n\s+memset\(\s*\2\s*,\s*0\s*,[^;]*;/m, '\1()\3')
  if t != s
    File.open(file, 'w') { |io| io.write(t) }
  end
end
2021-11-10 19:53:15 +01:00
Torbjörn Andersson
03b227fdf0 BACKENDS: DIALOGS: GTK: Keep ScummVM mouse pointer alive during dialog
Also, throttle the rate at which updateScreen() is called. I don't know
if it makes any difference, but it seems like a polite thing to do.
2021-11-09 09:45:36 +01:00
Paweł Kołodziejski
543e53eaad SURFACESDL: Implemented missing kFeatureVSync for getFeatureState() 2021-11-08 09:07:48 +01:00
Paweł Kołodziejski
dfe477e95e SURFACESDL: Implemented fallback in case lack of VSYNC 2021-11-08 09:07:48 +01:00
Torbjörn Andersson
bb0ce7ff25 BACKENDS: DIALOG: GTK: Keep main window updated during GTK+ dialog
Otherwise, anything moving across the main window while the dialog is
open may leave ugly trails. At least it does for me.
2021-11-08 08:46:47 +01:00
Marcus Comstedt
a8c59ef5b2 DC: Bump required libronin version 2021-11-03 19:10:25 +01:00
Marcus Comstedt
52cf32cccc DC: Break out some common code into a shared file
Also, add some C++11 constructs for good measure.  :-)
2021-11-03 19:10:25 +01:00
Le Philousophe
ded4ab6c23 WIN32: Enable GNU extensions for mingw
This way old mingw gets its __argc and __argv. Using gnu++11 instead of
undefining __STRICT_ANSI__ makes GCC11 happy.

Closes #3473
2021-11-02 20:52:36 +01:00
Le Philousophe
117927ce6c JANITORIAL: Remove unused HAVE_GCC3 variable 2021-11-01 21:46:15 +01:00
Michael Ball
d3e9cdb986 3DS: Set stack size w/o starting SVM inside a thread
This commit introduces a simpler method for setting the stack size. By setting a global variable __stacksize__,
we can override the identically-named, weak-attributed __stacksize__ defined in libctru. This is an intentional
feature of libctru, and renders it unnecessary to run ScummVM from within a thread.

Source: 192b88b6a2
Explanation: https://gbatemp.net/threads/homebrew-development.360646/page-245#post-6362424
Usage in the wild: https://github.com/masterfeizz/ioQuake3DS/blob/master/code/ctr/ctr_main.c#L44
2021-11-01 20:31:23 +01:00
Christophe Branchereau
849d05b5e2 OPENDINGUX: Add support for Opendingux Beta
OD Beta is a mips linux OS based on buildroot, that runs on ingenic gaming handhelds
like the gcw0, rg350 and many more.

There was a previous GCW0 port, that was running on legacy opendingux, but that
OS is not maintained since 2014 and has an outdated kernel and toolchain.

Od Beta on the other hand, runs with linux 5.15, has a GCC 10 toolchain and
an active developpment community.

This adds support for 3 flavors :

gcw0 that runs on all jz4770 cpus
lepus that runs on all jz4760 cpus
rg99 which is a jz4725 device

Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com>
2021-11-01 17:39:26 +01:00
Cameron Cawley
e3b72b6fef DS: Remove redundant event observer 2021-11-01 16:19:15 +00:00
Cameron Cawley
8c01baaaff DS: Get the virtual keyboard working with the mirrored subscreen 2021-11-01 16:19:15 +00:00
Cameron Cawley
224d626e65 DS: WIP virtual keyboard support 2021-11-01 16:19:15 +00:00
Cameron Cawley
dd1bf34f18 BACKENDS: Hide the virtual keyboard action when one isn't available 2021-11-01 16:54:39 +01:00
Cameron Cawley
6dbb129f40 BACKENDS: Allow activating the system virtual keyboard using the keymapper 2021-11-01 16:54:39 +01:00
Hubert Maier
ea8b6e9ae2 AMIGAOS: Replace query with correct one 2021-11-01 12:16:23 +01:00
Alexander Tkachev
5636ffb180 CLOUD: Tweak Networking::Reader pattern-matching logic
Instead of doing linear strcmp-like operation after every byte read, Reader now computes a "hash" of the needle it searches for and updates "hash" of the window contents. Now, it only does strcmp if window has the same "hash" as the needle, which also improves file upload speed for ScummVM's local webserver.
2021-11-01 12:15:27 +01:00
Alexander Tkachev
7a43994545 CLOUD: Fix Networking::Reader's window logic
Instead of shifting bytes in the array every time we read 1 byte, Reader now has two "pointers": where it reads from and writes into. This makes the buffer "circular", and removes the unnecessary bytes shifting, which results in increased file upload speed (only for the LAN server; libcurl side stays intact).
2021-11-01 12:15:27 +01:00
Hubert Maier
5ea9520c46 MORPHOS: Fix a regression/oversight 2021-11-01 11:59:28 +02:00
Alexandre Detiste
6044504762 JANITORIAL: typos
some in the variable names, some in the comments;
no change for the strings that interract with original games assets
2021-10-31 20:46:31 +01:00
sluicebox
40ed77d3bf WIN32: Fix build when USE_WINDBG is defined 2021-10-29 14:50:51 -05:00
Le Philousophe
6ba11c8f93 WIN32: Make sure _argc and _argv are present with mingw
In mingw32 when __STRICT_ANSI__ is defined these variables doesn't get
defined
2021-10-24 15:11:18 +03:00
Vanfanel
5873dfad7c SDL: Add missing getFeatureState() case for VSYNC. 2021-10-23 20:53:22 +01:00
Vanfanel
58a243842f SDL: Remove redundant #if. 2021-10-23 20:53:22 +01:00
Vanfanel
046b48f90d SDL: Add OSystem::kFeatureVSync to SDL surface and OpenGL graphics. 2021-10-23 20:53:22 +01:00
Vanfanel
3a59c28179 SDL: Generalize VSYNC option so it works for 2D games too, in both SDL surface and opengl graphic modes. 2021-10-23 20:53:22 +01:00
Orgad Shaneh
db7699228c MISC: Fix printf long/int64 type mismatches
Cast to [unsigned] long.
2021-10-23 02:48:27 +03:00
Evan Miller
a9a59ba37e SDL: Fix exception on macOS 10.4/10.5
The getBytes:...:remainingRange: API was introduced in 10.6.
2021-10-14 21:00:04 +01:00
sluicebox
f3b04519a6 CLOUD: Fix crash on HTTP request with unparsed path
Occurred during an nmap scan. Fixes bug #12997
2021-10-13 19:18:43 -05:00
Evan Miller
b8132baa94 SDL: Fix building/deployment on macOS <10.7
NSWindow.backingScaleFactor needs OS support, so a run-time test is
necessary in addition to the OS X SDK guard.
2021-10-11 19:40:37 +01:00
Thierry Crozat
594a81f93c OPENGLSDL: Fix restoring window size when exiting fullscreen
When entering fullscreen it was storing the default window size
in the config, which was overwriting the current window size. As
a result when exiting window size, instead of restoring to the
previous window size it was restoring to the default window size.
2021-10-11 02:59:01 +03:00
Thierry Crozat
45a803c71c OPENGLSDL: Fix always restoring window to maximized size when exiting fullscreen
When loadVideoMode gets called to exit fullscreen, the window is
still fullscreen, which means that the SDL_WINDOW_MAXIMIZED is set
(at least on macOS). As a result the window was resized to the
stored maximized window size instead of the size it had before
entering fullscreen.
2021-10-11 02:59:01 +03:00
Thierry Crozat
aac0f40d2c BACKENDS: Add overloadable removeFile in DefaultSaveFileManager
This allows using the DefaultSaveFileManager on system where
remove() does not exist. See bug #12975.
2021-10-10 11:39:47 +03:00
BeWorld
db3f152ca6
MorphOS: disabled detectFramebufferSupport. added MorphOS doc 2021-10-07 16:02:29 +02:00
Thierry Crozat
c8d8b230be N64: Fix setting graphics modes 2021-10-02 23:57:29 +01:00
rsn8887
aa42de666c BACKENDS: PSP: Fix screen scaling 2021-10-02 17:45:26 -05:00
Thierry Crozat
1962e543fd JANITORIAL: Rename variable to follow code formatting conventions 2021-10-02 21:50:28 +01:00
Thierry Crozat
8d972b338d OPENGLSDL: Properly check for fullscreen state
The OpenGLSDLGraphicsManager was changed in bb15133a0a to use
SDL_WINDOW_FULLSCREEN_DESKTOP instead of SDL_WINDOW_FULLSCREEN.
But getFeatureState(kFeatureFullscreenMode) was still checking
the SDL_WINDOW_FULLSCREEN flag. This worked because in current
SDL2 versions SDL_WINDOW_FULLSCREEN_DESKTOP is defined as
SDL_WINDOW_FULLSCREEN | 0x00001000, but this is not documented
and could change in future SDL versions.
2021-10-02 18:59:44 +01:00
Eugene Sandulenko
9a4f0b7c66
RELEASE: This is 2.6.0git now 2021-10-01 16:04:48 +03:00
Cameron Cawley
6dfa49ba48 RISCOS: More packaging improvements 2021-09-30 23:01:53 +01:00
Cameron Cawley
003c56fc19 RISCOS: Update packaging to accomodate split builds 2021-09-30 13:28:00 +01:00
Thierry Crozat
8ef63e0e0d IOS7: Add support for upside down portrait orientation 2021-09-29 20:30:16 +01:00
Thierry Crozat
68331af461 IOS7: Fix handling of arrow keys on iOS 15 2021-09-29 20:30:15 +01:00
Filippos Karapetis
8f49df6aca SDL: Fix full screen toggling for 3D games
The previous SdlGraphics3dManager::toggleFullScreen() was not using
beginGFXTransaction / endGFXTransaction in toggleFullScreen().
Restore this logic for 3D games, as using transactions in such games
results in a black screen for 3D games when switching to full screen

A regression from d33487f64
2021-09-29 20:24:03 +02:00
Thierry Crozat
85b4b188ef IOS7: Fix rotating the device while ScummVM is innactive
This fixes bug #7137
2021-09-29 00:23:31 +01:00
Thierry Crozat
5f1e3f07ca IOS7: Fix using arrow keys from physical keyboard on iOS 15
This fixes part of bug #12942.
2021-09-29 00:05:58 +01:00
Thierry Crozat
7def254317 JANITORIAL: Fix indentation in iOS7 backend source code 2021-09-28 23:28:54 +01:00
Marcus Comstedt
3944d3a3a3 DC: Request disc swap when needed for plugin loading 2021-09-23 23:03:13 +02:00
Thierry Crozat
2435046146 IOS7: Support using Escape key on external keyboards 2021-09-23 00:12:19 +01:00
Thierry Crozat
71728d302a IOS7: Fix calling UI API on a background thread
This is a genealization of commit 0d8b9d272 that only fixed the
issue for some cases. The issue still occured when suspending the
app for example.
2021-09-22 23:26:18 +01:00
Marcus Comstedt
c68fb8561d DC: Preserve appDomain when reloading config on disc swap
This is needed to prevent essential settings like
always_run_fallback_detection_extern from being removed.
2021-09-20 23:28:58 +02:00
Scott Percival
84707ec828 EVENTRECORDER: Prevent recursive call to warpMouse 2021-09-09 19:32:02 +02:00
Scott Percival
5cbcd98963 EVENTRECORDER: Add screen update tracking
Screen update boundaries are now used as sync points.
Screenshots are now processed on a screen update boundary.

This change increments the version of the Event Recorder
file format to 2; version 1 files will still play back as
before, without synchronising to screen updates.
2021-09-09 19:32:02 +02:00
Scott Percival
16545f9cd9 LOG: Prevent Log::printTimeStamp() from creating an event
This fixes a stack overflow when EventRecorder is used and debug logging is switched on.
2021-09-09 19:32:02 +02:00
Torbjörn Andersson
8ba69ec278 SDL: Silence signed/unsigned warning 2021-09-09 07:20:04 +02:00
Thierry Crozat
b3b3684b46 SDL: Fix starting high resolution game with default scale factor 2021-09-08 21:32:42 +01:00
Cameron Cawley
c2bbccd1db AUDIO: Support using .wav files for extracted Audio CD tracks 2021-09-07 14:35:43 +03:00
Thierry Crozat
4e503fad1c Revert "BUILD: Add $(DIST_FILES_DOCS) to targets using it"
This reverts commit d1e195c298.
2021-09-04 20:01:32 +02:00
Cameron Cawley
e60b0be71a DS: Update scripts for creating split builds 2021-09-02 22:14:53 +01:00
Lothar Serra Mari
82adcbeeb0 BACKENDS: PRESENCE: Only trigger Discord RPC if enabled in configuration 2021-09-02 14:21:07 +02:00
Torbjörn Andersson
9df10525df SDL: Check if hi-res scaler is available at desired factor
Instead of falling back to the normal scaler if the new scale factor is
1, explicitly check if the desired scaler is available at the new scale
factor. Suggested by criezy, and I'm shamelessly copying his
implementation because this sort of C++ trickery is something I'm not
fluent in.

At the moment, this shouldn't make any difference. But I guess in the
future, there may be a scaler that's available at 3x and 4x, but not 2x,
or something like that.
2021-09-02 13:24:06 +02:00
Torbjörn Andersson
b5f27b5950 SDL: Set better default scaler for high-resolution games
Now that we have higher scale factors than 3, it makes sense to try and
figure out a default scaler for high-resolution games that approximate
the window size of a low resolution game.

That also means that we are not necessarily restricted to the normal
scaler, since AdvMame has both 2x and 4x versions.
2021-09-02 13:24:06 +02:00
Cameron Cawley
2e440e5d96 RISCOS: Replace the StrongHelp manual with the PDF manual 2021-08-29 16:09:32 +01:00
Thierry Crozat
36908e0fcd OSX: Prefer the manual bundled with the application
The User Manual Help menu item now opens the pdf bundled with the
application if present, and only opens the website otherwise.
The bundled documentation is preferred as:
 - This will work even with no internet access
 - This is future proof and will still work in 10 years when the
   website URL might have changed or the website may be down.
 - This ensure we get the doc that corresponds to the version of
   ScummVM being used.
2021-08-28 20:14:57 +01:00
Eugene Sandulenko
580ec65220
RELEASE: This is 2.4.0git 2021-08-28 21:01:11 +02:00
Le Philousophe
d1e195c298 BUILD: Add $(DIST_FILES_DOCS) to targets using it
This makes sure all docs are present before copying them
2021-08-28 11:27:06 +02:00
Lothar Serra Mari
d6f105e906 BACKENDS: OPENGLSDL: Only relocate the window to the center of the screen if truly necessary 2021-08-28 10:43:04 +02:00
Lothar Serra Mari
1b42675e52 BACKENDS: OPENGLSDL: Limit window positioning workaround to Win32
It looks like other platforms are not affected by this, at least I
wasn't able to reproduce the issue on Linux in any way.

Since branching off to the next release is very soon and we are running
out of time, I'm limiting this to Win32 in order to avoid unneccessary
breakage by only fixing _really_ affected platforms.
2021-08-28 10:43:04 +02:00
Lothar Serra Mari
4c7bc5effb BACKENDS: OPENGLSDL: Do not try to center window in fullscreen or maximized mode 2021-08-28 10:43:04 +02:00
Lothar Serra Mari
1b6c4f48aa BACKENDS: OPENGLSDL: Forcefully center the window to prevent off-screen rendering 2021-08-28 10:43:04 +02:00
Lothar Serra Mari
cedd57a4ac BACKENDS: OPENGLSDL: Fix wrong check for maximized windows 2021-08-28 10:43:04 +02:00
Lothar Serra Mari
3da65d47cb BACKENDS: OPENGLSDL: Prevent window resizing events in fullscreen mode 2021-08-28 10:43:04 +02:00
Lothar Serra Mari
d07c97f3cd BACKENDS: OPENGLSDL: Remember maximized window state 2021-08-28 10:43:04 +02:00
Cameron Cawley
d540054c0a DS: Remove .ARM.exidx* and .ARM.extab* sections from plugins
Thanks to @lephilousophe for helping out with this.
2021-08-27 17:45:37 +01:00
mataniko
8a91f500a7 MACOS: Open the new documentation hub from the app menu 2021-08-27 15:54:10 +02:00
Thierry Crozat
478fbbbe9b SDL: Fix the default scale factor for high resolution games
This fixes bug #12847: HQ filter broken when applied as a global setting
2021-08-26 18:32:21 +01:00
Cameron Cawley
811a80d279 DS: Fix crash on exit 2021-08-26 17:05:14 +01:00
Cameron Cawley
62f8419fdc MACOSX: Fix compilation with older SDKs 2021-08-25 13:10:20 +01:00
Cameron Cawley
c9411bcace AMIGAOS/MORPHOS: Avoid copying the entire doc directory when packaging 2021-08-25 11:55:11 +02:00
Cameron Cawley
69db8b9b33 DS: Fix compiler warning 2021-08-25 01:18:39 +01:00
Cameron Cawley
659ee35acd DS: Avoid deleting the mixer twice 2021-08-25 01:05:01 +01:00
Cameron Cawley
18b4f15eb9 ANDROID3D: Fix compilation 2021-08-24 23:51:55 +01:00
Le Philousophe
a318d14b66 DREAMCAST: Fix build by defining missing function
Function has been defined pure virtual in 8c86319923
2021-08-24 19:08:46 +02:00
Cameron Cawley
3c5d806894 3DS: Log all messages to a file 2021-08-24 01:51:59 +02:00
sluicebox
386c5659ec BASE: Purge keyboard/mouse events before running Engine
Fixes GUI events leaking into engines at startup. This caused
Phantasmagoria 1 to skip its introduction if the game was started from
the ScummVM GUI with a keyboard (Enter) but not with a mouse because
the key-down event started the engine and the key-up event remained
in the queue.

This also purges and mouse events since we happen to already have a
purgeMouseEvents() method. We may want to also clear joystick inputs,
or possibly the entire event queue, but that can be done after the
upcoming release. For now, the known bug is fixed.
2021-08-23 15:46:33 -05:00
SupSuper
c9d67e48a9 BACKENDS: Use FSNode::getName in string operations 2021-08-23 21:22:27 +01:00
SupSuper
8c86319923 BACKENDS: Use U32String for FSNode::getDisplayName 2021-08-23 21:22:27 +01:00
Orgad Shaneh
a0c818bde6 COMMON: Introduce SaveFileManager::exists
Checks if a savefile with given name exists.

Implement on all backends.
2021-08-23 13:34:35 +02:00
Orgad Shaneh
fb8f233ed7 BACKENDS: Replace virtual with override in SaveFileManager subclasses 2021-08-23 13:34:35 +02:00
Martin Gerhardy
60111294a0 BACKENDS: moved the audio cd track path assembly into one location
also added m4a audio cd support as it is supported in openStreamFile() which
is called in DefaultAudioCDManager::play()
2021-08-23 00:09:03 +03:00
Martin Gerhardy
dcaad26e86 ENGINES: keep existExtractedCDAudioFiles in sync with DefaultAudioCDManager::play()
out of sync since: f5164c9117
2021-08-23 00:09:03 +03:00
Thierry Crozat
0d8b9d272c OS7: Fix calling UI API on a background thread
This occured for example whenever showing the GMM in a game and
could cause various issues.
2021-08-22 19:45:19 +01:00
Fiodar Stryzhniou
872947f7c9 SYMBIAN: Avoid printf() usage 2021-08-21 09:08:17 +03:00
Fiodar Stryzhniou
89a052c53f SYMBIAN: Allow usage by default OSystem_SDL_Symbian::openUrl() 2021-08-21 09:08:17 +03:00
Thierry Crozat
dc7a09fdd1 SDL: Cleanup HiDPI macOS hacks
The SDL library handles HiDPI differently depending on the system.
On some systems, such as macOS, the drawable area and the SDL window
have a different size (the window is on low-dpi size) while on
other systems such as Windows they have the same size. Because of
that we sometimes need to scale sizes or coordinates between the
two, and sometimes we don't.

This was handled in two different ways. This commit change the code
to handle it consistently everywhere, and also should be more future
proof should SDL change the way it handles HiDPI in the future (as
we now query the size from SDL itself to find out if the scaling is
needed).
2021-08-20 22:10:26 +02:00
Christian Kündig
8af8ac2e08 OPENGL EMSCRIPTEN: clean up ifdefs, fix opengl in main menu, remove 10ms delay in GRIM main loop 2021-08-20 21:13:49 +02:00
Christian Kündig
b7a2e22b0a DISTS: New Emscripten/WebAssembly dists target
This is an initial version of the emscripten build/dist target.
Many things are still missing, see dists/emscripten/README.md for
a detailed summary of what this provides and still misses
2021-08-20 21:13:49 +02:00
Fiodar Stryzhniou
a6b97165ed SYMBIAN: Fix command order 2021-08-20 19:45:01 +02:00
Fiodar Stryzhniou
b74448f679 SYMBIAN: Avoid compiling ARM assembly for x86 emulator 2021-08-20 19:45:01 +02:00
Fiodar Stryzhniou
12aa035034 SYMBIAN: Add ARM assembly to project file from Scumm engine 2021-08-20 19:45:01 +02:00
Thierry Crozat
9449e177f4 SDL: Fix warping mouse on macOS HiDPI screens
This fixes bug #12822.
2021-08-20 00:16:03 +01:00
Thierry Crozat
feac996b50 SDL: Move code to handle cursor coordinate HiDPI scale to SdlWindow
SDL handles HiDPI scaling differently depending on the system. On
macOS for example the SDL window size and SDL drawable area have a
different size (factor 2 usually) while on Windows they are the
same. When HiDPI is disabled (for the SDL Surface mode for example)
they are always the same.

We need to appl this scaling when converting cursor position between
the drawable area and the SDL window.
2021-08-20 00:12:51 +01:00
SupSuper
dafb8fe3d5 SDL: Return exact scales from getDpiScalingFactor 2021-08-19 21:55:14 +01:00
Fiodar Stryzhniou
861c0f4cf9 SYMBIAN: Fix counless warnings from GCC 11.2 2021-08-19 00:47:49 +03:00
Fiodar Stryzhniou
a88a754de6 SYMBIAN: Fix generation package(PKG) file 2021-08-18 15:34:33 +03:00
Fiodar Stryzhniou
ed5a7bcc0e SYMBIAN: Add missed library 2021-08-18 15:34:09 +03:00
Fiodar Stryzhniou
f45e3184ba SYMBIAN: Fix wrong command order 2021-08-18 14:09:16 +03:00
Eugene Sandulenko
df1341ae6a
BACKENDS: Display OSD message on saved screenshots 2021-08-16 14:19:07 +02:00
Thierry Crozat
0aa68d419e JANITORIAL: Add override keyword for OSystem_MacOSX 2021-08-15 17:52:45 +01:00
Thierry Crozat
f2bc7c8874 MACOSX: Use OpenGL graphics mode by default 2021-08-15 17:52:45 +01:00
Thierry Crozat
7c9761b2da SDL: Fix switching to the <default> graphics mode
The OSystem_SDL::getDefaultGraphicsMode  was returning the
default for the current graphics manager and not the default
for the OSystem_SDL instance. So for example if the default
is SDL Surface when starting ScummVM with the gfx_mode not
set in the config file, and then the user selects the OpenGL
graphics mode, getDefaultGraphicsMode() would now return the
OpenGL mode (the default the OpenGLGraphicsManager). As a
result changing the graphics mode back to <default> and
applying the change would not switch back to Surface SDL
until you restart ScummVM or start a game.

This commit also change how the SDL backends can specify which
graphics mode to use by default. They no longer have to assume
they know the names of the graphics modes in the graphics manager.
2021-08-15 17:43:43 +01:00
athrxx
95f1b010f8 SDL: avoid assert with SDL debug builds 2021-08-15 16:18:16 +02:00
Lothar Serra Mari
900d763264 BACKENDS: OPENGLSDL: Enlarge window if stored dimensions are not sufficient 2021-08-15 13:58:48 +01:00
Lothar Serra Mari
1aaab76b44 BACKENDS: OPENGLSDL: Fix aspect ratio on auto-calculated window sizes 2021-08-15 13:58:48 +01:00
Lothar Serra Mari
51cff582b5 BACKENDS: OPENGLSDL: Disable storing and restoring window sizes for SDL1
The previous implementation was already broken, since the values were never stored in the config file
since that part was already guarded by SDL_VERSION_ATLEAST.

Since we have no way to properly determine if a window is maximized or not for
SDL1, I recommend skipping this part in the compilation.

Now, the function at least works properly for SDL2 - it was broken on _both_ versions before.
2021-08-15 13:58:48 +01:00
Lothar Serra Mari
8a8557e94d BACKENDS: OPENGLSDL: Fix logic errors in window size management 2021-08-15 13:58:48 +01:00
Thierry Crozat
6fcfdb0514 SDL: Fix handling of cursor position on Windows HiDPI 2021-08-14 19:11:11 +01:00
Cameron Cawley
c4699cb280 SDL: Move getDisplayDpiFromSdl and getDpiScalingFactor into the SdlWindow class 2021-08-14 19:09:33 +01:00
antoniou79
4c163d99ad ANDROID: Set gui-scale to Large by default 2021-08-14 19:18:54 +03:00
antoniou
2782b1265d ANDROID: Remove set default gui_scale code
This causes a crash, so it needs another approach
2021-08-14 11:22:08 +03:00