More plugin
This commit is contained in:
parent
70cd486e13
commit
ff24776107
6 changed files with 17 additions and 18 deletions
2
examples/unrealstatus/.gitignore
vendored
2
examples/unrealstatus/.gitignore
vendored
|
@ -72,4 +72,4 @@ Saved/*
|
||||||
Intermediate/
|
Intermediate/
|
||||||
|
|
||||||
# Cache files for the editor to use
|
# Cache files for the editor to use
|
||||||
DerivedDataCache/*
|
DerivedDataCache/
|
||||||
|
|
|
@ -6,6 +6,9 @@ AppliedTargetedHardwareClass=Desktop
|
||||||
DefaultGraphicsPerformance=Maximum
|
DefaultGraphicsPerformance=Maximum
|
||||||
AppliedDefaultGraphicsPerformance=Maximum
|
AppliedDefaultGraphicsPerformance=Maximum
|
||||||
|
|
||||||
|
[/Script/Engine.EndUserSettings]
|
||||||
|
bSendAnonymousUsageDataToEpic=False
|
||||||
|
|
||||||
[/Script/Engine.PhysicsSettings]
|
[/Script/Engine.PhysicsSettings]
|
||||||
DefaultGravityZ=-980.000000
|
DefaultGravityZ=-980.000000
|
||||||
DefaultTerminalVelocity=4000.000000
|
DefaultTerminalVelocity=4000.000000
|
||||||
|
@ -45,6 +48,7 @@ SyncSceneSmoothingFactor=0.000000
|
||||||
AsyncSceneSmoothingFactor=0.990000
|
AsyncSceneSmoothingFactor=0.990000
|
||||||
InitialAverageFrameRate=0.016667
|
InitialAverageFrameRate=0.016667
|
||||||
|
|
||||||
[/Script/Engine.EndUserSettings]
|
[/Script/EngineSettings.GameMapsSettings]
|
||||||
bSendAnonymousUsageDataToEpic=False
|
EditorStartupMap=/Game/ShowTheUILevel.ShowTheUILevel
|
||||||
|
GameDefaultMap=/Game/ShowTheUILevel.ShowTheUILevel
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -5,8 +5,6 @@
|
||||||
#include "ModuleManager.h"
|
#include "ModuleManager.h"
|
||||||
#include "IPluginManager.h"
|
#include "IPluginManager.h"
|
||||||
|
|
||||||
#define DISCORD_DYNAMIC_LIB
|
|
||||||
//#include "../../../../../../../include/discord-rpc.h"
|
|
||||||
#include "discord-rpc.h"
|
#include "discord-rpc.h"
|
||||||
|
|
||||||
#define LOCTEXT_NAMESPACE "FdiscordrpcModule"
|
#define LOCTEXT_NAMESPACE "FdiscordrpcModule"
|
||||||
|
@ -26,15 +24,11 @@ void FdiscordrpcModule::StartupModule()
|
||||||
LibraryPath = FPaths::Combine(*BaseDir, TEXT("Source/ThirdParty/discordrpcLibrary/Mac/Release/libdiscord-rpc.dylib"));
|
LibraryPath = FPaths::Combine(*BaseDir, TEXT("Source/ThirdParty/discordrpcLibrary/Mac/Release/libdiscord-rpc.dylib"));
|
||||||
#endif // PLATFORM_WINDOWS
|
#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);
|
FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("ThirdPartyLibraryError", "Failed to load discord-rpc library"));
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FMessageDialog::Open(EAppMsgType::Ok, LOCTEXT("ThirdPartyLibraryError", "Failed to load example third party library"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,8 +38,8 @@ void FdiscordrpcModule::ShutdownModule()
|
||||||
// we call this function before unloading the module.
|
// we call this function before unloading the module.
|
||||||
|
|
||||||
// Free the dll handle
|
// Free the dll handle
|
||||||
FPlatformProcess::FreeDllHandle(ExampleLibraryHandle);
|
FPlatformProcess::FreeDllHandle(DiscordLibraryHandle);
|
||||||
ExampleLibraryHandle = nullptr;
|
DiscordLibraryHandle = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef LOCTEXT_NAMESPACE
|
#undef LOCTEXT_NAMESPACE
|
||||||
|
|
|
@ -14,5 +14,5 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Handle to the test dll we will load */
|
/** Handle to the test dll we will load */
|
||||||
void* ExampleLibraryHandle;
|
void* DiscordLibraryHandle;
|
||||||
};
|
};
|
|
@ -6,8 +6,9 @@ public class discordrpc : ModuleRules
|
||||||
{
|
{
|
||||||
public discordrpc(ReadOnlyTargetRules Target) : base(Target)
|
public discordrpc(ReadOnlyTargetRules Target) : base(Target)
|
||||||
{
|
{
|
||||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
Definitions.Add("DISCORD_DYNAMIC_LIB=1");
|
||||||
|
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||||
|
|
||||||
PublicIncludePaths.AddRange(
|
PublicIncludePaths.AddRange(
|
||||||
new string[] {
|
new string[] {
|
||||||
"discordrpc/Public"
|
"discordrpc/Public"
|
||||||
|
@ -26,7 +27,7 @@ public class discordrpc : ModuleRules
|
||||||
|
|
||||||
PublicLibraryPaths.AddRange(
|
PublicLibraryPaths.AddRange(
|
||||||
new string[] {
|
new string[] {
|
||||||
"Binaries/ThirdParty/discordrpcLibrary/Win64",
|
System.IO.Path.Combine(ModuleDirectory, "../../Binaries/ThirdParty/discordrpcLibrary/", Target.Platform.ToString()),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue