Move global variables into a own file

This commit is contained in:
Maschell 2020-05-17 20:40:05 +02:00
parent 441191e40b
commit 3af7de28d8
4 changed files with 16 additions and 2 deletions

6
source/globals.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "globals.h"
MEMHeapHandle pluginDataHeap __attribute__((section(".data"))) = 0;
plugin_information_t *gPluginInformation __attribute__((section(".data"))) = NULL;
plugin_information_on_reload_t gLinkOnReload __attribute__((section(".data")));

8
source/globals.h Normal file
View File

@ -0,0 +1,8 @@
#pragma once
#include <plugin/PluginContainer.h>
#include <common/plugin_defines.h>
extern plugin_information_t *gPluginInformation;
extern MEMHeapHandle pluginDataHeap;
extern plugin_information_on_reload_t gLinkOnReload;

View File

@ -23,10 +23,9 @@
#include "common/module_defines.h"
#include "hooks.h"
#include "PluginManagement.h"
#include "globals.h"
#include <whb/sdcard.h>
MEMHeapHandle pluginDataHeap __attribute__((section(".data"))) = 0;
plugin_information_t *gPluginInformation __attribute__((section(".data"))) = NULL;
int test();

View File

@ -6,6 +6,7 @@
#include <vpad/input.h>
#include <coreinit/messagequeue.h>
#include <coreinit/core.h>
#include <globals.h>
#include "hooks.h"
extern plugin_information_t *gPluginInformation;