mirror of
https://github.com/Maschell/controller_patcher.git
synced 2024-11-25 13:36:53 +01:00
aa0ce59f87
Changelog: Bugfixes: - Fixes the still moving mouse in aim mode, when mouse is actually not moving - Fixed a bug at initializing the config_controller_list; - Fixed the support for almost all mouses that uses the normal HID mouse standard (boot mode). - The emulated sticks are now supported correctly - The stick now only produces valid values. Stick absusing not possible anymore New features: - Added support for config files that can be read from an SD Card. - Added support for more keyboard buttons - Added support for gamepad button remapping - Made the double used buttons on the GC Pad configuable - The keyboard can now emulate the sticks correctly - Keyboard buttons for the sticks can be set - The mouse buttons can now be configured - The mouse can be configured to emulate the left stick - Added support for one more DPAD mode (CONTRPDM_Absolute_2Values) Other: - Removed the support for the PS2 Adapter and Saitek P2600, but they can be added trough a config file. - The engine now uses 16 hardcoded slots the devices can use. - cleaned up the logging output - Logging of the currently pressed buttons possible and more little things I dont remember
83 lines
2.0 KiB
C++
83 lines
2.0 KiB
C++
/****************************************************************************
|
|
* Copyright (C) 2016 Maschell
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
****************************************************************************/
|
|
#ifndef _ConfigReader_H_
|
|
#define _ConfigReader_H_
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <map>
|
|
|
|
#include <stdio.h>
|
|
#include <gctypes.h>
|
|
|
|
#include "controller_patcher.h"
|
|
#include "pad_const.h"
|
|
|
|
#include "../dynamic_libs/os_functions.h"
|
|
#include "../dynamic_libs/fs_functions.h"
|
|
#include "cp_retain_vars.h"
|
|
|
|
|
|
|
|
class ConfigReader
|
|
{
|
|
public:
|
|
static ConfigReader *getInstance() {
|
|
if(!instance)
|
|
instance = new ConfigReader();
|
|
return instance;
|
|
}
|
|
|
|
static void destroyInstance() {
|
|
if(instance){
|
|
delete instance;
|
|
instance = NULL;
|
|
}
|
|
}
|
|
|
|
static int getNumberOfLoadedFiles(){
|
|
return ConfigReader::numberValidFiles;
|
|
}
|
|
|
|
static void increaseNumberOfLoadedFiles(){
|
|
ConfigReader::numberValidFiles++;
|
|
}
|
|
static int numberValidFiles;
|
|
|
|
private:
|
|
//!Constructor
|
|
ConfigReader();
|
|
//!Destructor
|
|
~ConfigReader();
|
|
|
|
|
|
int InitSDCard();
|
|
void freeFSHandles();
|
|
|
|
void * pClient = NULL;
|
|
void * pCmd = NULL;
|
|
static ConfigReader *instance;
|
|
|
|
|
|
|
|
std::string loadFileToString(std::string path);
|
|
void processFileList(std::vector<std::string> path);
|
|
|
|
std::vector<std::string> ScanFolder();
|
|
};
|
|
#endif
|