blob: b4b4a4e991ad565ad7ffe977b409c971cd305a15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#import "nes/app/input/input-device-controller.hh"
#import <GameController/GameController.h>
namespace nes::app::mac
{
/// Input device wrapping a GCExtendedGamepad.
class input_device_gc_gamepad final : public input_device_controller
{
GCExtendedGamepad* profile_;
public:
explicit input_device_gc_gamepad(GCExtendedGamepad* profile);
auto is_reliable() const -> bool override { return true; }
auto get_controller() const -> GCController* { return [profile_ controller]; }
auto get_name() const -> std::string_view override;
auto get_index() const -> index override;
auto set_index(index) -> void override;
auto read_buttons() -> sys::button_mask override;
};
} // namespace nes::app::mac
|