[Scummvm-git-logs] scummvm master -> 5201b5d5dd7cd536c67ef72b911c3bb36841c7bb
criezy
criezy at scummvm.org
Sun Aug 15 17:10:00 UTC 2021
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7c9761b2da SDL: Fix switching to the <default> graphics mode
f2bc7c8874 MACOSX: Use OpenGL graphics mode by default
0aa68d419e JANITORIAL: Add override keyword for OSystem_MacOSX
5201b5d5dd NEWS: Mention macOS changes and adding TTS support to some games
Commit: 7c9761b2da731a024ce6aac47d321905aade1dee
https://github.com/scummvm/scummvm/commit/7c9761b2da731a024ce6aac47d321905aade1dee
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-08-15T17:43:43+01:00
Commit Message:
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.
Changed paths:
backends/platform/sdl/sdl.cpp
backends/platform/sdl/sdl.h
backends/platform/sdl/win32/win32.cpp
backends/platform/sdl/win32/win32.h
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index c9349dfca4..eb3b6302d1 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -249,9 +249,17 @@ void OSystem_SDL::initBackend() {
// subclass does not want any switching of graphics managers anyway.
setupGraphicsModes();
- if (!ConfMan.get("gfx_mode").empty()) {
+ Common::String gfxMode(ConfMan.get("gfx_mode"));
+ // "normal" and "default" are a special case for the default graphics mode.
+ // See OSystem::setGraphicsMode(const char *name) implementation.
+ if (gfxMode.empty() || !gfxMode.compareToIgnoreCase("normal") || !gfxMode.compareToIgnoreCase("default")) {
+ // If the default GraphicsManager is OpenGL, create the OpenGL graphics manager
+ if (getDefaultGraphicsManager() == GraphicsManagerOpenGL) {
+ _graphicsManager = new OpenGLSdlGraphicsManager(_eventSource, _window);
+ _graphicsMode = _defaultGLMode;
+ }
+ } else {
// If the gfx_mode is from OpenGL, create the OpenGL graphics manager
- Common::String gfxMode(ConfMan.get("gfx_mode"));
for (uint i = _firstGLMode; i < _graphicsModeIds.size(); ++i) {
if (!scumm_stricmp(_graphicsModes[i].name, gfxMode.c_str())) {
_graphicsManager = new OpenGLSdlGraphicsManager(_eventSource, _window);
@@ -732,8 +740,8 @@ int OSystem_SDL::getDefaultGraphicsMode() const {
if (_graphicsModes.empty()) {
return _graphicsManager->getDefaultGraphicsMode();
} else {
- // Return the default graphics mode from the current graphics manager
- if (_graphicsMode < _firstGLMode)
+ // Return the default graphics mode
+ if (getDefaultGraphicsManager() == GraphicsManagerSDL)
return _defaultSDLMode;
else
return _defaultGLMode;
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index 2a3cca9c2d..4248bac1ee 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -174,6 +174,8 @@ protected:
*/
void clearGraphicsModes();
+ enum GraphicsManagerType { GraphicsManagerSDL, GraphicsManagerOpenGL };
+ virtual GraphicsManagerType getDefaultGraphicsManager() const { return GraphicsManagerSDL; }
virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const override;
virtual int getDefaultGraphicsMode() const override;
virtual bool setGraphicsMode(int mode, uint flags) override;
diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp
index 91676914df..31db3c2ee1 100644
--- a/backends/platform/sdl/win32/win32.cpp
+++ b/backends/platform/sdl/win32/win32.cpp
@@ -125,14 +125,15 @@ void OSystem_Win32::initBackend() {
_textToSpeechManager = new WindowsTextToSpeechManager();
#endif
-#ifdef USE_OPENGL
- ConfMan.registerDefault("gfx_mode", "opengl");
-#endif
-
// Invoke parent implementation of this method
OSystem_SDL::initBackend();
}
+#ifdef USE_OPENGL
+OSystem_SDL::GraphicsManagerType OSystem_Win32::getDefaultGraphicsManager() const {
+ return GraphicsManagerOpenGL;
+}
+#endif
bool OSystem_Win32::hasFeature(Feature f) {
if (f == kFeatureDisplayLogFile || f == kFeatureOpenUrl)
diff --git a/backends/platform/sdl/win32/win32.h b/backends/platform/sdl/win32/win32.h
index 00fe53b9ff..126267c385 100644
--- a/backends/platform/sdl/win32/win32.h
+++ b/backends/platform/sdl/win32/win32.h
@@ -31,6 +31,10 @@ public:
virtual void init() override;
virtual void initBackend() override;
+#ifdef USE_OPENGL
+ virtual GraphicsManagerType getDefaultGraphicsManager() const override;
+#endif
+
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0) override;
virtual bool hasFeature(Feature f) override;
Commit: f2bc7c88748a6e7eebc44da1ee43d2b102f8efd8
https://github.com/scummvm/scummvm/commit/f2bc7c88748a6e7eebc44da1ee43d2b102f8efd8
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-08-15T17:52:45+01:00
Commit Message:
MACOSX: Use OpenGL graphics mode by default
Changed paths:
backends/platform/sdl/macosx/macosx.cpp
backends/platform/sdl/macosx/macosx.h
diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp
index 483ba4570d..52945c34cf 100644
--- a/backends/platform/sdl/macosx/macosx.cpp
+++ b/backends/platform/sdl/macosx/macosx.cpp
@@ -113,6 +113,12 @@ void OSystem_MacOSX::initBackend() {
OSystem_POSIX::initBackend();
}
+#ifdef USE_OPENGL
+OSystem_SDL::GraphicsManagerType OSystem_MacOSX::getDefaultGraphicsManager() const {
+ return GraphicsManagerOpenGL;
+}
+#endif
+
void OSystem_MacOSX::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
// Invoke parent implementation of this method
OSystem_POSIX::addSysArchivesToSearchSet(s, priority);
diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h
index 7a9de4b12b..b4ca94aaf2 100644
--- a/backends/platform/sdl/macosx/macosx.h
+++ b/backends/platform/sdl/macosx/macosx.h
@@ -45,6 +45,10 @@ public:
virtual void initBackend();
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
+#ifdef USE_OPENGL
+ virtual GraphicsManagerType getDefaultGraphicsManager() const;
+#endif
+
//Screenshots
virtual Common::String getScreenshotsPath();
Commit: 0aa68d419ee673549fc5793518f8896eb1d1e480
https://github.com/scummvm/scummvm/commit/0aa68d419ee673549fc5793518f8896eb1d1e480
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-08-15T17:52:45+01:00
Commit Message:
JANITORIAL: Add override keyword for OSystem_MacOSX
Changed paths:
backends/platform/sdl/macosx/macosx.h
diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h
index b4ca94aaf2..ce3c9acbe4 100644
--- a/backends/platform/sdl/macosx/macosx.h
+++ b/backends/platform/sdl/macosx/macosx.h
@@ -29,36 +29,36 @@ class OSystem_MacOSX : public OSystem_POSIX {
public:
~OSystem_MacOSX();
- virtual bool hasFeature(Feature f);
+ virtual bool hasFeature(Feature f) override;
- virtual bool displayLogFile();
+ virtual bool displayLogFile() override;
- virtual bool hasTextInClipboard();
- virtual Common::U32String getTextFromClipboard();
- virtual bool setTextInClipboard(const Common::U32String &text);
+ virtual bool hasTextInClipboard() override;
+ virtual Common::U32String getTextFromClipboard() override;
+ virtual bool setTextInClipboard(const Common::U32String &text) override;
- virtual bool openUrl(const Common::String &url);
+ virtual bool openUrl(const Common::String &url) override;
- virtual Common::String getSystemLanguage() const;
+ virtual Common::String getSystemLanguage() const override;
- virtual void init();
- virtual void initBackend();
- virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
+ virtual void init() override;
+ virtual void initBackend() override;
+ virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0) override;
#ifdef USE_OPENGL
- virtual GraphicsManagerType getDefaultGraphicsManager() const;
+ virtual GraphicsManagerType getDefaultGraphicsManager() const override;
#endif
//Screenshots
- virtual Common::String getScreenshotsPath();
+ virtual Common::String getScreenshotsPath() override;
protected:
- virtual Common::String getDefaultConfigFileName();
- virtual Common::String getDefaultLogFileName();
+ virtual Common::String getDefaultConfigFileName() override;
+ virtual Common::String getDefaultLogFileName() override;
// Override createAudioCDManager() to get our Mac-specific
// version.
- virtual AudioCDManager *createAudioCDManager();
+ virtual AudioCDManager *createAudioCDManager() override;
};
#endif
Commit: 5201b5d5dd7cd536c67ef72b911c3bb36841c7bb
https://github.com/scummvm/scummvm/commit/5201b5d5dd7cd536c67ef72b911c3bb36841c7bb
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-08-15T18:09:05+01:00
Commit Message:
NEWS: Mention macOS changes and adding TTS support to some games
Changed paths:
NEWS.md
diff --git a/NEWS.md b/NEWS.md
index 6bd8426f1d..3ad94f079a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -38,6 +38,8 @@ For a more comprehensive changelog of the latest experimental code, see:
- Added HiDPI support to the ScummVM GUI.
- Added command line option --window-size for specifying ScummVM window size,
applicable only to the OpenGL renderer.
+ - Fixed switching to the default graphics mode. This was sometimes not applied
+ until restarting ScummVM or starting a game.
AGI:
- Added support for Russian versions. Input now works.
@@ -45,6 +47,12 @@ For a more comprehensive changelog of the latest experimental code, see:
AGOS:
- Added support for the Japanese PC-98 version of Elvira 1.
+ CGE:
+ - Added option to use Text To Speech for Soltys.
+
+ CGE:
+ - Added option to use Text To Speech for Sfinx.
+
Dreamweb:
- Rendering fixes for Russian fan translation.
@@ -60,6 +68,7 @@ For a more comprehensive changelog of the latest experimental code, see:
Griffon:
- Fixed Return to Launcher from The Griffon Legend.
+ - Added option to use Text To Speech in The Griffon Legend
Grim:
- Added support for Brazillian Portuguese Grim Fandango.
@@ -147,7 +156,7 @@ For a more comprehensive changelog of the latest experimental code, see:
- Improved Digital iMUSE accuracy for Full Throttle and The Curse of Monkey Island. These improvements also fix
several audio related bugs for both games.
- Fixed a very old regression in the walk code for Full Throttle which softlocked the game.
- - Improved the accuracy of the walk code for The Dig and The Curse of Monkey Island.
+ - Improved the accuracy of the walk code for The Dig and The Curse of Monkey Island.
- Fixed a bug in The Curse of Monkey Island which prevented, during the cannon minigame in Part 1, the destruction
of one of the three destroyable turrets in the fort.
- Added animated cigar smoke to the close-up of captain Smirk in the CD
@@ -196,6 +205,7 @@ For a more comprehensive changelog of the latest experimental code, see:
macOS port:
- Add support for Dark Mode.
+ - Use OpenGL renderer by default, providing better support for HiDPI displays.
MorphOS port:
- Added native system file browser feature.
More information about the Scummvm-git-logs
mailing list