Skip to content

Commit 18209d3

Browse files
committed
KeyboardManager inherits KeyboardEventHandler
1 parent 36615ce commit 18209d3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

SerialPrograms/Source/Controllers/KeyboardInput/KeyboardEventHandler.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
#include "Common/Cpp/Containers/Pimpl.h"
1212
#include "Common/Cpp/Time.h"
1313
#include "Common/Cpp/LifetimeSanitizer.h"
14-
#include "NintendoSwitch/Controllers/NintendoSwitch_VirtualControllerState.h"
1514

1615
namespace PokemonAutomation{
1716

17+
namespace NintendoSwitch{
18+
class ProControllerState; // forward declaration to avoid circular dependency
19+
}
20+
1821
class KeyboardEventHandler{
1922
public:
2023
KeyboardEventHandler();

SerialPrograms/Source/Controllers/KeyboardInput/KeyboardInput.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "Common/Cpp/Concurrency/SpinLock.h"
1515
#include "Controllers/Controller.h"
1616
#include "Controllers/KeyboardInput/GlobalQtKeyMap.h"
17+
#include "KeyboardEventHandler.h"
1718
#include "KeyboardStateTracker.h"
1819

1920
class QKeyEvent;
@@ -86,7 +87,7 @@ class KeyboardInputController{
8687

8788

8889
template <typename StateType, typename DeltaType>
89-
class KeyboardManager : public KeyboardInputController{
90+
class KeyboardManager : public KeyboardInputController, public KeyboardEventHandler{
9091
public:
9192
KeyboardManager(Logger& logger, AbstractController& controller)
9293
: KeyboardInputController(logger, true)

0 commit comments

Comments
 (0)