[Scummvm-cvs-logs] SF.net SVN: scummvm:[43379] tools/branches/gsoc2009-gui

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Aug 14 19:13:52 CEST 2009


Revision: 43379
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43379&view=rev
Author:   fingolfin
Date:     2009-08-14 17:13:52 +0000 (Fri, 14 Aug 2009)

Log Message:
-----------
Fix loading of logo & tile bitmap on Mac OS X

Modified Paths:
--------------
    tools/branches/gsoc2009-gui/Makefile
    tools/branches/gsoc2009-gui/gui/main.cpp

Modified: tools/branches/gsoc2009-gui/Makefile
===================================================================
--- tools/branches/gsoc2009-gui/Makefile	2009-08-14 16:55:54 UTC (rev 43378)
+++ tools/branches/gsoc2009-gui/Makefile	2009-08-14 17:13:52 UTC (rev 43379)
@@ -90,6 +90,8 @@
 	mkdir -p $(bundle_name)/Contents/Resources
 	echo "APPL????" > $(bundle_name)/Contents/PkgInfo
 	cp $(srcdir)/dist/macosx/Info.plist $(bundle_name)/Contents/
+	cp $(srcdir)/gui/media/tile.gif $(bundle_name)/Contents/Resources
+	cp $(srcdir)/gui/media/logo.jpg $(bundle_name)/Contents/Resources
 	cp $(srcdir)/gui/media/scummvmtools.icns $(bundle_name)/Contents/Resources
 	cp tools_gui$(EXEEXT) $(bundle_name)/Contents/MacOS/
 

Modified: tools/branches/gsoc2009-gui/gui/main.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/main.cpp	2009-08-14 16:55:54 UTC (rev 43378)
+++ tools/branches/gsoc2009-gui/gui/main.cpp	2009-08-14 17:13:52 UTC (rev 43379)
@@ -32,6 +32,7 @@
 
 #include <wx/statline.h>
 #include <wx/aboutdlg.h>
+#include "wx/stdpaths.h"
 
 #include "main.h"
 
@@ -396,8 +397,13 @@
 		wxImage::AddHandler(new wxGIFHandler);
 
 	// Load image files
+#ifdef __WXMAC__
+	_logo.LoadFile(wxStandardPaths::Get().GetResourcesDir() + wxT("/logo.jpg"), wxBITMAP_TYPE_JPEG);
+	_tile.LoadFile(wxStandardPaths::Get().GetResourcesDir() + wxT("/tile.gif"), wxBITMAP_TYPE_GIF);
+#else
 	_logo.LoadFile(wxT("media/logo.jpg"), wxBITMAP_TYPE_JPEG);
 	_tile.LoadFile(wxT("media/tile.gif"), wxBITMAP_TYPE_GIF);
+#endif
 
 	// Load font
 	_font = wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list