From b617c4db1dbef4e4178bd1ea3fdecb4ff82c2257 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 9 Nov 2015 22:24:02 -0500 Subject: [PATCH] [Plugin Specs] moved CONTROL_INFO typedef for accessibility --- Source/Project64/Plugins/Controller Plugin.cpp | 14 -------------- Source/Project64/Plugins/Controller Plugin.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Source/Project64/Plugins/Controller Plugin.cpp b/Source/Project64/Plugins/Controller Plugin.cpp index 8b399bace..3db3ae50d 100644 --- a/Source/Project64/Plugins/Controller Plugin.cpp +++ b/Source/Project64/Plugins/Controller Plugin.cpp @@ -79,20 +79,6 @@ bool CControl_Plugin::Initiate(CN64System * System, CMainGui * RenderWindow) } else if (m_PluginInfo.Version >= 0x0101) { - typedef struct - { - HWND hMainWindow; - HINSTANCE hinst; - - int32_t MemoryBswaped; // If this is set to TRUE, then the memory has been pre - // bswap on a dword (32 bits) boundry, only effects header. - // eg. the first 8 bytes are stored like this: - // 4 3 2 1 8 7 6 5 - uint8_t * HEADER; // This is the rom header (first 40h bytes of the rom) - CONTROL *Controls; // A pointer to an array of 4 controllers .. eg: - // CONTROL Controls[4]; - } CONTROL_INFO; - //Get Function from DLL void(__cdecl *InitiateControllers_1_1)(CONTROL_INFO * ControlInfo); InitiateControllers_1_1 = (void(__cdecl *)(CONTROL_INFO *))GetProcAddress((HMODULE)m_hDll, "InitiateControllers"); diff --git a/Source/Project64/Plugins/Controller Plugin.h b/Source/Project64/Plugins/Controller Plugin.h index b8cf32595..f59a40aba 100644 --- a/Source/Project64/Plugins/Controller Plugin.h +++ b/Source/Project64/Plugins/Controller Plugin.h @@ -50,6 +50,16 @@ typedef struct int32_t Plugin; } CONTROL; +typedef struct +{ + void * hMainWindow; + void * hinst; + + int32_t MemoryBswaped; // memory in client- or server-native endian + uint8_t * HEADER; // the ROM header (first 40h bytes of the ROM) + CONTROL * Controls; // pointer to array of 4 controllers, i.e.: CONTROL Controls[4]; +} CONTROL_INFO; + enum PluginType { PLUGIN_NONE = 1,