renamed the rest
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "activity.h"
|
||||
#include "discordgodot.h"
|
||||
#include "./discord-game-sdk-cpp/discord.h"
|
||||
#include <godot_cpp/core/class_db.hpp>
|
||||
#include <godot_cpp/classes/editor_plugin.hpp>
|
@@ -1,5 +1,5 @@
|
||||
#ifndef ACTIVITY_H
|
||||
#define ACTIVITY_H
|
||||
#ifndef DISCORDGODOT_H
|
||||
#define DISCORDGODOT_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <godot_cpp/classes/object.hpp>
|
@@ -6,17 +6,17 @@
|
||||
#include <godot_cpp/classes/engine.hpp>
|
||||
#include <godot_cpp/godot.hpp>
|
||||
|
||||
#include "activity.h"
|
||||
#include "discordgodot.h"
|
||||
using namespace godot;
|
||||
|
||||
static Discord_SDK *discordactivity;
|
||||
static Discord_SDK *discordsdk;
|
||||
|
||||
void gdextension_initialize(ModuleInitializationLevel p_level)
|
||||
{
|
||||
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE)
|
||||
{
|
||||
ClassDB::register_class<Discord_SDK>();
|
||||
discordactivity = memnew(Discord_SDK);
|
||||
discordsdk = memnew(Discord_SDK);
|
||||
Engine::get_singleton()->register_singleton("Discord_SDK", Discord_SDK::get_singleton());
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ void gdextension_terminate(ModuleInitializationLevel p_level)
|
||||
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE)
|
||||
{
|
||||
Engine::get_singleton()->unregister_singleton("Discord_SDK");
|
||||
memdelete(discordactivity);
|
||||
memdelete(discordsdk);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user