diff --git a/examples/unrealstatus/.gitignore b/examples/unrealstatus/.gitignore index e2936de..ad5d402 100644 --- a/examples/unrealstatus/.gitignore +++ b/examples/unrealstatus/.gitignore @@ -72,4 +72,4 @@ Saved/* Intermediate/ # Cache files for the editor to use -DerivedDataCache/* \ No newline at end of file +DerivedDataCache/ diff --git a/examples/unrealstatus/Config/DefaultEngine.ini b/examples/unrealstatus/Config/DefaultEngine.ini index 797c758..84c38f3 100644 --- a/examples/unrealstatus/Config/DefaultEngine.ini +++ b/examples/unrealstatus/Config/DefaultEngine.ini @@ -6,6 +6,9 @@ AppliedTargetedHardwareClass=Desktop DefaultGraphicsPerformance=Maximum AppliedDefaultGraphicsPerformance=Maximum +[/Script/Engine.EndUserSettings] +bSendAnonymousUsageDataToEpic=False + [/Script/Engine.PhysicsSettings] DefaultGravityZ=-980.000000 DefaultTerminalVelocity=4000.000000 @@ -45,6 +48,7 @@ SyncSceneSmoothingFactor=0.000000 AsyncSceneSmoothingFactor=0.990000 InitialAverageFrameRate=0.016667 -[/Script/Engine.EndUserSettings] -bSendAnonymousUsageDataToEpic=False +[/Script/EngineSettings.GameMapsSettings] +EditorStartupMap=/Game/ShowTheUILevel.ShowTheUILevel +GameDefaultMap=/Game/ShowTheUILevel.ShowTheUILevel diff --git a/examples/unrealstatus/Content/ShowTheUILevel.umap b/examples/unrealstatus/Content/ShowTheUILevel.umap index 6be7fba..b0c51c2 100644 Binary files a/examples/unrealstatus/Content/ShowTheUILevel.umap and b/examples/unrealstatus/Content/ShowTheUILevel.umap differ diff --git a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp index 7721f7f..132fa23 100644 --- a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp +++ b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Private/discordrpc.cpp @@ -5,8 +5,6 @@ #include "ModuleManager.h" #include "IPluginManager.h" -#define DISCORD_DYNAMIC_LIB -//#include "../../../../../../../include/discord-rpc.h" #include "discord-rpc.h" #define LOCTEXT_NAMESPACE "FdiscordrpcModule" @@ -26,15 +24,11 @@ void FdiscordrpcModule::StartupModule() LibraryPath = FPaths::Combine(*BaseDir, TEXT("Source/ThirdParty/discordrpcLibrary/Mac/Release/libdiscord-rpc.dylib")); #endif // PLATFORM_WINDOWS - ExampleLibraryHandle = !LibraryPath.IsEmpty() ? FPlatformProcess::GetDllHandle(*LibraryPath) : nullptr; + DiscordLibraryHandle = !LibraryPath.IsEmpty() ? FPlatformProcess::GetDllHandle(*LibraryPath) : nullptr; - if (ExampleLibraryHandle) + if (!DiscordLibraryHandle) { - Discord_Initialize("344609418631053312", nullptr, false); - } - else - { - FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("ThirdPartyLibraryError", "Failed to load example third party library")); + FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("ThirdPartyLibraryError", "Failed to load discord-rpc library")); } } @@ -44,8 +38,8 @@ void FdiscordrpcModule::ShutdownModule() // we call this function before unloading the module. // Free the dll handle - FPlatformProcess::FreeDllHandle(ExampleLibraryHandle); - ExampleLibraryHandle = nullptr; + FPlatformProcess::FreeDllHandle(DiscordLibraryHandle); + DiscordLibraryHandle = nullptr; } #undef LOCTEXT_NAMESPACE diff --git a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h index f9a7af3..d57a91c 100644 --- a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h +++ b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/Public/discordrpc.h @@ -14,5 +14,5 @@ public: private: /** Handle to the test dll we will load */ - void* ExampleLibraryHandle; + void* DiscordLibraryHandle; }; \ No newline at end of file diff --git a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/discordrpc.Build.cs b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/discordrpc.Build.cs index 698b809..7d9af83 100644 --- a/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/discordrpc.Build.cs +++ b/examples/unrealstatus/Plugins/discordrpc/Source/discordrpc/discordrpc.Build.cs @@ -6,8 +6,9 @@ public class discordrpc : ModuleRules { public discordrpc(ReadOnlyTargetRules Target) : base(Target) { - PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; - + Definitions.Add("DISCORD_DYNAMIC_LIB=1"); + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + PublicIncludePaths.AddRange( new string[] { "discordrpc/Public" @@ -26,7 +27,7 @@ public class discordrpc : ModuleRules PublicLibraryPaths.AddRange( new string[] { - "Binaries/ThirdParty/discordrpcLibrary/Win64", + System.IO.Path.Combine(ModuleDirectory, "../../Binaries/ThirdParty/discordrpcLibrary/", Target.Platform.ToString()), } );