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