mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 07:14:59 +00:00
WINTERMUTE: Use the theme-path to find scummodern.zip
This commit is contained in:
parent
1cec3beb8c
commit
0695739239
@ -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")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user