2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2014-12-10 09:45:45 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2015-04-26 21:53:36 +00:00
|
|
|
#include <functional>
|
2015-01-26 12:54:54 +00:00
|
|
|
|
2016-01-13 03:34:13 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
2015-05-08 21:28:03 +00:00
|
|
|
struct GCPadStatus;
|
2014-12-10 09:45:45 +00:00
|
|
|
|
2015-12-31 17:09:47 +00:00
|
|
|
namespace GCAdapter
|
2014-12-10 09:45:45 +00:00
|
|
|
{
|
|
|
|
void Init();
|
2015-11-08 17:13:58 +00:00
|
|
|
void ResetRumble();
|
2014-12-10 09:45:45 +00:00
|
|
|
void Shutdown();
|
2015-04-26 21:53:36 +00:00
|
|
|
void SetAdapterCallback(std::function<void(void)> func);
|
|
|
|
void StartScanThread();
|
|
|
|
void StopScanThread();
|
2022-10-10 04:28:14 +00:00
|
|
|
|
|
|
|
// Buttons have PAD_GET_ORIGIN set on new connection
|
|
|
|
// Netplay and CSIDevice_GCAdapter make use of this.
|
2016-08-02 01:16:00 +00:00
|
|
|
GCPadStatus Input(int chan);
|
2022-10-10 04:28:14 +00:00
|
|
|
|
2014-12-13 05:14:18 +00:00
|
|
|
void Output(int chan, u8 rumble_command);
|
2018-07-17 20:31:18 +00:00
|
|
|
bool IsDetected(const char** error_message);
|
2015-12-31 17:09:47 +00:00
|
|
|
bool DeviceConnected(int chan);
|
2019-03-29 11:15:58 +00:00
|
|
|
void ResetDeviceType(int chan);
|
2015-12-31 17:09:47 +00:00
|
|
|
bool UseAdapter();
|
2014-12-10 09:45:45 +00:00
|
|
|
|
2021-06-07 08:55:52 +00:00
|
|
|
} // namespace GCAdapter
|