The theme browser will now search through the bundle resource directory on OS X, fixing bug [ 1592294 ] MACOSX: Cannot Switch Back to Modern Theme
svn-id: r24658
This commit is contained in:
parent
a7950182f5
commit
ff14e19552
1 changed files with 16 additions and 0 deletions
|
@ -26,6 +26,10 @@
|
||||||
#include "gui/theme.h"
|
#include "gui/theme.h"
|
||||||
#include "common/fs.h"
|
#include "common/fs.h"
|
||||||
|
|
||||||
|
#ifdef MACOSX
|
||||||
|
#include "CoreFoundation/CoreFoundation.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -102,6 +106,18 @@ void ThemeBrowser::updateListing() {
|
||||||
addDir(_themes, DATA_PATH);
|
addDir(_themes, DATA_PATH);
|
||||||
#endif
|
#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"))
|
if (ConfMan.hasKey("extrapath"))
|
||||||
addDir(_themes, ConfMan.get("extrapath"));
|
addDir(_themes, ConfMan.get("extrapath"));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue