mirror of
https://github.com/Maschell/controller_patcher.git
synced 2024-11-22 03:59:16 +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
147 lines
5.4 KiB
C
147 lines
5.4 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 _PAD_CONST_H_
|
|
#define _PAD_CONST_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <gctypes.h>
|
|
#include "controller_patcher.h"
|
|
|
|
extern const u8 DEF_L_STICK_UP;
|
|
extern const u8 DEF_L_STICK_DOWN;
|
|
extern const u8 DEF_L_STICK_LEFT;
|
|
extern const u8 DEF_L_STICK_RIGHT;
|
|
|
|
extern const u8 DEF_R_STICK_UP;
|
|
extern const u8 DEF_R_STICK_DOWN;
|
|
extern const u8 DEF_R_STICK_LEFT;
|
|
extern const u8 DEF_R_STICK_RIGHT;
|
|
|
|
extern const u8 DEF_R_STICK;
|
|
extern const u8 DEF_L_STICK;
|
|
|
|
extern const u8 DEF_STICK_OFFSET_INVERT;
|
|
extern const u8 DEF_STICK_OFFSET_DEADZONE;
|
|
extern const u8 DEF_STICK_OFFSET_MINMAX;
|
|
|
|
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
//! GC_Adapter
|
|
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
extern const u8 HID_GC_BUTTON_A[];
|
|
extern const u8 HID_GC_BUTTON_B[];
|
|
extern const u8 HID_GC_BUTTON_X[];
|
|
extern const u8 HID_GC_BUTTON_Y[];
|
|
extern const u8 HID_GC_BUTTON_LEFT[];
|
|
extern const u8 HID_GC_BUTTON_RIGHT[];
|
|
extern const u8 HID_GC_BUTTON_DOWN[];
|
|
extern const u8 HID_GC_BUTTON_UP[];
|
|
|
|
extern const u8 HID_GC_BUTTON_START[];
|
|
extern const u8 HID_GC_BUTTON_Z[];
|
|
|
|
extern const u8 HID_GC_BUTTON_L[];
|
|
extern const u8 HID_GC_BUTTON_R[];
|
|
|
|
extern const u8 HID_GC_BUTTON_DPAD_TYPE[];
|
|
|
|
extern const u8 HID_GC_STICK_L_X[STICK_CONF_ENUM_MAXVALUE];
|
|
extern const u8 HID_GC_STICK_L_Y[STICK_CONF_ENUM_MAXVALUE];
|
|
extern const u8 HID_GC_STICK_R_X[STICK_CONF_ENUM_MAXVALUE];
|
|
extern const u8 HID_GC_STICK_R_Y[STICK_CONF_ENUM_MAXVALUE];
|
|
|
|
|
|
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
//! DS3
|
|
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
extern const u8 HID_DS3_BUTTON_CROSS[];
|
|
extern const u8 HID_DS3_BUTTON_CIRCLE[];
|
|
extern const u8 HID_DS3_BUTTON_SQUARE [];
|
|
extern const u8 HID_DS3_BUTTON_TRIANGLE[];
|
|
|
|
extern const u8 HID_DS3_BUTTON_L1[];
|
|
extern const u8 HID_DS3_BUTTON_L2[];
|
|
extern const u8 HID_DS3_BUTTON_R1[];
|
|
extern const u8 HID_DS3_BUTTON_R2[];
|
|
|
|
extern const u8 HID_DS3_BUTTON_L3[];
|
|
extern const u8 HID_DS3_BUTTON_R3[];
|
|
extern const u8 HID_DS3_BUTTON_SELECT[];
|
|
extern const u8 HID_DS3_BUTTON_START[];
|
|
extern const u8 HID_DS3_BUTTON_LEFT[];
|
|
extern const u8 HID_DS3_BUTTON_RIGHT[];
|
|
extern const u8 HID_DS3_BUTTON_UP[];
|
|
extern const u8 HID_DS3_BUTTON_DOWN[];
|
|
|
|
extern const u8 HID_DS3_BUTTON_GUIDE[];
|
|
|
|
extern const u8 HID_DS3_BUTTON_DPAD_TYPE[];
|
|
|
|
extern const u8 HID_DS3_STICK_L_X[STICK_CONF_ENUM_MAXVALUE];
|
|
extern const u8 HID_DS3_STICK_L_Y[STICK_CONF_ENUM_MAXVALUE];
|
|
extern const u8 HID_DS3_STICK_R_X[STICK_CONF_ENUM_MAXVALUE];
|
|
extern const u8 HID_DS3_STICK_R_Y[STICK_CONF_ENUM_MAXVALUE];
|
|
|
|
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
//! DS4
|
|
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
extern const u8 HID_DS4_BUTTON_CROSS[];
|
|
extern const u8 HID_DS4_BUTTON_CIRCLE[];
|
|
extern const u8 HID_DS4_BUTTON_SQUARE [];
|
|
extern const u8 HID_DS4_BUTTON_TRIANGLE[];
|
|
|
|
extern const u8 HID_DS4_BUTTON_L1[];
|
|
extern const u8 HID_DS4_BUTTON_L2[];
|
|
extern const u8 HID_DS4_BUTTON_L3[];
|
|
extern const u8 HID_DS4_BUTTON_R1[];
|
|
extern const u8 HID_DS4_BUTTON_R2[];
|
|
extern const u8 HID_DS4_BUTTON_R3[];
|
|
|
|
extern const u8 HID_DS4_BUTTON_SHARE[];
|
|
extern const u8 HID_DS4_BUTTON_OPTIONS[];
|
|
|
|
extern const u8 HID_DS4_BUTTON_DPAD_TYPE[];
|
|
extern const u8 HID_DS4_BUTTON_DPAD_N[];
|
|
extern const u8 HID_DS4_BUTTON_DPAD_NE[];
|
|
extern const u8 HID_DS4_BUTTON_DPAD_E[];
|
|
extern const u8 HID_DS4_BUTTON_DPAD_SE[];
|
|
extern const u8 HID_DS4_BUTTON_DPAD_S[];
|
|
extern const u8 HID_DS4_BUTTON_DPAD_SW[];
|
|
extern const u8 HID_DS4_BUTTON_DPAD_W[];
|
|
extern const u8 HID_DS4_BUTTON_DPAD_NW[];
|
|
extern const u8 HID_DS4_BUTTON_DPAD_NEUTRAL[];
|
|
|
|
extern const u8 HID_DS4_BUTTON_GUIDE[];
|
|
extern const u8 HID_DS4_BUTTON_T_PAD_CLICK[];
|
|
|
|
extern const u8 HID_DS4_STICK_L_X[STICK_CONF_ENUM_MAXVALUE];
|
|
extern const u8 HID_DS4_STICK_L_Y[STICK_CONF_ENUM_MAXVALUE];
|
|
extern const u8 HID_DS4_STICK_R_X[STICK_CONF_ENUM_MAXVALUE];
|
|
extern const u8 HID_DS4_STICK_R_Y[STICK_CONF_ENUM_MAXVALUE];
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _PAD_CONST_H_ */
|