[Scummvm-cvs-logs] scummvm master -> 069573923991bd3d1d2b0dee3608359bdcf063de
somaen
einarjohants at gmail.com
Mon Apr 22 16:15:44 CEST 2013
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0695739239 WINTERMUTE: Use the theme-path to find scummodern.zip
Commit: 069573923991bd3d1d2b0dee3608359bdcf063de
https://github.com/scummvm/scummvm/commit/069573923991bd3d1d2b0dee3608359bdcf063de
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2013-04-22T07:14:11-07:00
Commit Message:
WINTERMUTE: Use the theme-path to find scummodern.zip
Changed paths:
engines/wintermute/base/font/base_font_truetype.cpp
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp
index 63ccfd9..2fcdebc 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -39,6 +39,7 @@
#include "graphics/fonts/ttf.h"
#include "graphics/fontman.h"
#include "common/unzip.h"
+#include "common/config-manager.h" // For Scummmodern.zip
#include <limits.h>
namespace Wintermute {
@@ -566,7 +567,19 @@ bool BaseFontTT::initFont() {
// Fallback2: Try to find ScummModern.zip, and get the font from there:
if (!_font) {
- Common::SeekableReadStream *themeFile = SearchMan.createReadStreamForMember("scummmodern.zip");
+ Common::SeekableReadStream *themeFile = nullptr;
+ if (ConfMan.hasKey("themepath")) {
+ Common::FSNode themePath(ConfMan.get("themepath"));
+ if (themePath.exists()) {
+ Common::FSNode scummModern = themePath.getChild("scummmodern.zip");
+ if (scummModern.exists()) {
+ themeFile = scummModern.createReadStream();
+ }
+ }
+ }
+ if (!themeFile) { // Fallback 2.5: Search for ScummModern.zip in SearchMan.
+ themeFile = SearchMan.createReadStreamForMember("scummmodern.zip");
+ }
if (themeFile) {
Common::Archive *themeArchive = Common::makeZipArchive(themeFile);
if (themeArchive->hasFile("FreeSans.ttf")) {
More information about the Scummvm-git-logs
mailing list