2008-09-12 07:28:40 +02:00
|
|
|
/****************************************************************************
|
2010-01-27 23:20:37 +01:00
|
|
|
* Snes9x Nintendo Wii/Gamecube Port
|
2008-09-12 07:28:40 +02:00
|
|
|
*
|
|
|
|
* softdev July 2006
|
|
|
|
* crunchy2 May-June 2007
|
2008-09-23 06:13:33 +02:00
|
|
|
* Michniewski 2008
|
2018-12-27 00:10:12 +01:00
|
|
|
* Tantric 2008-2019
|
2008-09-12 07:28:40 +02:00
|
|
|
*
|
|
|
|
* input.cpp
|
|
|
|
*
|
|
|
|
* Wii/Gamecube controller management
|
|
|
|
***************************************************************************/
|
|
|
|
|
2008-08-20 06:07:38 +02:00
|
|
|
#include <gccore.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include <ogcsys.h>
|
|
|
|
#include <unistd.h>
|
2018-06-06 16:10:11 +02:00
|
|
|
#ifdef HW_RVL
|
2008-08-20 06:07:38 +02:00
|
|
|
#include <wiiuse/wpad.h>
|
2018-06-06 16:10:11 +02:00
|
|
|
#endif
|
2010-03-31 04:50:05 +02:00
|
|
|
#include <ogc/lwp_watchdog.h>
|
2008-08-20 06:07:38 +02:00
|
|
|
|
2018-08-01 20:44:21 +02:00
|
|
|
#include "snes9x/port.h"
|
2010-03-22 00:43:54 +01:00
|
|
|
#include "snes9xgx.h"
|
2008-08-20 06:07:38 +02:00
|
|
|
#include "button_mapping.h"
|
|
|
|
#include "menu.h"
|
|
|
|
#include "video.h"
|
|
|
|
#include "input.h"
|
2009-03-16 06:16:20 +01:00
|
|
|
#include "gui/gui.h"
|
2008-08-20 06:07:38 +02:00
|
|
|
|
2010-03-22 00:43:54 +01:00
|
|
|
#include "snes9x/snes9x.h"
|
|
|
|
#include "snes9x/memmap.h"
|
|
|
|
#include "snes9x/controls.h"
|
|
|
|
|
2019-08-06 02:22:54 +02:00
|
|
|
#ifdef HW_RVL
|
|
|
|
#include "utils/retrode.h"
|
2019-12-30 20:45:20 +01:00
|
|
|
#include "utils/xbox360.h"
|
2019-08-06 02:22:54 +02:00
|
|
|
#endif
|
|
|
|
|
2018-08-30 23:58:54 +02:00
|
|
|
#define ANALOG_SENSITIVITY 30
|
|
|
|
|
2009-03-11 18:28:37 +01:00
|
|
|
int rumbleRequest[4] = {0,0,0,0};
|
2009-03-16 06:16:20 +01:00
|
|
|
GuiTrigger userInput[4];
|
2009-03-11 18:28:37 +01:00
|
|
|
|
|
|
|
#ifdef HW_RVL
|
|
|
|
static int rumbleCount[4] = {0,0,0,0};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// hold superscope/mouse/justifier cursor positions
|
|
|
|
static int cursor_x[5] = {0,0,0,0,0};
|
|
|
|
static int cursor_y[5] = {0,0,0,0,0};
|
|
|
|
|
2008-08-20 06:07:38 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Controller Functions
|
|
|
|
*
|
2009-03-11 18:28:37 +01:00
|
|
|
* The following map the Wii controls to the Snes9x controller system
|
2008-09-12 07:28:40 +02:00
|
|
|
***************************************************************************/
|
2008-08-20 06:07:38 +02:00
|
|
|
#define ASSIGN_BUTTON_TRUE( keycode, snescmd ) \
|
|
|
|
S9xMapButton( keycode, cmd = S9xGetCommandT(snescmd), true)
|
|
|
|
|
|
|
|
#define ASSIGN_BUTTON_FALSE( keycode, snescmd ) \
|
|
|
|
S9xMapButton( keycode, cmd = S9xGetCommandT(snescmd), false)
|
|
|
|
|
2009-10-15 08:51:38 +02:00
|
|
|
static int scopeTurbo = 0; // tracks whether superscope turbo is on or off
|
2018-09-06 03:59:14 +02:00
|
|
|
u32 btnmap[4][6][12]; // button mapping
|
2008-12-19 23:00:20 +01:00
|
|
|
|
2009-06-22 21:58:18 +02:00
|
|
|
void ResetControls(int consoleCtrl, int wiiCtrl)
|
2008-12-19 23:00:20 +01:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
/*** Gamecube controller Padmap ***/
|
2009-07-01 19:15:47 +02:00
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_GCPAD))
|
2009-06-22 21:58:18 +02:00
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_BUTTON_A;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_BUTTON_B;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_BUTTON_X;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_BUTTON_Y;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_TRIGGER_L;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_TRIGGER_R;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_BUTTON_START;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_TRIGGER_Z;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_BUTTON_UP;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_BUTTON_DOWN;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_BUTTON_LEFT;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_GCPAD][i++] = PAD_BUTTON_RIGHT;
|
|
|
|
}
|
2008-12-19 23:00:20 +01:00
|
|
|
|
|
|
|
/*** Wiimote Padmap ***/
|
2009-07-01 19:15:47 +02:00
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_WIIMOTE))
|
2009-06-22 21:58:18 +02:00
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_B;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_2;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_1;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_A;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = 0x0000;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = 0x0000;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_PLUS;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_MINUS;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_RIGHT;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_LEFT;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_UP;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_DOWN;
|
|
|
|
}
|
2008-12-19 23:00:20 +01:00
|
|
|
|
|
|
|
/*** Classic Controller Padmap ***/
|
2009-07-01 19:15:47 +02:00
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_CLASSIC))
|
2009-06-22 21:58:18 +02:00
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_A;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_B;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_X;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_Y;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_FULL_L;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_FULL_R;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_PLUS;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_MINUS;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_UP;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_DOWN;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_LEFT;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_RIGHT;
|
|
|
|
}
|
2018-08-16 17:21:10 +02:00
|
|
|
|
|
|
|
/*** Wii U Pro Padmap ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_WUPC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_A;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_B;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_X;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_Y;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_FULL_L;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_FULL_R;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_PLUS;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_MINUS;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_UP;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_DOWN;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_LEFT;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_RIGHT;
|
|
|
|
}
|
2018-09-06 03:59:14 +02:00
|
|
|
|
|
|
|
/*** Wii U Gamepad Padmap ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_WIIDRC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_A;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_B;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_X;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_Y;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_L;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_R;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_PLUS;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_MINUS;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_UP;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_DOWN;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_LEFT;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_RIGHT;
|
|
|
|
}
|
2016-02-06 22:40:46 +01:00
|
|
|
|
2008-12-19 23:00:20 +01:00
|
|
|
/*** Nunchuk + wiimote Padmap ***/
|
2009-07-01 19:15:47 +02:00
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_PAD && wiiCtrl == CTRLR_NUNCHUK))
|
2009-06-22 21:58:18 +02:00
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_BUTTON_A;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_BUTTON_B;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_NUNCHUK_BUTTON_C;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_NUNCHUK_BUTTON_Z;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_BUTTON_2;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_BUTTON_1;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_BUTTON_PLUS;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_BUTTON_MINUS;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_BUTTON_UP;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_BUTTON_DOWN;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_BUTTON_LEFT;
|
|
|
|
btnmap[CTRL_PAD][CTRLR_NUNCHUK][i++] = WPAD_BUTTON_RIGHT;
|
|
|
|
}
|
2008-12-19 23:00:20 +01:00
|
|
|
|
|
|
|
/*** Superscope : GC controller button mapping ***/
|
2009-07-01 19:15:47 +02:00
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_SCOPE && wiiCtrl == CTRLR_GCPAD))
|
2009-06-22 21:58:18 +02:00
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_A;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_B;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_TRIGGER_Z;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_Y;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_X;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_GCPAD][i++] = PAD_BUTTON_START;
|
|
|
|
}
|
2008-12-19 23:00:20 +01:00
|
|
|
|
|
|
|
/*** Superscope : wiimote button mapping ***/
|
2009-07-01 19:15:47 +02:00
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_SCOPE && wiiCtrl == CTRLR_WIIMOTE))
|
2009-06-22 21:58:18 +02:00
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_B;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_A;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_MINUS;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_UP;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_DOWN;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_PLUS;
|
|
|
|
}
|
2008-12-19 23:00:20 +01:00
|
|
|
|
2019-08-13 23:11:03 +02:00
|
|
|
/*** Superscope : Classic Controller button mapping ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_SCOPE && wiiCtrl == CTRLR_CLASSIC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_B;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_A;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_MINUS;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_Y;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_X;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_PLUS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** Superscope : Wii U Pro Controller button mapping ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_SCOPE && wiiCtrl == CTRLR_WUPC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_B;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_A;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_MINUS;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_Y;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_X;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_PLUS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** Superscope : Wii U Gamepad button mapping ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_SCOPE && wiiCtrl == CTRLR_WIIDRC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_B;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_A;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_MINUS;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_Y;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_X;
|
|
|
|
btnmap[CTRL_SCOPE][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_PLUS;
|
|
|
|
}
|
|
|
|
|
2008-12-19 23:00:20 +01:00
|
|
|
/*** Mouse : GC controller button mapping ***/
|
2009-07-01 19:15:47 +02:00
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_MOUSE && wiiCtrl == CTRLR_GCPAD))
|
2009-06-22 21:58:18 +02:00
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_MOUSE][CTRLR_GCPAD][i++] = PAD_BUTTON_A;
|
|
|
|
btnmap[CTRL_MOUSE][CTRLR_GCPAD][i++] = PAD_BUTTON_B;
|
|
|
|
}
|
2008-12-19 23:00:20 +01:00
|
|
|
|
|
|
|
/*** Mouse : wiimote button mapping ***/
|
2009-07-01 19:15:47 +02:00
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_MOUSE && wiiCtrl == CTRLR_WIIMOTE))
|
2009-06-22 21:58:18 +02:00
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_MOUSE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_A;
|
|
|
|
btnmap[CTRL_MOUSE][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_B;
|
|
|
|
}
|
2008-12-19 23:00:20 +01:00
|
|
|
|
2019-08-13 23:11:03 +02:00
|
|
|
/*** Mouse : Classic Controller button mapping ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_MOUSE && wiiCtrl == CTRLR_CLASSIC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_MOUSE][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_A;
|
|
|
|
btnmap[CTRL_MOUSE][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_B;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** Mouse : Wii U Pro Controller button mapping ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_MOUSE && wiiCtrl == CTRLR_WUPC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_MOUSE][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_A;
|
|
|
|
btnmap[CTRL_MOUSE][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_B;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** Mouse : Wii U Gamepad button mapping ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_MOUSE && wiiCtrl == CTRLR_WIIDRC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_MOUSE][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_A;
|
|
|
|
btnmap[CTRL_MOUSE][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_B;
|
|
|
|
}
|
|
|
|
|
2008-12-19 23:00:20 +01:00
|
|
|
/*** Justifier : GC controller button mapping ***/
|
2009-07-01 19:15:47 +02:00
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_JUST && wiiCtrl == CTRLR_GCPAD))
|
2009-06-22 21:58:18 +02:00
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_GCPAD][i++] = PAD_BUTTON_B;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_GCPAD][i++] = PAD_BUTTON_A;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_GCPAD][i++] = PAD_BUTTON_START;
|
|
|
|
}
|
2008-11-07 07:51:05 +01:00
|
|
|
|
2008-12-19 23:00:20 +01:00
|
|
|
/*** Justifier : wiimote button mapping ***/
|
2009-07-01 19:15:47 +02:00
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_JUST && wiiCtrl == CTRLR_WIIMOTE))
|
2009-06-22 21:58:18 +02:00
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_B;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_A;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_WIIMOTE][i++] = WPAD_BUTTON_PLUS;
|
|
|
|
}
|
2019-08-13 23:11:03 +02:00
|
|
|
|
|
|
|
/*** Justifier : Classic Controller button mapping ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_JUST && wiiCtrl == CTRLR_CLASSIC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_B;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_A;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_CLASSIC][i++] = WPAD_CLASSIC_BUTTON_PLUS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** Justifier : Wii U Pro Controller button mapping ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_JUST && wiiCtrl == CTRLR_WUPC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_B;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_A;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_WUPC][i++] = WPAD_CLASSIC_BUTTON_PLUS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** Justifier : Wii U Gamepad button mapping ***/
|
|
|
|
if(consoleCtrl == -1 || (consoleCtrl == CTRL_JUST && wiiCtrl == CTRLR_WIIDRC))
|
|
|
|
{
|
|
|
|
i=0;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_B;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_A;
|
|
|
|
btnmap[CTRL_JUST][CTRLR_WIIDRC][i++] = WIIDRC_BUTTON_PLUS;
|
|
|
|
}
|
2009-03-11 18:28:37 +01:00
|
|
|
}
|
|
|
|
|
2009-06-27 22:03:15 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* UpdatePads
|
|
|
|
*
|
2009-10-13 02:48:00 +02:00
|
|
|
* Scans pad and wpad
|
2009-06-27 22:03:15 +02:00
|
|
|
***************************************************************************/
|
2010-03-31 04:50:05 +02:00
|
|
|
|
2009-10-13 02:48:00 +02:00
|
|
|
void
|
|
|
|
UpdatePads()
|
2009-06-27 22:03:15 +02:00
|
|
|
{
|
|
|
|
#ifdef HW_RVL
|
2018-09-06 03:59:14 +02:00
|
|
|
WiiDRC_ScanPads();
|
2019-08-06 02:22:54 +02:00
|
|
|
Retrode_ScanPads();
|
2019-12-30 20:45:20 +01:00
|
|
|
XBOX360_ScanPads();
|
2009-06-27 22:03:15 +02:00
|
|
|
WPAD_ScanPads();
|
|
|
|
#endif
|
2010-03-31 04:50:05 +02:00
|
|
|
|
2012-10-04 02:33:54 +02:00
|
|
|
PAD_ScanPads();
|
2009-06-27 22:03:15 +02:00
|
|
|
|
|
|
|
for(int i=3; i >= 0; i--)
|
|
|
|
{
|
|
|
|
userInput[i].pad.btns_d = PAD_ButtonsDown(i);
|
|
|
|
userInput[i].pad.btns_u = PAD_ButtonsUp(i);
|
|
|
|
userInput[i].pad.btns_h = PAD_ButtonsHeld(i);
|
|
|
|
userInput[i].pad.stickX = PAD_StickX(i);
|
|
|
|
userInput[i].pad.stickY = PAD_StickY(i);
|
|
|
|
userInput[i].pad.substickX = PAD_SubStickX(i);
|
|
|
|
userInput[i].pad.substickY = PAD_SubStickY(i);
|
|
|
|
userInput[i].pad.triggerL = PAD_TriggerL(i);
|
|
|
|
userInput[i].pad.triggerR = PAD_TriggerR(i);
|
|
|
|
}
|
2019-01-05 21:34:21 +01:00
|
|
|
#ifdef HW_RVL
|
|
|
|
if(WiiDRC_Inited() && WiiDRC_Connected())
|
|
|
|
{
|
|
|
|
userInput[0].wiidrcdata.btns_d = WiiDRC_ButtonsDown();
|
|
|
|
userInput[0].wiidrcdata.btns_u = WiiDRC_ButtonsUp();
|
|
|
|
userInput[0].wiidrcdata.btns_h = WiiDRC_ButtonsHeld();
|
|
|
|
userInput[0].wiidrcdata.stickX = WiiDRC_lStickX();
|
|
|
|
userInput[0].wiidrcdata.stickY = WiiDRC_lStickY();
|
|
|
|
userInput[0].wiidrcdata.substickX = WiiDRC_rStickX();
|
|
|
|
userInput[0].wiidrcdata.substickY = WiiDRC_rStickY();
|
|
|
|
}
|
|
|
|
#endif
|
2009-06-27 22:03:15 +02:00
|
|
|
}
|
|
|
|
|
2009-10-13 02:48:00 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* SetupPads
|
|
|
|
*
|
|
|
|
* Sets up userInput triggers for use
|
|
|
|
***************************************************************************/
|
2018-08-21 16:38:50 +02:00
|
|
|
static bool soundSync = false;
|
|
|
|
|
2009-10-13 02:48:00 +02:00
|
|
|
void
|
|
|
|
SetupPads()
|
|
|
|
{
|
2018-08-21 16:38:50 +02:00
|
|
|
soundSync = Settings.SoundSync;
|
2009-10-13 02:48:00 +02:00
|
|
|
PAD_Init();
|
|
|
|
|
|
|
|
#ifdef HW_RVL
|
|
|
|
// read wiimote accelerometer and IR data
|
|
|
|
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
|
|
|
|
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
for(int i=0; i < 4; i++)
|
|
|
|
{
|
|
|
|
userInput[i].chan = i;
|
|
|
|
#ifdef HW_RVL
|
|
|
|
userInput[i].wpad = WPAD_Data(i);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-03-11 18:28:37 +01:00
|
|
|
#ifdef HW_RVL
|
|
|
|
/****************************************************************************
|
|
|
|
* ShutoffRumble
|
|
|
|
***************************************************************************/
|
|
|
|
void ShutoffRumble()
|
|
|
|
{
|
2010-04-17 05:05:03 +02:00
|
|
|
if(CONF_GetPadMotorMode() == 0)
|
|
|
|
return;
|
|
|
|
|
2009-03-11 18:28:37 +01:00
|
|
|
for(int i=0;i<4;i++)
|
|
|
|
{
|
|
|
|
WPAD_Rumble(i, 0);
|
|
|
|
rumbleCount[i] = 0;
|
2009-10-27 22:51:31 +01:00
|
|
|
rumbleRequest[i] = 0;
|
2009-03-11 18:28:37 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************
|
|
|
|
* DoRumble
|
|
|
|
***************************************************************************/
|
|
|
|
void DoRumble(int i)
|
|
|
|
{
|
2010-04-17 05:05:03 +02:00
|
|
|
if(CONF_GetPadMotorMode() == 0 || !GCSettings.Rumble) return;
|
|
|
|
|
2009-03-11 18:28:37 +01:00
|
|
|
if(rumbleRequest[i] && rumbleCount[i] < 3)
|
|
|
|
{
|
|
|
|
WPAD_Rumble(i, 1); // rumble on
|
|
|
|
rumbleCount[i]++;
|
|
|
|
}
|
|
|
|
else if(rumbleRequest[i])
|
|
|
|
{
|
|
|
|
rumbleCount[i] = 12;
|
|
|
|
rumbleRequest[i] = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if(rumbleCount[i])
|
|
|
|
rumbleCount[i]--;
|
|
|
|
WPAD_Rumble(i, 0); // rumble off
|
|
|
|
}
|
2008-12-19 23:00:20 +01:00
|
|
|
}
|
2009-03-11 18:28:37 +01:00
|
|
|
#endif
|
2008-08-20 06:07:38 +02:00
|
|
|
|
2008-09-12 07:28:40 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* UpdateCursorPosition
|
|
|
|
*
|
|
|
|
* Updates X/Y coordinates for Superscope/mouse/justifier position
|
|
|
|
***************************************************************************/
|
2009-10-15 08:51:38 +02:00
|
|
|
static void UpdateCursorPosition (int chan, int &pos_x, int &pos_y)
|
2008-08-20 06:07:38 +02:00
|
|
|
{
|
|
|
|
#define SCOPEPADCAL 20
|
2008-08-22 04:47:08 +02:00
|
|
|
|
2008-08-20 06:07:38 +02:00
|
|
|
// gc left joystick
|
|
|
|
|
2018-08-30 23:58:54 +02:00
|
|
|
if (userInput[chan].pad.stickX > ANALOG_SENSITIVITY)
|
2009-10-15 08:51:38 +02:00
|
|
|
{
|
2009-10-15 08:24:09 +02:00
|
|
|
pos_x += (userInput[chan].pad.stickX*1.0)/SCOPEPADCAL;
|
2008-08-20 06:07:38 +02:00
|
|
|
if (pos_x > 256) pos_x = 256;
|
|
|
|
}
|
2018-08-30 23:58:54 +02:00
|
|
|
else if (userInput[chan].pad.stickX < -ANALOG_SENSITIVITY)
|
2009-10-15 08:51:38 +02:00
|
|
|
{
|
2009-10-15 08:24:09 +02:00
|
|
|
pos_x -= (userInput[chan].pad.stickX*-1.0)/SCOPEPADCAL;
|
2008-08-20 06:07:38 +02:00
|
|
|
if (pos_x < 0) pos_x = 0;
|
|
|
|
}
|
|
|
|
|
2018-08-30 23:58:54 +02:00
|
|
|
if (userInput[chan].pad.stickY < -ANALOG_SENSITIVITY)
|
2009-10-15 08:51:38 +02:00
|
|
|
{
|
2009-10-15 08:24:09 +02:00
|
|
|
pos_y += (userInput[chan].pad.stickY*-1.0)/SCOPEPADCAL;
|
2008-08-20 06:07:38 +02:00
|
|
|
if (pos_y > 224) pos_y = 224;
|
|
|
|
}
|
2018-08-30 23:58:54 +02:00
|
|
|
else if (userInput[chan].pad.stickY > ANALOG_SENSITIVITY)
|
2009-10-15 08:51:38 +02:00
|
|
|
{
|
2009-10-15 08:24:09 +02:00
|
|
|
pos_y -= (userInput[chan].pad.stickY*1.0)/SCOPEPADCAL;
|
2008-08-20 06:07:38 +02:00
|
|
|
if (pos_y < 0) pos_y = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef HW_RVL
|
2009-10-15 08:24:09 +02:00
|
|
|
if (userInput[chan].wpad->ir.valid)
|
2008-08-20 06:07:38 +02:00
|
|
|
{
|
2009-10-15 08:24:09 +02:00
|
|
|
pos_x = (userInput[chan].wpad->ir.x * 256) / 640;
|
|
|
|
pos_y = (userInput[chan].wpad->ir.y * 224) / 480;
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-10-15 08:51:38 +02:00
|
|
|
s8 wm_ax = userInput[chan].WPAD_StickX(0);
|
|
|
|
s8 wm_ay = userInput[chan].WPAD_StickY(0);
|
2008-08-20 06:07:38 +02:00
|
|
|
|
2018-08-30 23:58:54 +02:00
|
|
|
if (wm_ax > ANALOG_SENSITIVITY)
|
2009-10-15 08:51:38 +02:00
|
|
|
{
|
2008-08-20 06:07:38 +02:00
|
|
|
pos_x += (wm_ax*1.0)/SCOPEPADCAL;
|
|
|
|
if (pos_x > 256) pos_x = 256;
|
|
|
|
}
|
2018-08-30 23:58:54 +02:00
|
|
|
else if (wm_ax < -ANALOG_SENSITIVITY)
|
2009-10-15 08:51:38 +02:00
|
|
|
{
|
2008-08-20 06:07:38 +02:00
|
|
|
pos_x -= (wm_ax*-1.0)/SCOPEPADCAL;
|
|
|
|
if (pos_x < 0) pos_x = 0;
|
|
|
|
}
|
|
|
|
|
2018-08-30 23:58:54 +02:00
|
|
|
if (wm_ay < -ANALOG_SENSITIVITY)
|
2009-10-15 08:51:38 +02:00
|
|
|
{
|
2008-08-20 06:07:38 +02:00
|
|
|
pos_y += (wm_ay*-1.0)/SCOPEPADCAL;
|
|
|
|
if (pos_y > 224) pos_y = 224;
|
|
|
|
}
|
2018-08-30 23:58:54 +02:00
|
|
|
else if (wm_ay > ANALOG_SENSITIVITY)
|
2009-10-15 08:51:38 +02:00
|
|
|
{
|
2008-08-20 06:07:38 +02:00
|
|
|
pos_y -= (wm_ay*1.0)/SCOPEPADCAL;
|
|
|
|
if (pos_y < 0) pos_y = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************
|
2008-09-12 07:28:40 +02:00
|
|
|
* decodepad
|
|
|
|
*
|
|
|
|
* Reads the changes (buttons pressed, etc) from a controller and reports
|
|
|
|
* these changes to Snes9x
|
2008-10-03 23:52:57 +02:00
|
|
|
***************************************************************************/
|
2009-10-15 08:51:38 +02:00
|
|
|
static void decodepad (int chan)
|
2008-08-20 06:07:38 +02:00
|
|
|
{
|
2008-10-03 23:52:57 +02:00
|
|
|
int i, offset;
|
2008-08-22 04:47:08 +02:00
|
|
|
|
2009-10-15 08:24:09 +02:00
|
|
|
s8 pad_x = userInput[chan].pad.stickX;
|
|
|
|
s8 pad_y = userInput[chan].pad.stickY;
|
|
|
|
u32 jp = userInput[chan].pad.btns_h;
|
2008-08-20 06:07:38 +02:00
|
|
|
|
|
|
|
#ifdef HW_RVL
|
2009-10-15 08:51:38 +02:00
|
|
|
s8 wm_ax = userInput[chan].WPAD_StickX(0);
|
|
|
|
s8 wm_ay = userInput[chan].WPAD_StickY(0);
|
|
|
|
u32 wp = userInput[chan].wpad->btns_h;
|
2018-08-16 17:21:10 +02:00
|
|
|
bool isWUPC = userInput[chan].wpad->exp.classic.type == 2;
|
2008-10-03 23:52:57 +02:00
|
|
|
|
|
|
|
u32 exp_type;
|
2009-10-15 08:24:09 +02:00
|
|
|
if ( WPAD_Probe(chan, &exp_type) != 0 )
|
2008-10-03 23:52:57 +02:00
|
|
|
exp_type = WPAD_EXP_NONE;
|
2018-09-06 03:59:14 +02:00
|
|
|
|
|
|
|
s16 wiidrc_ax = userInput[chan].wiidrcdata.stickX;
|
|
|
|
s16 wiidrc_ay = userInput[chan].wiidrcdata.stickY;
|
|
|
|
u32 wiidrcp = userInput[chan].wiidrcdata.btns_h;
|
2019-08-06 02:22:54 +02:00
|
|
|
|
|
|
|
jp |= Retrode_ButtonsHeld(chan);
|
2019-12-30 20:45:20 +01:00
|
|
|
jp |= XBOX360_ButtonsHeld(chan);
|
2008-08-20 06:07:38 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/***
|
|
|
|
Gamecube Joystick input
|
|
|
|
***/
|
2018-08-30 23:58:54 +02:00
|
|
|
if (pad_y > ANALOG_SENSITIVITY)
|
|
|
|
jp |= PAD_BUTTON_UP;
|
|
|
|
else if (pad_y < -ANALOG_SENSITIVITY)
|
|
|
|
jp |= PAD_BUTTON_DOWN;
|
|
|
|
if (pad_x < -ANALOG_SENSITIVITY)
|
|
|
|
jp |= PAD_BUTTON_LEFT;
|
|
|
|
else if (pad_x > ANALOG_SENSITIVITY)
|
|
|
|
jp |= PAD_BUTTON_RIGHT;
|
2012-02-05 22:31:38 +01:00
|
|
|
|
|
|
|
// Count as pressed if down far enough (~50% down)
|
|
|
|
if (userInput[chan].pad.triggerL > 0x80)
|
|
|
|
jp |= PAD_TRIGGER_L;
|
|
|
|
if (userInput[chan].pad.triggerR > 0x80)
|
|
|
|
jp |= PAD_TRIGGER_R;
|
|
|
|
|
2008-08-20 06:07:38 +02:00
|
|
|
#ifdef HW_RVL
|
|
|
|
/***
|
|
|
|
Wii Joystick (classic, nunchuk) input
|
|
|
|
***/
|
2018-08-30 23:58:54 +02:00
|
|
|
if (wm_ay > ANALOG_SENSITIVITY)
|
|
|
|
wp |= (exp_type == WPAD_EXP_CLASSIC) ? WPAD_CLASSIC_BUTTON_UP : WPAD_BUTTON_UP;
|
|
|
|
else if (wm_ay < -ANALOG_SENSITIVITY)
|
|
|
|
wp |= (exp_type == WPAD_EXP_CLASSIC) ? WPAD_CLASSIC_BUTTON_DOWN : WPAD_BUTTON_DOWN;
|
|
|
|
if (wm_ax < -ANALOG_SENSITIVITY)
|
|
|
|
wp |= (exp_type == WPAD_EXP_CLASSIC) ? WPAD_CLASSIC_BUTTON_LEFT : WPAD_BUTTON_LEFT;
|
|
|
|
else if (wm_ax > ANALOG_SENSITIVITY)
|
|
|
|
wp |= (exp_type == WPAD_EXP_CLASSIC) ? WPAD_CLASSIC_BUTTON_RIGHT : WPAD_BUTTON_RIGHT;
|
2018-09-06 03:59:14 +02:00
|
|
|
|
|
|
|
/* Wii U Gamepad */
|
|
|
|
if (wiidrc_ay > ANALOG_SENSITIVITY)
|
|
|
|
wiidrcp |= WIIDRC_BUTTON_UP;
|
|
|
|
else if (wiidrc_ay < -ANALOG_SENSITIVITY)
|
|
|
|
wiidrcp |= WIIDRC_BUTTON_DOWN;
|
|
|
|
if (wiidrc_ax < -ANALOG_SENSITIVITY)
|
|
|
|
wiidrcp |= WIIDRC_BUTTON_LEFT;
|
|
|
|
else if (wiidrc_ax > ANALOG_SENSITIVITY)
|
|
|
|
wiidrcp |= WIIDRC_BUTTON_RIGHT;
|
2008-08-20 06:07:38 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*** Fix offset to pad ***/
|
2009-10-15 08:24:09 +02:00
|
|
|
offset = ((chan + 1) << 4);
|
2008-08-20 06:07:38 +02:00
|
|
|
|
|
|
|
/*** Report pressed buttons (gamepads) ***/
|
|
|
|
for (i = 0; i < MAXJP; i++)
|
|
|
|
{
|
2009-03-11 18:28:37 +01:00
|
|
|
if ( (jp & btnmap[CTRL_PAD][CTRLR_GCPAD][i]) // gamecube controller
|
2008-08-20 06:07:38 +02:00
|
|
|
#ifdef HW_RVL
|
2009-03-11 18:28:37 +01:00
|
|
|
|| ( (exp_type == WPAD_EXP_NONE) && (wp & btnmap[CTRL_PAD][CTRLR_WIIMOTE][i]) ) // wiimote
|
2018-08-16 17:21:10 +02:00
|
|
|
|| ( (exp_type == WPAD_EXP_CLASSIC && !isWUPC) && (wp & btnmap[CTRL_PAD][CTRLR_CLASSIC][i]) ) // classic controller
|
|
|
|
|| ( (exp_type == WPAD_EXP_CLASSIC && isWUPC) && (wp & btnmap[CTRL_PAD][CTRLR_WUPC][i]) ) // wii u pro controller
|
2009-03-11 18:28:37 +01:00
|
|
|
|| ( (exp_type == WPAD_EXP_NUNCHUK) && (wp & btnmap[CTRL_PAD][CTRLR_NUNCHUK][i]) ) // nunchuk + wiimote
|
2018-09-06 03:59:14 +02:00
|
|
|
|| ( (wiidrcp & btnmap[CTRL_PAD][CTRLR_WIIDRC][i]) ) // Wii U Gamepad
|
2008-08-20 06:07:38 +02:00
|
|
|
#endif
|
|
|
|
)
|
|
|
|
S9xReportButton (offset + i, true);
|
|
|
|
else
|
|
|
|
S9xReportButton (offset + i, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** Superscope ***/
|
2009-10-15 08:24:09 +02:00
|
|
|
if (Settings.SuperScopeMaster && chan == 0) // report only once
|
2008-08-20 06:07:38 +02:00
|
|
|
{
|
|
|
|
// buttons
|
|
|
|
offset = 0x50;
|
2009-05-01 20:30:05 +02:00
|
|
|
for (i = 0; i < 6; i++)
|
2008-08-20 06:07:38 +02:00
|
|
|
{
|
2009-03-11 18:28:37 +01:00
|
|
|
if (jp & btnmap[CTRL_SCOPE][CTRLR_GCPAD][i]
|
2008-08-20 06:07:38 +02:00
|
|
|
#ifdef HW_RVL
|
2009-03-11 18:28:37 +01:00
|
|
|
|| wp & btnmap[CTRL_SCOPE][CTRLR_WIIMOTE][i]
|
2019-08-13 23:11:03 +02:00
|
|
|
|| wp & btnmap[CTRL_SCOPE][CTRLR_CLASSIC][i]
|
|
|
|
|| wp & btnmap[CTRL_SCOPE][CTRLR_WUPC][i]
|
|
|
|
|| wiidrcp & btnmap[CTRL_SCOPE][CTRLR_WIIDRC][i]
|
2008-08-20 06:07:38 +02:00
|
|
|
#endif
|
2008-10-03 23:52:57 +02:00
|
|
|
)
|
2008-11-07 07:51:05 +01:00
|
|
|
{
|
2009-05-01 20:30:05 +02:00
|
|
|
if(i == 3 || i == 4) // turbo
|
|
|
|
{
|
|
|
|
if((i == 3 && scopeTurbo == 1) || // turbo ON already, don't change
|
|
|
|
(i == 4 && scopeTurbo == 0)) // turbo OFF already, don't change
|
|
|
|
{
|
|
|
|
S9xReportButton(offset + i, false);
|
|
|
|
}
|
|
|
|
else // turbo changed to ON or OFF
|
|
|
|
{
|
|
|
|
scopeTurbo = 4-i;
|
|
|
|
S9xReportButton(offset + i, true);
|
|
|
|
}
|
|
|
|
}
|
2008-11-07 07:51:05 +01:00
|
|
|
else
|
|
|
|
S9xReportButton(offset + i, true);
|
|
|
|
}
|
2008-10-03 23:52:57 +02:00
|
|
|
else
|
|
|
|
S9xReportButton(offset + i, false);
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
// pointer
|
|
|
|
offset = 0x80;
|
2009-10-15 08:24:09 +02:00
|
|
|
UpdateCursorPosition(chan, cursor_x[0], cursor_y[0]);
|
2008-10-03 23:52:57 +02:00
|
|
|
S9xReportPointer(offset, (u16) cursor_x[0], (u16) cursor_y[0]);
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
/*** Mouse ***/
|
2009-10-15 08:24:09 +02:00
|
|
|
else if (Settings.MouseMaster && chan == 0)
|
2008-08-20 06:07:38 +02:00
|
|
|
{
|
|
|
|
// buttons
|
2009-10-15 08:24:09 +02:00
|
|
|
offset = 0x60 + (2 * chan);
|
2008-08-20 06:07:38 +02:00
|
|
|
for (i = 0; i < 2; i++)
|
|
|
|
{
|
2009-03-11 18:28:37 +01:00
|
|
|
if (jp & btnmap[CTRL_MOUSE][CTRLR_GCPAD][i]
|
2008-08-20 06:07:38 +02:00
|
|
|
#ifdef HW_RVL
|
2009-03-11 18:28:37 +01:00
|
|
|
|| wp & btnmap[CTRL_MOUSE][CTRLR_WIIMOTE][i]
|
2019-08-13 23:11:03 +02:00
|
|
|
|| wp & btnmap[CTRL_MOUSE][CTRLR_CLASSIC][i]
|
|
|
|
|| wp & btnmap[CTRL_MOUSE][CTRLR_WUPC][i]
|
|
|
|
|| wiidrcp & btnmap[CTRL_MOUSE][CTRLR_WIIDRC][i]
|
2008-08-20 06:07:38 +02:00
|
|
|
#endif
|
2008-10-03 23:52:57 +02:00
|
|
|
)
|
|
|
|
S9xReportButton(offset + i, true);
|
|
|
|
else
|
|
|
|
S9xReportButton(offset + i, false);
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
// pointer
|
|
|
|
offset = 0x81;
|
2009-10-15 08:24:09 +02:00
|
|
|
UpdateCursorPosition(chan, cursor_x[1 + chan], cursor_y[1 + chan]);
|
|
|
|
S9xReportPointer(offset + chan, (u16) cursor_x[1 + chan],
|
|
|
|
(u16) cursor_y[1 + chan]);
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
/*** Justifier ***/
|
2009-10-15 08:24:09 +02:00
|
|
|
else if (Settings.JustifierMaster && chan < 2)
|
2008-08-20 06:07:38 +02:00
|
|
|
{
|
|
|
|
// buttons
|
2009-10-15 08:24:09 +02:00
|
|
|
offset = 0x70 + (3 * chan);
|
2008-08-20 06:07:38 +02:00
|
|
|
for (i = 0; i < 3; i++)
|
|
|
|
{
|
2009-03-11 18:28:37 +01:00
|
|
|
if (jp & btnmap[CTRL_JUST][CTRLR_GCPAD][i]
|
2008-08-20 06:07:38 +02:00
|
|
|
#ifdef HW_RVL
|
2009-03-11 18:28:37 +01:00
|
|
|
|| wp & btnmap[CTRL_JUST][CTRLR_WIIMOTE][i]
|
2019-08-13 23:11:03 +02:00
|
|
|
|| wp & btnmap[CTRL_JUST][CTRLR_CLASSIC][i]
|
|
|
|
|| wp & btnmap[CTRL_JUST][CTRLR_WUPC][i]
|
|
|
|
|| wiidrcp & btnmap[CTRL_JUST][CTRLR_WIIDRC][i]
|
2008-08-20 06:07:38 +02:00
|
|
|
#endif
|
2008-10-03 23:52:57 +02:00
|
|
|
)
|
|
|
|
S9xReportButton(offset + i, true);
|
|
|
|
else
|
|
|
|
S9xReportButton(offset + i, false);
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
// pointer
|
|
|
|
offset = 0x83;
|
2009-10-15 08:24:09 +02:00
|
|
|
UpdateCursorPosition(chan, cursor_x[3 + chan], cursor_y[3 + chan]);
|
|
|
|
S9xReportPointer(offset + chan, (u16) cursor_x[3 + chan],
|
|
|
|
(u16) cursor_y[3 + chan]);
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
2009-03-11 18:28:37 +01:00
|
|
|
|
2009-01-30 03:20:43 +01:00
|
|
|
#ifdef HW_RVL
|
|
|
|
// screenshot (temp)
|
|
|
|
if (wp & CLASSIC_CTRL_BUTTON_ZR)
|
|
|
|
S9xReportButton(0x90, true);
|
|
|
|
else
|
|
|
|
S9xReportButton(0x90, false);
|
|
|
|
#endif
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
|
2009-05-28 06:16:41 +02:00
|
|
|
bool MenuRequested()
|
|
|
|
{
|
|
|
|
for(int i=0; i<4; i++)
|
|
|
|
{
|
|
|
|
if (
|
2019-04-19 21:05:52 +02:00
|
|
|
(userInput[i].pad.substickX < -70) ||
|
|
|
|
(userInput[i].pad.btns_h & PAD_TRIGGER_L &&
|
|
|
|
userInput[i].pad.btns_h & PAD_TRIGGER_R &&
|
2019-04-21 17:35:06 +02:00
|
|
|
userInput[i].pad.btns_h & PAD_BUTTON_START)
|
2016-02-06 22:40:46 +01:00
|
|
|
#ifdef HW_RVL
|
|
|
|
|| (userInput[i].wpad->btns_h & WPAD_BUTTON_HOME) ||
|
2018-09-06 03:59:14 +02:00
|
|
|
(userInput[i].wpad->btns_h & WPAD_CLASSIC_BUTTON_HOME) ||
|
|
|
|
(userInput[i].wiidrcdata.btns_h & WIIDRC_BUTTON_HOME)
|
2016-02-06 22:40:46 +01:00
|
|
|
#endif
|
2009-05-28 06:16:41 +02:00
|
|
|
)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2008-08-20 06:07:38 +02:00
|
|
|
/****************************************************************************
|
2010-04-01 23:34:35 +02:00
|
|
|
* ReportButtons
|
2008-09-12 07:28:40 +02:00
|
|
|
*
|
2008-08-20 06:07:38 +02:00
|
|
|
* Called on each rendered frame
|
2008-09-12 07:28:40 +02:00
|
|
|
* Our way of putting controller input into Snes9x
|
|
|
|
***************************************************************************/
|
2010-04-01 23:34:35 +02:00
|
|
|
void ReportButtons ()
|
2008-08-20 06:07:38 +02:00
|
|
|
{
|
2009-04-13 10:43:50 +02:00
|
|
|
int i, j;
|
|
|
|
|
2009-06-27 22:03:15 +02:00
|
|
|
UpdatePads();
|
2016-12-09 01:51:57 +01:00
|
|
|
|
2018-08-21 16:38:50 +02:00
|
|
|
Settings.TurboMode = (
|
2009-04-15 05:26:27 +02:00
|
|
|
userInput[0].pad.substickX > 70 ||
|
2018-09-06 03:59:14 +02:00
|
|
|
userInput[0].WPAD_StickX(1) > 70 ||
|
|
|
|
userInput[0].wiidrcdata.substickX > 45
|
2009-04-13 10:43:50 +02:00
|
|
|
); // RIGHT on c-stick and on classic controller right joystick
|
2016-12-09 01:51:57 +01:00
|
|
|
|
2018-08-21 16:38:50 +02:00
|
|
|
if(Settings.TurboMode) {
|
|
|
|
Settings.SoundSync = false;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
Settings.SoundSync = soundSync;
|
|
|
|
}
|
|
|
|
|
2009-04-13 10:43:50 +02:00
|
|
|
/* Check for menu:
|
|
|
|
* CStick left
|
2019-04-21 17:35:06 +02:00
|
|
|
* OR "L+R+START" (eg. Homebrew/Adapted SNES controllers)
|
2009-04-13 10:43:50 +02:00
|
|
|
* OR "Home" on the wiimote or classic controller
|
2009-06-27 22:03:15 +02:00
|
|
|
* OR Left on classic right analog stick
|
2009-04-13 10:43:50 +02:00
|
|
|
*/
|
2009-05-28 06:16:41 +02:00
|
|
|
if(MenuRequested())
|
|
|
|
ScreenshotRequested = 1; // go to the menu
|
2008-08-20 06:07:38 +02:00
|
|
|
|
2009-04-13 10:43:50 +02:00
|
|
|
j = (Settings.MultiPlayer5Master == true ? 4 : 2);
|
2008-08-20 06:07:38 +02:00
|
|
|
|
2009-04-13 10:43:50 +02:00
|
|
|
for (i = 0; i < j; i++)
|
|
|
|
decodepad (i);
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
|
2009-03-28 20:03:35 +01:00
|
|
|
void SetControllers()
|
2008-08-20 06:07:38 +02:00
|
|
|
{
|
|
|
|
if (Settings.MultiPlayer5Master == true)
|
|
|
|
{
|
|
|
|
S9xSetController (0, CTL_JOYPAD, 0, 0, 0, 0);
|
|
|
|
S9xSetController (1, CTL_MP5, 1, 2, 3, -1);
|
|
|
|
}
|
|
|
|
else if (Settings.SuperScopeMaster == true)
|
|
|
|
{
|
|
|
|
S9xSetController (0, CTL_JOYPAD, 0, 0, 0, 0);
|
2009-04-15 07:55:17 +02:00
|
|
|
S9xSetController (1, CTL_SUPERSCOPE, 0, 0, 0, 0);
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
else if (Settings.MouseMaster == true)
|
|
|
|
{
|
|
|
|
S9xSetController (0, CTL_MOUSE, 0, 0, 0, 0);
|
2009-03-11 18:28:37 +01:00
|
|
|
S9xSetController (1, CTL_JOYPAD, 1, 0, 0, 0);
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
else if (Settings.JustifierMaster == true)
|
|
|
|
{
|
2008-10-21 18:43:18 +02:00
|
|
|
S9xSetController (0, CTL_JOYPAD, 0, 0, 0, 0);
|
2009-03-11 18:28:37 +01:00
|
|
|
S9xSetController(1, CTL_JUSTIFIER, 1, 0, 0, 0);
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Plugin 2 Joypads by default
|
|
|
|
S9xSetController (0, CTL_JOYPAD, 0, 0, 0, 0);
|
|
|
|
S9xSetController (1, CTL_JOYPAD, 1, 0, 0, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************************************************
|
2010-04-01 23:34:35 +02:00
|
|
|
* Set the default mapping
|
2008-09-12 07:28:40 +02:00
|
|
|
***************************************************************************/
|
2008-08-20 06:07:38 +02:00
|
|
|
void SetDefaultButtonMap ()
|
|
|
|
{
|
2009-03-28 20:03:35 +01:00
|
|
|
int maxcode = 0x10;
|
|
|
|
s9xcommand_t cmd;
|
2008-08-20 06:07:38 +02:00
|
|
|
|
|
|
|
/*** Joypad 1 ***/
|
2009-03-28 20:03:35 +01:00
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 A");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 B");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 X");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 Y");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 L");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 R");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 Start");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 Select");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 Up");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 Down");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 Left");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad1 Right");
|
|
|
|
|
|
|
|
maxcode = 0x20;
|
2008-08-20 06:07:38 +02:00
|
|
|
/*** Joypad 2 ***/
|
2009-03-28 20:03:35 +01:00
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 A");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 B");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 X");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 Y");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 L");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 R");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 Start");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 Select");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 Up");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 Down");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 Left");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad2 Right");
|
|
|
|
|
|
|
|
maxcode = 0x30;
|
2008-08-20 06:07:38 +02:00
|
|
|
/*** Joypad 3 ***/
|
2009-03-28 20:03:35 +01:00
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 A");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 B");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 X");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 Y");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 L");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 R");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 Start");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 Select");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 Up");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 Down");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 Left");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad3 Right");
|
|
|
|
|
|
|
|
maxcode = 0x40;
|
2008-08-20 06:07:38 +02:00
|
|
|
/*** Joypad 4 ***/
|
2009-03-28 20:03:35 +01:00
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 A");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 B");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 X");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 Y");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 L");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 R");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 Start");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 Select");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 Up");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 Down");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 Left");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 Right");
|
|
|
|
|
|
|
|
maxcode = 0x50;
|
2008-08-20 06:07:38 +02:00
|
|
|
/*** Superscope ***/
|
2009-03-28 20:03:35 +01:00
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope Fire");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope AimOffscreen");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope Cursor");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope ToggleTurbo");
|
2009-05-01 20:30:05 +02:00
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope ToggleTurbo");
|
2009-03-28 20:03:35 +01:00
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope Pause");
|
|
|
|
|
|
|
|
maxcode = 0x60;
|
2008-08-20 06:07:38 +02:00
|
|
|
/*** Mouse ***/
|
2009-03-28 20:03:35 +01:00
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Mouse1 L");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Mouse1 R");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Mouse2 L");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Mouse2 R");
|
2008-08-20 06:07:38 +02:00
|
|
|
|
2009-03-28 20:03:35 +01:00
|
|
|
maxcode = 0x70;
|
2008-08-20 06:07:38 +02:00
|
|
|
/*** Justifier ***/
|
2009-03-28 20:03:35 +01:00
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Justifier1 Trigger");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Justifier1 AimOffscreen");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Justifier1 Start");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Justifier2 Trigger");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Justifier2 AimOffscreen");
|
|
|
|
ASSIGN_BUTTON_FALSE (maxcode++, "Justifier2 Start");
|
|
|
|
|
|
|
|
maxcode = 0x80;
|
|
|
|
S9xMapPointer(maxcode++, S9xGetCommandT("Pointer Superscope"), false);
|
|
|
|
S9xMapPointer(maxcode++, S9xGetCommandT("Pointer Mouse1"), false);
|
|
|
|
S9xMapPointer(maxcode++, S9xGetCommandT("Pointer Mouse2"), false);
|
|
|
|
S9xMapPointer(maxcode++, S9xGetCommandT("Pointer Justifier1"), false);
|
|
|
|
S9xMapPointer(maxcode++, S9xGetCommandT("Pointer Justifier2"), false);
|
|
|
|
|
|
|
|
maxcode = 0x90;
|
2010-01-27 23:08:56 +01:00
|
|
|
//ASSIGN_BUTTON_FALSE (maxcode++, "Screenshot");
|
2009-03-28 20:03:35 +01:00
|
|
|
|
|
|
|
SetControllers();
|
2008-08-20 06:07:38 +02:00
|
|
|
}
|
2019-12-30 20:45:20 +01:00
|
|
|
|
|
|
|
char* GetUSBControllerInfo()
|
|
|
|
{
|
|
|
|
static char info[50];
|
|
|
|
snprintf(info, 50, "Retrode: %s, XBOX360: %s", Retrode_Status(), XBOX360_Status());
|
|
|
|
return info;
|
|
|
|
}
|