From 4c1be547108d538d63470af88ca99860f9d3bd10 Mon Sep 17 00:00:00 2001 From: AGulev Date: Fri, 25 Aug 2023 12:53:58 +0200 Subject: [PATCH] fix build for different platforms --- mnu/src/mnu.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mnu/src/mnu.cpp b/mnu/src/mnu.cpp index 288791d..abe8328 100644 --- a/mnu/src/mnu.cpp +++ b/mnu/src/mnu.cpp @@ -5,6 +5,8 @@ // include the Defold SDK #include +#if defined(DM_PLATFORM_OSX) || defined(DM_PLATFORM_WINDOWS) + #ifndef __APPLE__ #define SEA_MENU_IMPLEMENTATION #endif @@ -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 + \ No newline at end of file