diff --git a/project/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding_debug.dll b/project/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding_debug.dll index 3095f8e..f7d6b2e 100644 Binary files a/project/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding_debug.dll and b/project/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding_debug.dll differ diff --git a/project/addons/discord-rpc-gd/discord_coreupdater.gd b/project/addons/discord-rpc-gd/discord_coreupdater.gd index 49b80ee..2b4fe6e 100644 --- a/project/addons/discord-rpc-gd/discord_coreupdater.gd +++ b/project/addons/discord-rpc-gd/discord_coreupdater.gd @@ -1,4 +1,4 @@ extends Node func _process(delta): - DiscordActivity.coreupdate() + DiscordSDK.coreupdate() diff --git a/project/main.gd b/project/main.gd index b7c181b..a3accf0 100644 --- a/project/main.gd +++ b/project/main.gd @@ -1,7 +1,7 @@ extends Node func _ready(): - DiscordActivity.set_app_id(918857075105349632) - DiscordActivity.set_details("Made with GDExtension") - DiscordActivity.set_state("This is a test from GDScript in Godot 4") #TODO:Change functions to variables if possible - DiscordActivity.refresh() + DiscordSDK.set_app_id(918857075105349632) + DiscordSDK.set_details("Made with GDExtension") + DiscordSDK.set_state("This is a test from GDScript in Godot 4") #TODO:Change functions to variables if possible + DiscordSDK.refresh() diff --git a/src/main.h b/src/main.h index 717488c..008b7ef 100644 --- a/src/main.h +++ b/src/main.h @@ -16,6 +16,11 @@ class DiscordSDK : public Object protected: static void _bind_methods(); +private: + int app_id; + String state; + String details; + public: static DiscordSDK *get_singleton(); diff --git a/src/register_types.cpp b/src/register_types.cpp index 87e004c..08566e3 100644 --- a/src/register_types.cpp +++ b/src/register_types.cpp @@ -18,7 +18,7 @@ void gdextension_initialize(ModuleInitializationLevel p_level) ClassDB::register_class(); discordsdk = memnew(DiscordSDK); - Engine::get_singleton()->register_singleton("DiscordActivity", DiscordSDK::get_singleton()); // Cant change the class name in the cpp files for some reason + Engine::get_singleton()->register_singleton("DiscordSDK", DiscordSDK::get_singleton()); // Cant change the class name in the cpp files for some reason } }