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