diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/ConsoleApplication/ConsoleApplication.cpp b/lib/NativeCode/DynamicLibraryLoaderHelper/ConsoleApplication/ConsoleApplication.cpp index a69ebbe50..f5f1bf9fe 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/ConsoleApplication/ConsoleApplication.cpp +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/ConsoleApplication/ConsoleApplication.cpp @@ -22,12 +22,12 @@ #include -#include "include/config.h" +#include "include/config_legacy.h" int main() { - pew::eos::config::EOSConfig eos_config; - if(try_get_eos_config(eos_config)) + pew::eos::config_legacy::EOSConfig eos_config; + if(pew::eos::config_legacy::try_get_eos_config(eos_config)) { std::cout << "EOSConfig was read successfully."; } diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/Directory.Build.props b/lib/NativeCode/DynamicLibraryLoaderHelper/Directory.Build.props index f77726086..c604b03ec 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/Directory.Build.props +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/Directory.Build.props @@ -1,8 +1,25 @@ - + + x86 + x64 + x86 + x64 + + $(SolutionDir.Replace('\', '/')) $(SolutionDirForwardSlashes)../../../Assets/StreamingAssets/ - $(SolutionDirForwardSlashes)../../../Assets/Plugins/Windows/$(Platform)/ \ No newline at end of file diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/DynamicLibraryLoaderHelper/DynamicLibraryLoaderHelper.vcxproj b/lib/NativeCode/DynamicLibraryLoaderHelper/DynamicLibraryLoaderHelper/DynamicLibraryLoaderHelper.vcxproj index 8004becce..eafe0b68c 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/DynamicLibraryLoaderHelper/DynamicLibraryLoaderHelper.vcxproj +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/DynamicLibraryLoaderHelper/DynamicLibraryLoaderHelper.vcxproj @@ -92,8 +92,10 @@ true - copy $(SolutionDir)$(ProjectName)-$(Platform).dll.meta $(OutputUnityAssetsDirectory) - xcopy "$(TargetDir)*" "$(OutputUnityAssetsDirectory)" /E /I /Y + + copy $(SolutionDir)$(ProjectName)-$(NormalizedPlatform).dll.meta $(OutputUnityAssetsDirectory) /Y + + copy "$(TargetDir)$(ProjectName)-$(NormalizedPlatform).dll" "$(OutputUnityAssetsDirectory)" /Y diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/ConfigPaths.props b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/ConfigPaths.props index 6f05e443a..03703bcb3 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/ConfigPaths.props +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/ConfigPaths.props @@ -19,4 +19,12 @@ EOSOVH-Win32-Shipping.dll steam_api.dll + + + + $(SolutionDir)..\..\..\Assets\Plugins\Windows\$(NormalizedPlatform)\ + diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/NativeRender.vcxproj b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/NativeRender.vcxproj index b789c4a86..5c1fef38c 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/NativeRender.vcxproj +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/NativeRender.vcxproj @@ -78,7 +78,7 @@ Disabled - OVERLAY_DLL_NAME="$(OverlayDllName)";STEAM_API_DLL="$(SteamApiDll)";SDK_DLL_NAME="$(SdkDllName)";CONFIG_DIRECTORY="$(ConfigDirectory)";_DEBUG;NATIVERENDER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + PEW_EOS_EXPORT;OVERLAY_DLL_NAME="$(OverlayDllName)";STEAM_API_DLL="$(SteamApiDll)";SDK_DLL_NAME="$(SdkDllName)";CONFIG_DIRECTORY="$(ConfigDirectory)";_DEBUG;NATIVERENDER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) @@ -86,7 +86,7 @@ MaxSpeed true true - OVERLAY_DLL_NAME="$(OverlayDllName)";STEAM_API_DLL="$(SteamApiDll)";SDK_DLL_NAME="$(SdkDllName)";CONFIG_DIRECTORY="$(ConfigDirectory)";NDEBUG;NATIVERENDER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + PEW_EOS_EXPORT;OVERLAY_DLL_NAME="$(OverlayDllName)";STEAM_API_DLL="$(SteamApiDll)";SDK_DLL_NAME="$(SdkDllName)";CONFIG_DIRECTORY="$(ConfigDirectory)";NDEBUG;NATIVERENDER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) MultiThreaded @@ -94,13 +94,15 @@ true - copy $(SolutionDir)$(ProjectName)-$(Platform).dll.meta $(OutputUnityAssetsDirectory) - xcopy "$(TargetDir)*" "$(OutputUnityAssetsDirectory)" /E /I /Y + + copy $(SolutionDir)$(ProjectName)-$(NormalizedPlatform).dll.meta $(OutputUnityAssetsDirectory) /Y + + copy "$(TargetDir)$(ProjectName)-$(NormalizedPlatform).dll" "$(OutputUnityAssetsDirectory)" /Y - + @@ -108,6 +110,7 @@ + @@ -115,7 +118,7 @@ Create - + diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/NativeRender.vcxproj.filters b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/NativeRender.vcxproj.filters index 26f00911d..aa75b22e0 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/NativeRender.vcxproj.filters +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/NativeRender.vcxproj.filters @@ -16,7 +16,7 @@ - + Header Files @@ -43,10 +43,13 @@ Header Files + + Header Files + - + Source Files diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/PEW_EOS_Defines.h b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/PEW_EOS_Defines.h new file mode 100644 index 000000000..b3e64932c --- /dev/null +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/PEW_EOS_Defines.h @@ -0,0 +1,57 @@ +#ifndef PEW_EOS_DEFINES_H +#define PEW_EOS_DEFINES_H + +/* + * Copyright (c) 2021 PlayEveryWare + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#pragma once + +// Define PEW_EOS_EXPORT for exporting/importing symbols +#ifdef _WIN32 +// PEW_EOS_EXPORT is defined *only* in the pre-processing scripting directives +// for GfxPluginNativeRender's build process. When PEW_EOS_EXPORT is defined, +// using the PEW_EOS_API macro in class or struct definitions will affect the +// export of those objects. However, when other projects reference any of the +// files within this project - the PEW_EOS_EXPORT define will not be defined, +// and (as is appropriate for the context in which another project is +// referencing this one) the macro will specify that the struct or class should +// be *imported*, not *exported*. +// This is standard practice for C++ DLL projects. +#ifdef PEW_EOS_EXPORT +// Specify export +#define PEW_EOS_API __declspec(dllexport) +#else +// Specify import +#define PEW_EOS_API __declspec(dllimport) +#endif +#else +#define PEW_EOS_API // Empty for non-Windows platforms +#endif + +/** + * \brief Use this macro on the signature of a method that is to be exposed to + * callers external to the dll. Used exclusively for static methods. + * \param return_value Syntax to affect the exposure of the method to callers + * external to the DLL. + */ +#define PEW_EOS_API_FUNC(return_value) extern "C" PEW_EOS_API return_value __stdcall + +#endif diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/config.h b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/config_legacy.h similarity index 99% rename from lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/config.h rename to lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/config_legacy.h index 2defbb8b5..ef4a9f609 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/config.h +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/config_legacy.h @@ -43,7 +43,7 @@ struct json_value_s; #define CONFIG_API __declspec(dllimport) #endif -namespace pew::eos::config +namespace pew::eos::config_legacy { /** * \brief diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/eos_helpers.h b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/eos_helpers.h index 162e945ce..df01d11be 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/eos_helpers.h +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/eos_helpers.h @@ -23,6 +23,7 @@ */ #pragma once +#include "PEW_EOS_Defines.h" namespace std { @@ -34,7 +35,7 @@ namespace std namespace pew::eos { - namespace config + namespace config_legacy { struct EOSConfig; } @@ -46,7 +47,7 @@ namespace pew::eos * * @return A pointer to the EOS platform interface handle. */ - DLL_EXPORT(void*) EOS_GetPlatformInterface(); + PEW_EOS_API_FUNC(void*) EOS_GetPlatformInterface(); /** * @brief Sets the log level for the EOS SDK based on the configuration file. @@ -75,7 +76,7 @@ namespace pew::eos * * @param eos_config The EOS configuration settings. */ - void eos_init(const config::EOSConfig eos_config); + void eos_init(const config_legacy::EOSConfig eos_config); /** * @brief Creates an EOS platform using the specified configuration. @@ -85,6 +86,6 @@ namespace pew::eos * * @param eos_config The configuration object containing EOS platform settings. */ - void eos_create(config::EOSConfig eos_config); + void eos_create(config_legacy::EOSConfig eos_config); } #endif diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/logging.h b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/logging.h index cef6d9592..37cbfa255 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/logging.h +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/include/logging.h @@ -27,7 +27,9 @@ #include #include - /** +#include "PEW_EOS_Defines.h" + +/** * \brief Forward declarations */ enum class EOS_ELogLevel; @@ -55,7 +57,7 @@ namespace pew::eos::logging * * @param log_flush_function The function to call for each log message in the buffer. */ - DLL_EXPORT(void) global_log_flush_with_function(log_flush_function_t log_flush_function); + PEW_EOS_API_FUNC(void) global_log_flush_with_function(log_flush_function_t log_flush_function); /** * @brief Converts a log level string to its corresponding EOS log level enumeration. @@ -103,7 +105,7 @@ namespace pew::eos::logging * * @param message The log message provided by the EOS SDK. */ - EXTERN_C void EOS_CALL eos_log_callback(const EOS_LogMessage* message); + PEW_EOS_API_FUNC(void) EOS_CALL eos_log_callback(const EOS_LogMessage* message); /** * @brief Opens a log file for writing. @@ -136,6 +138,19 @@ namespace pew::eos::logging */ void log_warn(const char* log_string); + /** + * @brief Logs a warning message. + * + * Records a warning message with a "WARNING" header and, if enabled, + * displays it in a dialog box. + * + * @param log_string The warning message to log. + */ + inline void log_warn(const std::string& log_string) + { + return log_warn(log_string.c_str()); + } + /** * @brief Logs an informational message. * @@ -145,6 +160,18 @@ namespace pew::eos::logging */ void log_inform(const char* log_string); + /** + * @brief Logs an informational message. + * + * Records an informational message with an "INFORM" header. + * + * @param log_string The informational message to log. + */ + inline void log_inform(const std::string& log_string) + { + return log_inform(log_string.c_str()); + } + /** * @brief Logs an error message. * @@ -153,5 +180,17 @@ namespace pew::eos::logging * @param log_string The error message to log. */ void log_error(const char* log_string); + + /** + * @brief Logs an error message. + * + * Records an error message with an "ERROR" header. + * + * @param log_string The error message to log. + */ + inline void log_error(const std::string& log_string) + { + return log_error(log_string.c_str()); + } } #endif diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/pch.h b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/pch.h index 1649b1acf..d1f1b628c 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/pch.h +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/pch.h @@ -37,6 +37,4 @@ #define RESTRICT __restrict -#define DLL_EXPORT(return_value) extern "C" __declspec(dllexport) return_value __stdcall - #endif //PCH_H diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/config.cpp b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/config_legacy.cpp similarity index 99% rename from lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/config.cpp rename to lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/config_legacy.cpp index 42a513ba6..779647708 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/config.cpp +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/config_legacy.cpp @@ -21,13 +21,13 @@ */ #include -#include "config.h" +#include "config_legacy.h" #include "eos_library_helpers.h" #include "io_helpers.h" #include "json_helpers.h" #include "logging.h" -using namespace pew::eos::config; +using namespace pew::eos::config_legacy; using namespace pew::eos::json_helpers; /** @@ -168,7 +168,7 @@ EOSConfig eos_config_from_json_value(json_value_s* config_json) return eos_config; } -namespace pew::eos::config +namespace pew::eos::config_legacy { /** * \brief Function that gets the config as a JSON string. diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/dllmain.cpp b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/dllmain.cpp index d41533285..72acb44cb 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/dllmain.cpp +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/dllmain.cpp @@ -25,11 +25,10 @@ // This is apparently needed so that the Overlay can render properly #include "pch.h" -#include #include #include -#include "config.h" +#include "config_legacy.h" #include "logging.h" #include #include @@ -41,13 +40,19 @@ using namespace pew::eos::eos_library_helpers; using FSig_ApplicationWillShutdown = void (__stdcall *)(void); FSig_ApplicationWillShutdown FuncApplicationWillShutdown = nullptr; -extern "C" -{ - void __declspec(dllexport) __stdcall UnityPluginLoad(void* unityInterfaces); - void __declspec(dllexport) __stdcall UnityPluginUnload(); -} +/** + * \brief Forward declaration for function to be called when Unity is loading + * the plugin. + */ +PEW_EOS_API_FUNC(void) UnityPluginLoad(void* unityInterfaces); + +/** + * \brief Forward declaration for function to be called when Unity is unloading + * the plugin. + */ +PEW_EOS_API_FUNC(void) __stdcall UnityPluginUnload(); -void get_cli_arguments(config::EOSConfig eos_config) +void get_cli_arguments(config_legacy::EOSConfig eos_config) { //support sandbox and deployment id override via command line arguments std::stringstream argument_stream = std::stringstream(GetCommandLineA()); @@ -117,43 +122,47 @@ void get_cli_arguments(config::EOSConfig eos_config) #if PLATFORM_32BITS #pragma comment(linker, "/export:UnityPluginLoad=_UnityPluginLoad@4") #endif -DLL_EXPORT(void) UnityPluginLoad(void*) +PEW_EOS_API_FUNC(void) UnityPluginLoad(void*) { #if _DEBUG logging::show_log_as_dialog("You may attach a debugger to the DLL"); -#endif - - config::EOSConfig eos_config; - if (!config::try_get_eos_config(eos_config)) - { - return; - } - - get_cli_arguments(eos_config); - -#if _DEBUG logging::global_log_open("gfx_log.txt"); #endif std::filesystem::path DllPath; logging::log_inform("On UnityPluginLoad"); + // Acquire pointer to EOS SDK library s_eos_sdk_lib_handle = load_library_at_path(io_helpers::get_path_relative_to_current_module(SDK_DLL_NAME)); + // If acquisition was successful. if (s_eos_sdk_lib_handle) { + // Make use of the library handle to get pointers to all the functions + // that are needed. FetchEOSFunctionPointers(); + // If the initialize function pointer is not null if (EOS_Initialize_ptr) { + // Load EOSConfig + config_legacy::EOSConfig eos_config; + if (!config_legacy::try_get_eos_config(eos_config)) + { + logging::log_error("Could not load EOSConfig."); + } + else + { + logging::log_inform("Loaded EOSConfig."); + } + logging::log_inform("start eos init"); eos_init(eos_config); - eos_set_loglevel_via_config(); - eos_create(eos_config); + // Free function pointers and library handle. s_eos_sdk_lib_handle = nullptr; EOS_Initialize_ptr = nullptr; EOS_Shutdown_ptr = nullptr; @@ -174,7 +183,7 @@ DLL_EXPORT(void) UnityPluginLoad(void*) #if PLATFORM_32BITS #pragma comment(linker, "/export:_UnityPluginUnload=_UnityPluginUnload@0") #endif -DLL_EXPORT(void) UnityPluginUnload() +PEW_EOS_API_FUNC(void) UnityPluginUnload() { if (FuncApplicationWillShutdown != nullptr) { diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/eos_helpers.cpp b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/eos_helpers.cpp index da05d3973..6a1118ac2 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/eos_helpers.cpp +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/eos_helpers.cpp @@ -24,7 +24,7 @@ #include "eos_helpers.h" #include #include -#include "config.h" +#include "config_legacy.h" #include "eos_library_helpers.h" #include "io_helpers.h" #include "json_helpers.h" @@ -66,7 +66,7 @@ void eos_call_steam_init(const std::filesystem::path& steam_dll_path); namespace pew::eos { - DLL_EXPORT(void*) EOS_GetPlatformInterface() + PEW_EOS_API_FUNC(void*) EOS_GetPlatformInterface() { return eos_library_helpers::eos_platform_handle; } @@ -78,7 +78,7 @@ namespace pew::eos return; } - auto path_to_log_config_json = config::get_path_for_eos_service_config(EOS_LOGLEVEL_CONFIG_FILENAME); + auto path_to_log_config_json = config_legacy::get_path_for_eos_service_config(EOS_LOGLEVEL_CONFIG_FILENAME); if (!exists(path_to_log_config_json)) { @@ -87,7 +87,7 @@ namespace pew::eos } json_value_s* log_config_as_json = json_helpers::read_config_json_as_json_from_path(path_to_log_config_json); - config::LogLevelConfig log_config = config::log_config_from_json_value(log_config_as_json); + config_legacy::LogLevelConfig log_config = config_legacy::log_config_from_json_value(log_config_as_json); free(log_config_as_json); // Validation to prevent out of range exception @@ -146,7 +146,7 @@ namespace pew::eos logging::log_inform(output.str().c_str()); } - void eos_init(const config::EOSConfig eos_config) + void eos_init(const config_legacy::EOSConfig eos_config) { static int reserved[2] = { 1, 1 }; EOS_InitializeOptions SDKOptions = { 0 }; @@ -243,7 +243,7 @@ namespace pew::eos return s_tempPathBuffer; } - void eos_create(config::EOSConfig eos_config) + void eos_create(config_legacy::EOSConfig eos_config) { EOS_Platform_Options platform_options = { 0 }; platform_options.ApiVersion = EOS_PLATFORM_OPTIONS_API_LATEST; @@ -288,10 +288,10 @@ namespace pew::eos #endif #if PLATFORM_WINDOWS - auto path_to_steam_config_json = config::get_path_for_eos_service_config(EOS_STEAM_CONFIG_FILENAME); + auto path_to_steam_config_json = config_legacy::get_path_for_eos_service_config(EOS_STEAM_CONFIG_FILENAME); // Defined here so that the override path lives long enough to be referenced by the create option - config::EOSSteamConfig eos_steam_config; + config_legacy::EOSSteamConfig eos_steam_config; EOS_IntegratedPlatform_Options steam_integrated_platform_option = { 0 }; EOS_IntegratedPlatform_Steam_Options steam_platform = { 0 }; EOS_HIntegratedPlatformOptionsContainer integrated_platform_options_container = nullptr; @@ -301,7 +301,7 @@ namespace pew::eos { json_value_s* eos_steam_config_as_json = nullptr; eos_steam_config_as_json = json_helpers::read_config_json_as_json_from_path(path_to_steam_config_json); - eos_steam_config = config::eos_steam_config_from_json_value(eos_steam_config_as_json); + eos_steam_config = config_legacy::eos_steam_config_from_json_value(eos_steam_config_as_json); free(eos_steam_config_as_json); if (eos_steam_config.OverrideLibraryPath.has_value()) diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/logging.cpp b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/logging.cpp index 3b0e256f4..700548f7d 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/logging.cpp +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/logging.cpp @@ -65,7 +65,7 @@ namespace pew::eos::logging } } - DLL_EXPORT(void) global_log_flush_with_function(const log_flush_function_t log_flush_function) + PEW_EOS_API_FUNC(void) global_log_flush_with_function(const log_flush_function_t log_flush_function) { if (!buffered_output.empty()) { @@ -132,7 +132,7 @@ namespace pew::eos::logging } } - EXTERN_C void EOS_CALL eos_log_callback(const EOS_LogMessage* message) + PEW_EOS_API_FUNC(void) EOS_CALL eos_log_callback(const EOS_LogMessage* message) { constexpr size_t final_timestamp_len = 32; char final_timestamp[final_timestamp_len] = { 0 }; diff --git a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/string_helpers.cpp b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/string_helpers.cpp index 329809d54..d24d6180d 100644 --- a/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/string_helpers.cpp +++ b/lib/NativeCode/DynamicLibraryLoaderHelper/NativeRender/src/string_helpers.cpp @@ -25,9 +25,9 @@ #include #include #include -#include #include #include +#include "string_helpers.h" namespace pew::eos::string_helpers {