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