mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
moved the inputmanager to inputcommon
to avoid sdl dep in core git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1988 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
43
Source/Core/InputCommon/Src/InputManager.h
Normal file
43
Source/Core/InputCommon/Src/InputManager.h
Normal file
@ -0,0 +1,43 @@
|
||||
#ifndef INPUTMANAGER_H
|
||||
#define INPUTMANAGER_H
|
||||
#include "Common.h"
|
||||
|
||||
#if defined HAVE_SDL && HAVE_SDL
|
||||
#include <SDL.h>
|
||||
|
||||
|
||||
struct ControllerInfo { // CONNECTED WINDOWS DEVICES INFO
|
||||
int NumAxes; // Amount of Axes
|
||||
int NumButtons; // Amount of Buttons
|
||||
int NumBalls; // Amount of Balls
|
||||
int NumHats; // Amount of Hats (POV)
|
||||
const char *Name; // Joypad/stickname
|
||||
int ID; // SDL joystick device ID
|
||||
SDL_Joystick *joy; // SDL joystick device
|
||||
};
|
||||
#endif
|
||||
|
||||
class InputManager {
|
||||
|
||||
public:
|
||||
bool Init();
|
||||
bool Shutdown();
|
||||
|
||||
InputManager(): sdlInit(false) {}
|
||||
~InputManager() {
|
||||
if(m_joyinfo)
|
||||
delete [] m_joyinfo;
|
||||
}
|
||||
|
||||
private:
|
||||
bool sdlInit;
|
||||
int ScanDevices();
|
||||
|
||||
// sdl specific
|
||||
bool SDLInit();
|
||||
void SDLShutdown();
|
||||
int SDLScanDevices();
|
||||
ControllerInfo *m_joyinfo;
|
||||
int numjoy;
|
||||
};
|
||||
#endif
|
Reference in New Issue
Block a user