mirror of https://github.com/PCSX2/pcsx2.git
LilyPad, Sio.cpp both modified to never allow pads in first slot on either port to be unplugged, as it broke things. Unplugging pads from other slots seems to work fine, when using multitap (When not, obviously no such pads in the first place).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1034 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
50c4a95c06
commit
cb57386d85
|
@ -152,7 +152,6 @@ void SIO_CommandWrite(u8 value,int way) {
|
|||
case 3:
|
||||
// No pad connected.
|
||||
sio.parp++;
|
||||
sio.bufcount = 6;
|
||||
if (sio.parp == sio.bufcount) { sio.padst = 0; return; }
|
||||
SIO_INT();
|
||||
return;
|
||||
|
@ -508,7 +507,7 @@ void InitializeSIO(u8 value)
|
|||
sio.StatReg &= ~TX_EMPTY; // Now the Buffer is not empty
|
||||
sio.StatReg |= RX_RDY; // Transfer is Ready
|
||||
|
||||
sio.bufcount = 2;
|
||||
sio.bufcount = 4; // Default size, when no pad connected.
|
||||
sio.parp = 0;
|
||||
sio.padst = 1;
|
||||
sio.packetsize = 1;
|
||||
|
@ -517,7 +516,7 @@ void InitializeSIO(u8 value)
|
|||
|
||||
switch (sio.CtrlReg&0x2002) {
|
||||
case 0x0002:
|
||||
if (!PAD1setSlot(1, 1+sio.activePadSlot[0])) {
|
||||
if (!PAD1setSlot(1, 1+sio.activePadSlot[0]) && sio.activePadSlot[0]) {
|
||||
// Pad is not present. Don't send poll, just return a bunch of 0's.
|
||||
sio2.packet.recvVal1 = 0x1D100;
|
||||
sio.padst = 3;
|
||||
|
@ -527,7 +526,7 @@ void InitializeSIO(u8 value)
|
|||
}
|
||||
break;
|
||||
case 0x2002:
|
||||
if (!PAD2setSlot(2, 1+sio.activePadSlot[1])) {
|
||||
if (!PAD2setSlot(2, 1+sio.activePadSlot[1]) && sio.activePadSlot[1]) {
|
||||
// Pad is not present. Don't send poll, just return a bunch of 0's.
|
||||
sio2.packet.recvVal1 = 0x1D100;
|
||||
sio.padst = 3;
|
||||
|
|
|
@ -1615,7 +1615,7 @@ void UpdatePadList(HWND hWnd) {
|
|||
int slot;
|
||||
int port;
|
||||
int index = 0;
|
||||
wchar_t *padTypes[] = {L"Disabled", L"Dualshock 2", L"Guitar"};
|
||||
wchar_t *padTypes[] = {L"Unplugged", L"Dualshock 2", L"Guitar"};
|
||||
for (port=0; port<2; port++) {
|
||||
for (slot = 0; slot<4; slot++) {
|
||||
wchar_t text[20];
|
||||
|
@ -1635,6 +1635,9 @@ void UpdatePadList(HWND hWnd) {
|
|||
item.iSubItem = 1;
|
||||
if (2 < (unsigned int)config.padConfigs[port][slot].type) config.padConfigs[port][slot].type = Dualshock2Pad;
|
||||
item.pszText = padTypes[config.padConfigs[port][slot].type];
|
||||
if (!slot && !config.padConfigs[port][slot].type)
|
||||
item.pszText = L"Unplugged (Kinda)";
|
||||
|
||||
ListView_SetItem(hWndList, &item);
|
||||
|
||||
item.iSubItem = 2;
|
||||
|
@ -1683,7 +1686,7 @@ INT_PTR CALLBACK GeneralDialogProc(HWND hWnd, unsigned int msg, WPARAM wParam, L
|
|||
c.cx = 50;
|
||||
c.pszText = L"Pad";
|
||||
ListView_InsertColumn(hWndList, 0, &c);
|
||||
c.cx = 90;
|
||||
c.cx = 120;
|
||||
c.pszText = L"Type";
|
||||
ListView_InsertColumn(hWndList, 1, &c);
|
||||
c.cx = 70;
|
||||
|
|
|
@ -1419,5 +1419,6 @@ s32 CALLBACK PADsetSlot(u8 port, u8 slot) {
|
|||
}
|
||||
// Even if no pad there, record the slot, as it is the active slot regardless.
|
||||
slots[port] = slot;
|
||||
return pads[port][slot].enabled;
|
||||
// First slot always allowed.
|
||||
return pads[port][slot].enabled | !slot;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue