Skip to content

Commit

Permalink
[macOS] Fix crashes in Tutorial00_Basic (#222)
Browse files Browse the repository at this point in the history
The sample now loads, but there is no rendering yet
  • Loading branch information
darksylinc committed Sep 20, 2021
1 parent 28e9e32 commit 657136b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Samples/2.0/Tutorials/Tutorial00_Basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ ogre_add_executable(Sample_Tutorial00_Basic WIN32 MACOSX_BUNDLE ${SOURCE_FILES}
target_link_libraries(Sample_Tutorial00_Basic ${OGRE_LIBRARIES} ${OGRE_SAMPLES_LIBRARIES})
ogre_config_sample_lib(Sample_Tutorial00_Basic)

if( APPLE )
set_target_properties( Sample_Tutorial00_Basic PROPERTIES RESOURCE "${TUTORIAL_RESOURCES}" )
endif()
6 changes: 5 additions & 1 deletion Samples/2.0/Tutorials/Tutorial00_Basic/Tutorial00_Basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,12 @@ int main( int argc, const char *argv[] )
{
using namespace Ogre;

#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
const String pluginsFolder = macBundlePath() + "/Contents/Resources/";
#else
const String pluginsFolder = "./";
const String writeAccessFolder = "./";
#endif
const String writeAccessFolder = pluginsFolder;

#ifndef OGRE_STATIC_LIB
# if OGRE_DEBUG_MODE && \
Expand Down

0 comments on commit 657136b

Please sign in to comment.