mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-25 18:46:55 +01:00
vpad: Keep second channel empty if no extra GamePad is configured
This commit is contained in:
parent
294a6de779
commit
958137a301
@ -494,7 +494,6 @@ void padscoreExport_KPADReadEx(PPCInterpreter_t* hCPU)
|
|||||||
osLib_returnFromFunction(hCPU, samplesRead);
|
osLib_returnFromFunction(hCPU, samplesRead);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool debugUseDRC1 = true;
|
|
||||||
void padscoreExport_KPADRead(PPCInterpreter_t* hCPU)
|
void padscoreExport_KPADRead(PPCInterpreter_t* hCPU)
|
||||||
{
|
{
|
||||||
ppcDefineParamU32(channel, 0);
|
ppcDefineParamU32(channel, 0);
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
|
|
||||||
extern bool isLaunchTypeELF;
|
extern bool isLaunchTypeELF;
|
||||||
|
|
||||||
bool debugUseDRC = true;
|
|
||||||
VPADDir g_vpadGyroDirOverwrite[VPAD_MAX_CONTROLLERS] =
|
VPADDir g_vpadGyroDirOverwrite[VPAD_MAX_CONTROLLERS] =
|
||||||
{
|
{
|
||||||
{{1.0f,0.0f,0.0f}, {0.0f,1.0f,0.0f}, {0.0f, 0.0f, 0.1f}},
|
{{1.0f,0.0f,0.0f}, {0.0f,1.0f,0.0f}, {0.0f, 0.0f, 0.1f}},
|
||||||
@ -240,19 +239,20 @@ namespace vpad
|
|||||||
status->tpProcessed2.validity = VPAD_TP_VALIDITY_INVALID_XY;
|
status->tpProcessed2.validity = VPAD_TP_VALIDITY_INVALID_XY;
|
||||||
|
|
||||||
const auto controller = InputManager::instance().get_vpad_controller(channel);
|
const auto controller = InputManager::instance().get_vpad_controller(channel);
|
||||||
if (!controller || debugUseDRC == false)
|
if (!controller)
|
||||||
|
{
|
||||||
|
// most games expect the Wii U GamePad to be connected, so even if the user has not set it up we should still return empty samples for channel 0
|
||||||
|
if(channel != 0)
|
||||||
{
|
{
|
||||||
// no controller
|
|
||||||
if (error)
|
if (error)
|
||||||
*error = VPAD_READ_ERR_NONE; // VPAD_READ_ERR_NO_DATA; // VPAD_READ_ERR_NO_CONTROLLER;
|
*error = VPAD_READ_ERR_NO_CONTROLLER;
|
||||||
|
if (length > 0)
|
||||||
return 1;
|
status->vpadErr = -1;
|
||||||
//osLib_returnFromFunction(hCPU, 1); return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if (error)
|
||||||
if (channel != 0)
|
*error = VPAD_READ_ERR_NONE;
|
||||||
{
|
return 1;
|
||||||
debugBreakpoint();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool vpadDelayEnabled = ActiveSettings::VPADDelayEnabled();
|
const bool vpadDelayEnabled = ActiveSettings::VPADDelayEnabled();
|
||||||
@ -274,9 +274,7 @@ namespace vpad
|
|||||||
// not ready yet
|
// not ready yet
|
||||||
if (error)
|
if (error)
|
||||||
*error = VPAD_READ_ERR_NONE;
|
*error = VPAD_READ_ERR_NONE;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
//osLib_returnFromFunction(hCPU, 0); return;
|
|
||||||
}
|
}
|
||||||
else if (dif <= ESPRESSO_TIMER_CLOCK)
|
else if (dif <= ESPRESSO_TIMER_CLOCK)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user