2013-04-18 05:09:55 +02:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2010-06-12 19:15:16 +02:00
|
|
|
|
2014-02-10 19:54:46 +01:00
|
|
|
#pragma once
|
2010-06-03 20:05:08 +02:00
|
|
|
|
2014-02-17 11:18:15 +01:00
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
2010-06-03 20:05:08 +02:00
|
|
|
|
2014-02-17 11:18:15 +01:00
|
|
|
#include "Common/FileUtil.h"
|
|
|
|
#include "Common/IniFile.h"
|
|
|
|
#include "Common/Thread.h"
|
2010-06-03 20:05:08 +02:00
|
|
|
|
2014-02-17 11:18:15 +01:00
|
|
|
#include "InputCommon/ControllerEmu.h"
|
|
|
|
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
2010-06-03 20:05:08 +02:00
|
|
|
|
2010-10-12 21:42:29 +02:00
|
|
|
// InputPlugin isn't a very good name anymore since it's used by GCPad/Wiimote
|
|
|
|
// which are not even plugins anymore.
|
2010-06-12 20:45:39 +02:00
|
|
|
class InputPlugin
|
2010-06-03 20:05:08 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2010-10-12 21:42:29 +02:00
|
|
|
InputPlugin(const char* const _ini_name, const char* const _gui_name,
|
|
|
|
const char* const _profile_name)
|
|
|
|
: ini_name(_ini_name), gui_name(_gui_name), profile_name(_profile_name) {}
|
|
|
|
|
2010-06-12 20:45:39 +02:00
|
|
|
~InputPlugin();
|
2010-06-03 20:05:08 +02:00
|
|
|
|
2013-01-09 21:03:43 +01:00
|
|
|
bool LoadConfig(bool isGC);
|
2010-06-03 20:05:08 +02:00
|
|
|
void SaveConfig();
|
|
|
|
|
2014-01-31 01:51:21 +01:00
|
|
|
std::vector<ControllerEmu*> controllers;
|
2010-06-03 20:05:08 +02:00
|
|
|
|
2014-01-31 01:51:21 +01:00
|
|
|
std::recursive_mutex controls_lock; // for changing any control references
|
2010-06-03 20:05:08 +02:00
|
|
|
|
2014-01-31 01:51:21 +01:00
|
|
|
const char* const ini_name;
|
|
|
|
const char* const gui_name;
|
|
|
|
const char* const profile_name;
|
2010-06-03 20:05:08 +02:00
|
|
|
};
|