aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/themebrowser.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index 8809ed149a..233220fa34 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -26,6 +26,10 @@
#include "gui/theme.h"
#include "common/fs.h"
+#ifdef MACOSX
+#include "CoreFoundation/CoreFoundation.h"
+#endif
+
namespace GUI {
enum {
@@ -102,6 +106,18 @@ void ThemeBrowser::updateListing() {
addDir(_themes, DATA_PATH);
#endif
+#ifdef MACOSX
+ CFURLRef resourceUrl = CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle());
+ if (resourceUrl) {
+ char buf[256];
+ if (CFURLGetFileSystemRepresentation(resourceUrl, true, (UInt8 *)buf, 256)) {
+ Common::String resourcePath = buf;
+ addDir(_themes, resourcePath, 0);
+ }
+ CFRelease(resourceUrl);
+ }
+#endif
+
if (ConfMan.hasKey("extrapath"))
addDir(_themes, ConfMan.get("extrapath"));