23
									
								
								.vscode/c_cpp_properties.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										23
									
								
								.vscode/c_cpp_properties.json
									
									
									
									
										vendored
									
									
								
							| @@ -1,23 +0,0 @@ | ||||
| { | ||||
|     "configurations": [ | ||||
|         { | ||||
|             "name": "Win32", | ||||
|             "includePath": [ | ||||
|                 "${default}", | ||||
|                 "${workspaceFolder}/src/discord-game-sdk-cpp", | ||||
|                 "${workspaceFolder}" | ||||
|             ], | ||||
|             "defines": [ | ||||
|                 "_DEBUG", | ||||
|                 "UNICODE", | ||||
|                 "_UNICODE" | ||||
|             ], | ||||
|             "windowsSdkVersion": "10.0.22621.0", | ||||
|             "compilerPath": "cl.exe", | ||||
|             "cStandard": "c17", | ||||
|             "cppStandard": "c++17", | ||||
|             "intelliSenseMode": "windows-msvc-x64" | ||||
|         } | ||||
|     ], | ||||
|     "version": 4 | ||||
| } | ||||
| @@ -14,10 +14,10 @@ env = SConscript("./godot-cpp/SConstruct") | ||||
|  | ||||
| # tweak this if you want to use different folders, or more folders, to store your source code in. | ||||
|  | ||||
| env.Append(CPPPATH=["src/"]) | ||||
| env.Append(CPPPATH=["src/","src/discord-game-sdk-cpp"]) | ||||
|  | ||||
| env.Append(LIBPATH=["project/addons/discord-rpc-gd/lib"]) | ||||
| env.Append(LIBS=["discord_game_sdk"]) | ||||
| env.Append(LIBPATH=[ "./godot-cpp/bin", "src/discord-game-sdk-cpp/lib"]) | ||||
| env.Append(LIBS=[ "libgodot-cpp{}{}".format(env["suffix"], env["SHLIBSUFFIX"]), "discord_game_sdk"]) | ||||
|  | ||||
| sources = Glob("src/*.cpp") | ||||
| if env["platform"] == "macos": | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -20,20 +20,3 @@ android.debug.x86_64 = "bin/libgd-discordrpc.android.template_debug.x86_64.so" | ||||
| android.release.x86_64 = "bin/libgd-discordrpc.android.template_release.x86_64.so" | ||||
| android.debug.arm64 = "bin/libgd-discordrpc.android.template_debug.arm64.so" | ||||
| android.release.arm64 = "bin/libgd-discordrpc.android.template_release.arm64.so" | ||||
|  | ||||
| [dependencies] | ||||
|  | ||||
| windows.debug.x86_32 = "lib/discord_game_sdk.dll" | ||||
| windows.release.x86_32 = "lib/discord_game_sdk.dll" | ||||
| windows.debug.x86_64 = "lib/discord_game_sdk.dll" | ||||
| windows.release.x86_64 = "lib/discord_game_sdk.dll" | ||||
| linux.debug.x86_64 = "lib/discord_game_sdk.so" | ||||
| linux.release.x86_64 = "lib/discord_game_sdk.so" | ||||
| linux.debug.arm64 = "lib/discord_game_sdk.so" | ||||
| linux.release.arm64 = "lib/discord_game_sdk.so" | ||||
| linux.debug.rv64 = "lib/discord_game_sdk.so" | ||||
| linux.release.rv64 = "lib/discord_game_sdk.so" | ||||
| android.debug.x86_64 = "lib/discord_game_sdk.so" | ||||
| android.release.x86_64 = "lib/discord_game_sdk.so" | ||||
| android.debug.arm64 = "lib/discord_game_sdk.so" | ||||
| android.release.arm64 = "lib/discord_game_sdk.so" | ||||
							
								
								
									
										24
									
								
								src/main.cpp
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								src/main.cpp
									
									
									
									
									
								
							| @@ -8,32 +8,28 @@ using namespace discord; | ||||
|  | ||||
| Core* core{}; | ||||
|  | ||||
| void DiscordRPC::_bind_methods() | ||||
| { | ||||
| void DiscordRPC::_bind_methods() { | ||||
| } | ||||
|  | ||||
| DiscordRPC::DiscordRPC() | ||||
| { | ||||
| DiscordRPC::DiscordRPC() { | ||||
|     // initialize any variables here | ||||
|     time_passed = 0.0; | ||||
| } | ||||
|  | ||||
| DiscordRPC::~DiscordRPC() | ||||
| { | ||||
| DiscordRPC::~DiscordRPC() { | ||||
|     // add your cleanup here | ||||
| } | ||||
|  | ||||
| void DiscordRPC::_ready() | ||||
| { | ||||
|     discord::Result res = Core::Create(53908232506183680, DiscordCreateFlags_NoRequireDiscord, &core); | ||||
| void DiscordRPC::_ready() { | ||||
|     discord::Result res /*= Core::Create(53908232506183680, DiscordCreateFlags_NoRequireDiscord, &core)*/; | ||||
| 	Activity activity{}; | ||||
|     UtilityFunctions::print(core); | ||||
|     activity.SetState("Testing"); | ||||
| 	/*activity.SetState("Testing"); | ||||
| 	activity.SetDetails("Fruit Loops"); | ||||
|     core->ActivityManager().UpdateActivity(activity, [](Result res) {}); | ||||
| 	core->ActivityManager().UpdateActivity(activity, [](Result res) { | ||||
|     });*/ | ||||
| } | ||||
|  | ||||
| void DiscordRPC::_process(float delta) | ||||
| { | ||||
|     ::core->RunCallbacks(); | ||||
| void DiscordRPC::_process(float delta) { | ||||
|     //::core->RunCallbacks(); | ||||
| } | ||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user