[Scummvm-git-logs] scummvm master -> 3d82c0e8b4c330ecaa0230c8eede65bad4f89be0
sev-
noreply at scummvm.org
Sun Nov 14 21:23:53 UTC 2021
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:
3d82c0e8b4 GUI: Fix loading gui-icons.dat from Windows resource
Commit: 3d82c0e8b4c330ecaa0230c8eede65bad4f89be0
https://github.com/scummvm/scummvm/commit/3d82c0e8b4c330ecaa0230c8eede65bad4f89be0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-11-14T22:23:17+01:00
Commit Message:
GUI: Fix loading gui-icons.dat from Windows resource
Changed paths:
gui/gui-manager.cpp
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index f5265a29d8..5f0ec3211d 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -25,6 +25,7 @@
#include "common/util.h"
#include "common/config-manager.h"
#include "common/algorithm.h"
+#include "common/file.h"
#include "common/rect.h"
#include "common/textconsole.h"
#include "common/translation.h"
@@ -163,7 +164,17 @@ void GuiManager::initIconsSet() {
if (!fs)
fs = new Common::FSNode(fname);
- dat = Common::makeZipArchive(*fs);
+ if (fs) {
+ dat = Common::makeZipArchive(*fs);
+ } else {
+ // We could be on Windows with gui-icons.dat file as an
+ // embedded resource. Try it.
+ Common::File *in = new Common::File;
+ in->open(fname);
+
+ if (in->isOpen())
+ dat = Common::makeZipArchive(in);
+ }
if (!dat) {
warning("GUI: Could not find '%s'", path.c_str());
More information about the Scummvm-git-logs
mailing list