Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Commit

Permalink
Corrected resources path search on OSX.
Browse files Browse the repository at this point in the history
  • Loading branch information
jchoude committed Oct 24, 2014
1 parent e21edaf commit cb0140a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main.cpp
Expand Up @@ -29,6 +29,10 @@

#include <exception>

#ifdef __WXMAC__
#import <CoreFoundation/CoreFoundation.h>
#endif

wxString MyApp::respath;
wxString MyApp::shaderPath;
wxString MyApp::iconsPath;
Expand Down Expand Up @@ -80,7 +84,7 @@ bool MyApp::OnInit( void )
setvbuf( stdout, NULL, _IONBF, 0 );

// TODO fix may not work.
/*#elif __WXMAC__
#elif __WXMAC__

// If we use the above code to get the same on OSX, I get a segfault somewhere
// therefore I use the OSX native code here:
Expand All @@ -100,7 +104,8 @@ bool MyApp::OnInit( void )

respath += _T( "/Contents/Resources/" );
shaderPath = respath + _T( "GLSL/" );
iconsPath = respath + _T( "icons/" );*/
iconsPath = respath + _T( "icons/" );
std::cout << std::endl << iconsPath << std::endl;

#else
if ( respath.Last() != '/' )
Expand Down

0 comments on commit cb0140a

Please sign in to comment.