This commit introduces Common::CloudManager, which can be accessed from
OSystem.
The backend for this manager is Cloud::Manager (defined in
backends/cloud/manager.h). It should load all users storages from
configs and provide access to current Storage instance. For now it just
creates a new one.
Cloud::Storage (backends/cloud/storage.h) provides an API to interact
with cloud storage, for example, create new directory or sync files.
Right now it's not ready and has only two dummy methods: listDirectory()
and syncSaves().
There is Cloud::Dropbox::DropboxStorage backend
(backends/cloud/dropbox/dropboxstorage.h) for Cloud::Storage. Right now
it implements both listDirectory() and syncSaves() with starting timer
task and handling it by printing out some JSON examples.
Adding a bit of code to make ScummVM AmiUpdate aware.
Everything else will be dealt with through a (yet to finish) AmigaOS installer script and the entries in AmiUpdate's database.
I'd like to ask for hints regarding
- Code Formatting
- Optimizations
- Comments
- Obivous errors
or
- Ill-designed code.
It's not much code, but i'm sure i still messed up glorious either way
Since Mac OS X Carbon/Cocoa API isn't stable (in that it's changed multiple times over the years). Maintaining two versions of the same code (one in some foreign language with overly long names) isn't very appealing to me.
AmigaOS's Rexx interpreter seems to have problems with './' in the path to the
Rexx script. We work around this by copying it to the cwd and using it from
there.
Manual merge of PR #669 "AMIGAOS: Fix amigaos.mk to make the rexx script work
on local builds".
This is what the XDG Base Directory Specification suggests to use. We still
use the old location of '~/.scummvmrc' in case that is present.
This tackles an aspect of bug #6036 "POSIX: Use XDG dirs instead of HOME".
This makes use use the XDG Base Directory Specification for the log file path.
This tackles one part of bug #6036 "POSIX: Use XDG dirs instead of HOME".
We remove the menus added by SDL before inserting our own menus,
but the code assumed that there were two SDL generated menus. SDL2
actually adds three menus. So the new code makes no assumptions on
the number of menus so that it works with both SDL1.2 and SDL2.
Also fix an issue on OS X 10.4 and earlier that caused the app menu
to be nameless.
In SDL 2.0, intrin.h is now included in SDL_cpuinfo.h, which includes
setjmp.h. SDL_cpuinfo.h is included from SDL.h and SDL_syswm.h.
Thus, we remove the exceptions for setjmp and longjmp before these two
includes.
On AmigaOS the user can customize every icon including drawers.
This is a customized drawer icon for ScummVM with the original "S"
scaled on top of it.
This icon may change with further revisions of AmigaOS4 (if the
default icon images change).
This moves the AmigaOS4 specific packaging rules from the global
ports.mk to a port specific makefile in the AmigaOS subdirectory of
the SDL backend (used for AmigaOS).
Previously, port specific makefiles were only used for cross compiling
builds and thus had a single entry in the cross compiling section of
the configure. Since AmigaOS4 is a desktop system supporting native
build, this required a second entry for when the host system is detected
as ppc-amigaos to support native builds.
However, currently this does break packaging of cross compiled builds
for Win32, OSX and Unix when done on AmigaOS4... but this is not likely
and has limited impact. To fix this, default _port_mk lines would need
to be added to the sections of the cross compiling switch for mingw32
etc. to override the AmigaOS4 OS setting of _port_mk.
This implements count badge, progress bar, and icon overlay.
It uses the NSDockTile API which is available since OS X 10.5.
The code compiles and run on older system but without doing
anything.
The fix is the change in the MAXPATHLEN check, but have also migrated
this to Common::String to make the fix easier.
Thanks to klusark for pointing out this problem.
A call to setlocale can invalidate the string a previous setlocale call
returned. Instead of saving a pointer we copy the returned string now. This,
for example, fixes invalid memory access on my system.
See de8da01b0e for the commit introducing the
invalid memory access.
This is to fix bug #3615148 - "ALL: sscanf("%f"), atof() etc. not
portable due to Locale"
The side effect of setlocale("") is to change the active locale
from the default of "C" to the detected system locale, but this
changes the behaviour of sscanf() and several other functions
in a system dependent and non-portable way. This has caused
bugs in the ZVISION engine when running Zork Nemesis.
The solution is to restore the default "C" locale after the call
to get the language.
Thanks to criezy for working out this fix.
The former code (incorrectly) assumed that the getDefaultGraphicsMode returns
the index in the table returned by getSupportedGraphicsModes. Now the correct
ID is searched and then used.
Sadly this also requires us to extend GraphicsManager for this SDL specific
feature. However, since that's only used in the SDL backend and Tizen it
should be fine for now...
This replaces a dummy FILE definition before including the SDL headers with
simply using the toolchain's definition on Solaris. This is pretty harmless
because we only allow FILE to be used in the SDL headers by this.
Fixes bug #3614514 "#define FILE FAKE_FILE doesn't work on Solaris (w/ patch)".
Thanks to lblume for his patch!
Ports can add additional special keys.
SDL no longer carries the static tables.
Default behavior unchanged: HardwareInputSet() still gives an empty one.
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
This reimplement getSystemLanguage() for MacOS X because
setlocale() only works if the application is started from the terminal.
Instead we use CFBundleCopyPreferredLocalizationsFromArray() which
requires the translations to be listed in the bundle plist file (this had
already been committed). This fixes bug #3394080.
The bug in question is "SDL/OpenGL: Crash when switching renderer backend". To
fix it I added a stupid graphics state copying to the SDL backend, in case the
graphics manager is switched. The implementation of this is considered a pure
workaround, no one should ever do it like this in reality... I just want to
die when looking at this... Not sure why I actually committed it.
Anyway it at least makes the OpenGL backend testable for those who do not
want to fiddle with the config file directly.
This gets rid of the hacks, where SdlEventSource added events with custom type
numbers to pass SDL_VIDEOEXPOSE and SDL_VIDEORESIZE to the graphics manager.
Furthermore it get rids of the uninituitive and hard to trace way of assigning
the proper mouse coordinates to mouse related events. Formerly it passed the
real screen coordinates through the even dispatching api to the graphics
manager (at least hopefully ;-) and let that handle creating a new event with
the proper coordinates. Now instead SdlEventSource handles the proper
coordinate setup itself.
Since this is a behavior change and I can not test all the SDL based small
devices ports this commit might break compilation for them and more serve it
might also break mouse position behavior. If any of that occurs I am sorry
about it.
We bypass SDL_WM_SetIcon and setup the window icon using the embedded icon, with the default path as a fallback.
This allows us to use an antialised icon with alpha transparency (which the default included icon doesn't have) on Windows XP and later
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
This is used to provide default implementations for createConfigWriteStream
and createConfigReadStream, which can be used by most backends.
Note that backends can still override createConfigRead/WriteStream;
this could be useful if settings on some port are not stored in a
regular file (think 'Windows registry', for a hypothetical example).
Tested only on Linux, but hopefully this is sufficiently
portable to support the other POSIX platforms.
Using fork/exec instead of the simpler 'system' to avoid quoting issues
and depending on specific shell features to handle a missing xdg-open
gracefully.
This embeds all the engine data files from dists/engine-data into the
executable in case the engines using them are included statically.
Furthermore it includes the theme dist files in the executable.
Right now, a few places in the frontend code still use printf and
consorts. We mark the affected files with a FIXME for now, and
add a dedicated exception for each. To be fixed!
Also tweak FORBIDDEN_SYMBOL_REPLACEMENT to hopefully really always
enforce a compiler error