Function to grab input interfaces. Qt port uses this in order to build menu items.

This commit is contained in:
Marcos Medeiros 2014-06-08 21:33:07 +00:00
parent 0d6c3fe7bb
commit 263a020eb3
2 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,6 @@
// Burner Input module
#include "burner.h"
#include <vector>
UINT32 nInputSelect = 0;
bool bInputOkay = false;
@ -27,6 +28,14 @@ static struct InputInOut *pInputInOut[]=
#define INPUT_LEN (sizeof(pInputInOut) / sizeof(pInputInOut[0]))
std::vector<const InputInOut *> InputGetInterfaces()
{
std::vector<const InputInOut *> list;
for (int i = 0; i < INPUT_LEN; i++)
list.push_back(pInputInOut[i]);
return list;
}
static InterfaceInfo InpInfo = { NULL, NULL, NULL };
inline INT32 CinpState(const INT32 nCode)

View File

@ -1,6 +1,8 @@
#pragma once
#ifdef FBA_DEBUG
#define PRINT_DEBUG_INFO
#endif
#include <vector>
// GameInp structure
#include "gameinp.h"
@ -47,6 +49,7 @@ INT32 InputMake(bool bCopy);
INT32 InputFind(const INT32 nFlags);
INT32 InputGetControlName(INT32 nCode, TCHAR* pszDeviceName, TCHAR* pszControlName);
InterfaceInfo* InputGetInfo();
std::vector<const InputInOut *> InputGetInterfaces();
extern bool bInputOkay;
extern UINT32 nInputSelect;