2013-04-18 03:09:55 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2010-06-12 17:15:16 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "Common/FileUtil.h"
|
|
|
|
#include "Common/IniFile.h"
|
|
|
|
#include "Common/Thread.h"
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "InputCommon/ControllerEmu.h"
|
|
|
|
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2010-10-12 19:42:29 +00: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 18:45:39 +00:00
|
|
|
class InputPlugin
|
2010-06-03 18:05:08 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2010-10-12 19:42:29 +00: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 18:45:39 +00:00
|
|
|
~InputPlugin();
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2013-01-09 20:03:43 +00:00
|
|
|
bool LoadConfig(bool isGC);
|
2010-06-03 18:05:08 +00:00
|
|
|
void SaveConfig();
|
|
|
|
|
2014-01-31 00:51:21 +00:00
|
|
|
std::vector<ControllerEmu*> controllers;
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2014-01-31 00:51:21 +00:00
|
|
|
std::recursive_mutex controls_lock; // for changing any control references
|
2010-06-03 18:05:08 +00:00
|
|
|
|
2014-01-31 00:51:21 +00:00
|
|
|
const char* const ini_name;
|
|
|
|
const char* const gui_name;
|
|
|
|
const char* const profile_name;
|
2010-06-03 18:05:08 +00:00
|
|
|
};
|