The SDL backend was getting that path at the start and storing
it in a class member so that it would persist for the session.
But now that we have a kSessionDomain in ConfMan, it is cleaner
to use that (and this will also work for non-SDL backends).
We now link with OpenGL dynamically so symbols are provided by GLAD.
If it's not supported pointer will be null.
OGLES2 should support these functions so they must be removed
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.
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.
Supported graphics modes are grouped in an merged array in which
the first part contains modes from the non-OpenGL SDL manager,
obtained by a copy dynamically allocated.
When the array was rebuilt or aimed to be destroyed, it was only
cleared (removing elements) but not freeing duplicated fields
name and description.
An additional leak came from the temporary array (srcModes)
not freed.
supportedGraphicsModes() now returns to OSystem_SDL a pointer to a deep copy of
surfacesdl's internal graphics mode array. Therefore each can free its
own copy without interfering with the other's.
When switching between the SDL and OpenGL graphics managers, trying
to restore the state could fail as the two managers do not have the
same list of supported formats, so we may not be able to transfer
the pixel format from one to the other. This then resulted in an
assert.
This fixes bug #12079
Different platforms have different levels of support of encodings and
often have slight variations. We already have tables for most encoding
with only CJK missing. Full transcoding inclusion allows us to get reliable
encoding results independently of platform. The biggest con is the need for
external tables encoding.dat.
It removes a duplicate table for korean in graphics/korfont.cpp