2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "games/GameTypes.h"
12 #include "games/addons/GameClientCallbacks.h"
13 #include "peripherals/PeripheralTypes.h"
26 class CRetroPlayerInput
: public GAME::IGameInputCallback
29 CRetroPlayerInput(PERIPHERALS::CPeripherals
& peripheralManager
,
30 CRPProcessInfo
& processInfo
,
31 GAME::GameClientPtr gameClient
);
32 ~CRetroPlayerInput() override
;
34 // Lifecycle functions
35 void StartAgentManager();
36 void StopAgentManager();
39 void SetSpeed(double speed
);
40 void EnableInput(bool bEnabled
);
42 // implementation of IGameInputCallback
43 bool AcceptsInput() const override
{ return m_bEnabled
; }
44 void PollInput() override
;
47 // Construction parameters
48 PERIPHERALS::CPeripherals
& m_peripheralManager
;
49 CRPProcessInfo
& m_processInfo
;
52 PERIPHERALS::EventPollHandlePtr m_inputPollHandle
;
53 bool m_bEnabled
= false;
56 const GAME::GameClientPtr m_gameClient
;
57 bool m_bAgentManagerStarted
{false};