mirror of
https://github.com/libretro/parallel-gx1.git
synced 2026-11-09 11:31:31 -10:00
Every std::mutex, lock_guard, unique_lock, scoped_lock, condition_variable, call_once and semaphore left in Source/Core is replaced by a lock-free design: - Input: the device list, control bindings, stick calibration and default device are published snapshots read under a quiesce; a rebind requested while another thread is rebinding is handed to that thread instead of waited for. - WiimoteReal: the pool thread owns the slots and runs commands from an MPSC queue; the active Wiimotes are atomic slots. - EXI/SI/IOS devices: socket and packet traffic goes through SPSC rings or MPSC handoffs owned by one thread; USB scanning publishes its device list, and libusb transfers drain through a CallGate. - Memory cards: the flush thread applies change records queued by the CPU thread. - Custom assets: loads are scheduled as a published batch with an atomic cursor, results come back over an MPSC stack, and busy assets are skipped and retried. - D3D state and GL program caches use insert-only atomic maps (Common/AtomicHashMap.h). - Logging appends with O_APPEND / FILE_APPEND_DATA; FatFs reports busy instead of waiting; per-socket WSAStartup/WSACleanup. Deleted as unused by the libretro core: the profiler, the FIFO recorder, the volume verifier, the touch InputOverrider and the GameCube adapter's libusb path.
58 lines
859 B
C++
58 lines
859 B
C++
// Copyright 2014 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "InputCommon/GCAdapter.h"
|
|
|
|
#include "InputCommon/GCPadStatus.h"
|
|
|
|
// The libretro core reaches no USB adapter: the libusb and Android Java paths belonged to the
|
|
// standalone builds. A libretro frontend owns the controllers, so an adapter configured on a
|
|
// port simply never reports one connected.
|
|
namespace GCAdapter
|
|
{
|
|
void Init()
|
|
{
|
|
}
|
|
|
|
void Shutdown()
|
|
{
|
|
}
|
|
|
|
void SetAdapterCallback(std::function<void(void)> func)
|
|
{
|
|
}
|
|
|
|
GCPadStatus Input(int chan)
|
|
{
|
|
return {};
|
|
}
|
|
|
|
bool DeviceConnected(int chan)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void ResetDeviceType(int chan)
|
|
{
|
|
}
|
|
|
|
void ResetRumble()
|
|
{
|
|
}
|
|
|
|
void Output(int chan, u8 rumble_command)
|
|
{
|
|
}
|
|
|
|
bool IsDetected(const char** error_message)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
double GetCurrentPollRate()
|
|
{
|
|
return 0.0;
|
|
}
|
|
|
|
} // namespace GCAdapter
|