Merge pull request #8159 from booto/swap_thing

SI_DeviceGCAdapter: Stop it being detected as a steering wheel when there is no device
This commit is contained in:
Léo Lam 2019-06-06 12:24:24 +02:00 committed by GitHub
commit 90e3b88f14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@
#include <cstring>
#include "Common/CommonTypes.h"
#include "Common/Swap.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/HW/GCPad.h"
@ -60,7 +61,7 @@ int CSIDevice_GCAdapter::RunBuffer(u8* buffer, int length)
// into this port on the hardware gc adapter, exposing it to the game.
if (!GCAdapter::DeviceConnected(m_device_number))
{
TSIDevices device = SI_NONE;
u32 device = Common::swap32(SI_NONE);
memcpy(buffer, &device, sizeof(device));
return 4;
}