Commit graph

171 commits

Author SHA1 Message Date
scemino
8afb2c1f62 BACKENDS: Add SDL3 backend + update imgui 2025-02-18 22:13:56 +01:00
Le Philousophe
95c65cd30a BACKENDS: MACOS: Cleanup nullptr use in ObjC files 2024-12-28 11:45:49 +01:00
Le Philousophe
f67f7f6354 BACKENDS: MACOS: Don't instantiate touch bar on old MacOS versions
They do not support it and it fails on invalidateIntrinsicContentSize
As the touch bar was introduced in 10.12.2, check the SDK version
against this define instead on 10.12.
2024-12-28 11:45:49 +01:00
Thierry Crozat
faf7437e78 MACOS: Change default savepath to use the Application Support folder
The default savepath on macOS used to be in the user Document folder.
However ScummVM requires special permission to access that folder,
and if the user denied it, this caused various issues.
This implement ticket #11428.

This commit also contains migration code that that old configs that
used the default path are set explicitly to use the old default path.
So the change of savepath will only be for new users.
2024-12-03 22:18:36 +00:00
Cameron Cawley
58a9aa6a2c COMMON: Deprecate U32String constructors that accept a uint32 array 2024-11-29 01:14:36 +02:00
Eugene Sandulenko
9829448a02
MACOS: Added missing License files to macOS menu 2024-05-22 21:59:00 +02:00
Eugene Sandulenko
dd6c7be8fa
SDL: Print reported DPI info for Mac and SDL in the same format 2024-01-20 20:07:57 +01:00
Le Philousophe
9bdf1233b1 BACKENDS: Migrate to Path API 2023-12-24 13:19:25 +01:00
Le Philousophe
dc7fadef28 COMMON: Make iconspath a Path object 2023-12-24 13:19:25 +01:00
Le Philousophe
e689166a2c BACKENDS: Make screenshots use the Path class 2023-12-24 13:19:25 +01:00
Le Philousophe
01ebece807 COMMON: Make getDefaultConfigFileName return a Path instead of a String 2023-12-24 13:19:25 +01:00
Le Philousophe
d9a8131ba2 COMMON: Make getDefaultLogFileName return a Path instead of a String 2023-12-24 13:19:25 +01:00
Ankush Dutt
708432c163 BACKENDS: Change return type of getDefaultDLCsPath() to Common::Path 2023-09-14 08:22:56 +02:00
Ankush Dutt
b4438f744a BACKENDS: Create dlcspath for storing DLCs 2023-09-14 08:22:56 +02:00
Cameron Cawley
3f38f6c500 SDL: Improve CPU detection with older SDL versions 2023-08-14 00:40:42 +02:00
Eugene Sandulenko
583227655a
BACKENDS: Fix incorrect enum member name 2023-08-13 10:50:56 +02:00
Wyatt Radkiewicz
139eb6ad61 MAC: Basic Altivec detection implemented 2023-08-13 00:22:10 +02:00
Donovan Watteau
d2e01fc709 MACOSX: Fix missing includes for older OSX releases 2023-04-05 15:51:27 +02:00
Thierry Crozat
4dff8f6220 IOS7: Support detecting, adding, and starting games from bundle 2023-03-24 21:11:50 +01:00
Thierry Crozat
20f7787a12 MACOSX: Only detect games in bundle on first run after version change 2023-03-24 21:11:50 +01:00
Thierry Crozat
558db07a6e MACOSX: Automatically add games from bundle Resources/games/ folder on launch 2023-03-24 21:11:50 +01:00
Thierry Crozat
f34afded5a MACOSX: Support reading scummvm-autorun file in app bundle for additional arguments 2023-03-24 21:11:50 +01:00
Thierry Crozat
3596dce56d MACOSX: Remove wrapper functions for pasteboard access
Instead the OSystem functions are now directly implemented in
Objective C.
2023-03-24 21:11:50 +01:00
Thierry Crozat
41bb796ef6 MACOSX: Use bundle name for config and log file names
The idea here is that we can package a game in a custom bundle using
the scummvm executable, and use the game name as bundle name. It will
then use its own config and log files rather than share the ones from
the standalone ScummVM app.
2023-03-24 21:11:50 +01:00
Thierry Crozat
883a68710b MACOSX: Implement autorun and initial config detection in app bundle 2023-03-24 21:11:50 +01:00
Donovan Watteau
06380fc9c3 MACOSX: Prefer openURL/openURLs over openFile on macOS 10.15+
They're the recommended APIs now, and openFile is deprecated starting
with macOS 11.0. openURLs:withApplicationAtURL (for TextEdit usage)
requires macOS 10.15+, so we need different code paths.
2022-11-29 00:11:03 +01:00
Donovan Watteau
5db6e27eca MACOSX: Fix NSUInteger definition on macOS 10.4
NSUInteger should be an `unsigned int` on 32-bit Tiger, and an
`unsigned long` on 64-bit Tiger. In practice, this wasn't really a
problem since we were always using `unsigned long` which has the same
width on 32-bit Tiger, but still it's more correct to do what the
official 10.5 SDK does.

The preprocessor defines come from Apple's documentation and from
their SDK. We can use it as-is, since we're in the backend code, and
already in an ifdef only targeting Tiger (where I've tested this
change).

Also fix a small GCC warning while there.
2022-11-09 12:27:51 +01:00
Donovan Watteau
4f5ccdbe75 MACOSX: Update some comments about macOS 10.4/10.5 behavior
Found while doing a review of our existing workarounds for those
versions, and the system features which can be used there.

Also fix indentation and some typos while there.
2022-11-05 10:09:58 +01:00
Thunderforge
3ffbb3b030 COMMON: Adding endline to macosx_wrapper.mm 2022-07-02 22:34:36 +02:00
Thunderforge
3e1d4ae9ce COMMON: Restructuring how ApplicationSupport path is calculated and putting in Icons subdirectory 2022-07-02 22:34:36 +02:00
Thunderforge
33389f062e COMMON: Adding comment for default path methods 2022-07-02 22:34:36 +02:00
Thunderforge
9afd41b195 COMMON: Renaming getDefaultIconPath() -> getDefaultIconsPath() 2022-07-02 22:34:36 +02:00
Thunderforge
fe001b35b5 COMMON: Adding default iconspath functionality
It's for macOS only right now.
2022-07-02 22:34:36 +02:00
Donovan Watteau
a933a0d261 MACOSX: Switch getResourceAppBundlePathMacOSX() to Objective-C
As suggested by criezy, we don't need to use the C-bridge from Core
Foundation now that the wrapper has been moved to an Objective-C file.
2022-05-22 23:42:45 +01:00
Donovan Watteau
4672ba71dd PLUGINS: Let macOS use its resource bundle as a valid plugin directory 2022-05-22 23:42:45 +01:00
Donovan Watteau
5118c60874 MACOSX: Pull a getResourceAppBundlePathMacOSX() wrapper from addSysArchivesToSearchSet() 2022-05-22 23:42:45 +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
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
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
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko
254db11419
BACKENDS: MACOS: Trigger GMM on the touchbar icon tap 2021-11-22 23:32:13 +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
b11c5ace90 BACKENDS: JANITORIAL: Remove 'virtual' when override is specified 2021-11-14 14:31:41 +02: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
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
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
mataniko
8a91f500a7 MACOS: Open the new documentation hub from the app menu 2021-08-27 15:54:10 +02:00
Cameron Cawley
62f8419fdc MACOSX: Fix compilation with older SDKs 2021-08-25 13:10:20 +01: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