Skip to content

Commit

Permalink
- Fix input type
Browse files Browse the repository at this point in the history
  • Loading branch information
emukidid committed Oct 26, 2023
1 parent 81706c6 commit 82b9412
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Gamecube/GamecubeMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ char smbPassWord[CONFIG_STRING_SIZE];
char smbShareName[CONFIG_STRING_SIZE];
char smbIpAddr[CONFIG_STRING_SIZE];

int in_type[8] = {
PSE_PAD_TYPE_NONE, PSE_PAD_TYPE_NONE,
PSE_PAD_TYPE_NONE, PSE_PAD_TYPE_NONE,
PSE_PAD_TYPE_NONE, PSE_PAD_TYPE_NONE,
PSE_PAD_TYPE_NONE, PSE_PAD_TYPE_NONE
};

extern "C" int stop;

static struct {
Expand Down Expand Up @@ -317,6 +324,7 @@ void loadSettings(int argc, char *argv[])
Config.SlowBoot = LoadCdBios;
spu_config.iVolume = 1024 - (volume * 192); //Volume="medium" in PEOPSspu
spu_config.iUseReverb = reverb;
in_type[0] = in_type[1] = (controllerType == CONTROLLERTYPE_ANALOG ? PSE_PAD_TYPE_ANALOGPAD : (controllerType == CONTROLLERTYPE_STANDARD ? PSE_PAD_TYPE_STANDARD : PSE_PAD_TYPE_GUNCON));

}

Expand Down Expand Up @@ -676,14 +684,6 @@ void pl_gun_byte2(int port, unsigned char byte)
}


/* TODO: Should be populated properly */
int in_type[8] = {
PSE_PAD_TYPE_NONE, PSE_PAD_TYPE_NONE,
PSE_PAD_TYPE_NONE, PSE_PAD_TYPE_NONE,
PSE_PAD_TYPE_NONE, PSE_PAD_TYPE_NONE,
PSE_PAD_TYPE_NONE, PSE_PAD_TYPE_NONE
};

/* 0x000000 -> 0x200000: RAM (2 MiB)
* 0x200000 -> 0x210000: Parallel port (64 KiB)
* 0x210000 -> 0x220000: Scratchpad + I/O registers
Expand Down
5 changes: 5 additions & 0 deletions Gamecube/menu/SettingsFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@
#include "../wiiSXconfig.h"

#include <libpcsxcore/psxcommon.h>
#include <psemu_plugin_defs.h>

extern "C" {
#include "../../pcsx_rearmed/plugins/dfsound/spu_config.h"
#include "../gc_input/controller.h"
#include "../fileBrowser/fileBrowser.h"
#include "../fileBrowser/fileBrowser-libfat.h"
#include "../fileBrowser/fileBrowser-CARD.h"
extern int in_type[8];
}

extern void Func_SetPlayGame();
Expand Down Expand Up @@ -1112,18 +1114,21 @@ void Func_PsxTypeStandard()
{
SelectBtnInGroup(BTN_PAD_STANDARD, LBL_INPUT_CONT_TYPE);
controllerType = CONTROLLERTYPE_STANDARD;
in_type[0] = in_type[1] = PSE_PAD_TYPE_STANDARD;
}

void Func_PsxTypeAnalog()
{
SelectBtnInGroup(BTN_PAD_ANALOG, LBL_INPUT_CONT_TYPE);
controllerType = CONTROLLERTYPE_ANALOG;
in_type[0] = in_type[1] = PSE_PAD_TYPE_ANALOGPAD;
}

void Func_PsxTypeLightgun()
{
SelectBtnInGroup(BTN_PAD_GUN, LBL_INPUT_CONT_TYPE);
controllerType = CONTROLLERTYPE_LIGHTGUN;
in_type[0] = in_type[1] = PSE_PAD_TYPE_GUNCON;
}

void Func_DisableRumbleYes()
Expand Down

0 comments on commit 82b9412

Please sign in to comment.