2020-06-24 00:40:43 +00:00
|
|
|
#ifndef _aosdfjk02fmasf
|
|
|
|
#define _aosdfjk02fmasf
|
|
|
|
|
2020-07-06 01:16:31 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2020-06-28 00:07:24 +00:00
|
|
|
#include "common/configSys.h"
|
2020-06-24 00:40:43 +00:00
|
|
|
|
2020-07-23 22:43:45 +00:00
|
|
|
//#define MAXBUTTCONFIG 4
|
2020-06-28 01:08:02 +00:00
|
|
|
|
|
|
|
enum {
|
|
|
|
BUTTC_KEYBOARD = 0,
|
|
|
|
BUTTC_JOYSTICK = 1,
|
|
|
|
BUTTC_MOUSE = 2
|
|
|
|
};
|
|
|
|
struct ButtConfig
|
|
|
|
{
|
2020-11-09 03:57:28 +00:00
|
|
|
int ButtType;
|
|
|
|
int DeviceNum;
|
|
|
|
int ButtonNum;
|
2020-07-24 13:50:03 +00:00
|
|
|
int state;
|
2020-06-28 01:08:02 +00:00
|
|
|
};
|
2020-06-24 00:40:43 +00:00
|
|
|
|
|
|
|
extern int NoWaiting;
|
|
|
|
extern CFGSTRUCT InputConfig[];
|
|
|
|
extern ARGPSTRUCT InputArgs[];
|
|
|
|
void ParseGIInput(FCEUGI *GI);
|
2020-07-07 01:44:23 +00:00
|
|
|
void setHotKeys(void);
|
2020-06-24 00:40:43 +00:00
|
|
|
int getKeyState( int k );
|
|
|
|
int ButtonConfigBegin();
|
|
|
|
void ButtonConfigEnd();
|
|
|
|
void ConfigButton(char *text, ButtConfig *bc);
|
2020-07-23 22:43:45 +00:00
|
|
|
int DWaitButton(const uint8_t *text, ButtConfig *bc, int *buttonConfigStatus = NULL);
|
2020-06-24 00:40:43 +00:00
|
|
|
|
2020-11-09 03:57:28 +00:00
|
|
|
struct hotkey_t
|
|
|
|
{
|
|
|
|
int value;
|
|
|
|
int modifier;
|
|
|
|
char prevState;
|
|
|
|
|
|
|
|
hotkey_t(void);
|
|
|
|
|
|
|
|
int getState(void);
|
|
|
|
|
|
|
|
int getRisingEdge(void);
|
|
|
|
|
|
|
|
int getString( char *s );
|
|
|
|
|
|
|
|
void setModifierFromString( const char *s );
|
|
|
|
};
|
|
|
|
extern struct hotkey_t Hotkeys[];
|
2020-06-24 00:40:43 +00:00
|
|
|
|
|
|
|
#define FCFGD_GAMEPAD 1
|
|
|
|
#define FCFGD_POWERPAD 2
|
|
|
|
#define FCFGD_HYPERSHOT 3
|
|
|
|
#define FCFGD_QUIZKING 4
|
|
|
|
|
|
|
|
#define SDL_FCEU_HOTKEY_EVENT SDL_USEREVENT
|
|
|
|
|
|
|
|
void InitInputInterface(void);
|
|
|
|
void InputUserActiveFix(void);
|
|
|
|
|
|
|
|
extern bool replaceP2StartWithMicrophone;
|
2020-07-24 04:11:11 +00:00
|
|
|
//extern ButtConfig GamePadConfig[4][10];
|
2020-06-24 00:40:43 +00:00
|
|
|
//extern ButtConfig powerpadsc[2][12];
|
|
|
|
//extern ButtConfig QuizKingButtons[6];
|
|
|
|
//extern ButtConfig FTrainerButtons[12];
|
|
|
|
|
|
|
|
void IncreaseEmulationSpeed(void);
|
|
|
|
void DecreaseEmulationSpeed(void);
|
2020-10-18 14:34:03 +00:00
|
|
|
int CustomEmulationSpeed(int spdPercent);
|
2020-06-24 00:40:43 +00:00
|
|
|
|
|
|
|
int DTestButtonJoy(ButtConfig *bc);
|
|
|
|
|
|
|
|
void FCEUD_UpdateInput(void);
|
|
|
|
|
|
|
|
void UpdateInput(Config *config);
|
2020-07-25 03:04:56 +00:00
|
|
|
//void InputCfg(const std::string &);
|
2020-06-24 00:40:43 +00:00
|
|
|
|
|
|
|
std::string GetUserText(const char* title);
|
2020-07-23 22:43:45 +00:00
|
|
|
const char* ButtonName(const ButtConfig* bc);
|
2020-11-23 18:50:26 +00:00
|
|
|
|
|
|
|
int getInputSelection( int port, int *cur, int *usr );
|
2020-11-23 21:09:11 +00:00
|
|
|
int saveInputSettingsToFile( const char *fileBase = NULL );
|
|
|
|
int loadInputSettingsFromFile( const char *filename = NULL );
|
2020-11-23 18:50:26 +00:00
|
|
|
|
2020-06-24 00:40:43 +00:00
|
|
|
#endif
|
|
|
|
|