Skip to content

Commit

Permalink
fix build for different platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
AGulev committed Aug 25, 2023
1 parent aa5f6ba commit 4c1be54
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mnu/src/mnu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// include the Defold SDK
#include <dmsdk/sdk.h>

#if defined(DM_PLATFORM_OSX) || defined(DM_PLATFORM_WINDOWS)

#ifndef __APPLE__
#define SEA_MENU_IMPLEMENTATION
#endif
Expand Down Expand Up @@ -192,3 +194,19 @@ static dmExtension::Result FinalizeMnu(dmExtension::Params* params)
}

DM_DECLARE_EXTENSION(mnu, LIB_NAME, AppInitializeMnu, AppFinalizeMnu, InitializeMnu, UpdateMnu, 0, FinalizeMnu)

#else // unsupported platforms
static dmExtension::Result InitializeMnu(dmExtension::Params* params)
{
dmLogInfo("Registered extension mnu (null)");
return dmExtension::RESULT_OK;
}

static dmExtension::Result FinalizeMnu(dmExtension::Params* params)
{
return dmExtension::RESULT_OK;
}

DM_DECLARE_EXTENSION(mnu, LIB_NAME, 0, 0, InitializeMnu, 0, 0, FinalizeMnu)
#endif

0 comments on commit 4c1be54

Please sign in to comment.