summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers/keyboard.h
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-09-21 00:18:40 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:22 +0100
commit5a785ed794fff8c944283271bf25cb835c11700a (patch)
treedc99f3fb595a57e9629661d3002dad724914275b /src/input_common/drivers/keyboard.h
parentinput_common: Move touch and analog from button. Move udp protocol (diff)
downloadyuzu-5a785ed794fff8c944283271bf25cb835c11700a.tar
yuzu-5a785ed794fff8c944283271bf25cb835c11700a.tar.gz
yuzu-5a785ed794fff8c944283271bf25cb835c11700a.tar.bz2
yuzu-5a785ed794fff8c944283271bf25cb835c11700a.tar.lz
yuzu-5a785ed794fff8c944283271bf25cb835c11700a.tar.xz
yuzu-5a785ed794fff8c944283271bf25cb835c11700a.tar.zst
yuzu-5a785ed794fff8c944283271bf25cb835c11700a.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/drivers/keyboard.h (renamed from src/input_common/keyboard.h)29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/input_common/keyboard.h b/src/input_common/drivers/keyboard.h
index 861950472..a3e0d8a61 100644
--- a/src/input_common/keyboard.h
+++ b/src/input_common/drivers/keyboard.h
@@ -1,30 +1,20 @@
-// Copyright 2017 Citra Emulator Project
+// Copyright 2021 yuzu Emulator Project
// Licensed under GPLv2 or any later version
-// Refer to the license.txt file included.
+// Refer to the license.txt file included
#pragma once
-#include <memory>
-#include "core/frontend/input.h"
+#include "input_common/input_engine.h"
namespace InputCommon {
-class KeyButtonList;
-
/**
* A button device factory representing a keyboard. It receives keyboard events and forward them
* to all button devices it created.
*/
-class Keyboard final : public Input::Factory<Input::ButtonDevice> {
+class Keyboard final : public InputCommon::InputEngine {
public:
- Keyboard();
-
- /**
- * Creates a button device from a keyboard key
- * @param params contains parameters for creating the device:
- * - "code": the code of the key to bind with the button
- */
- std::unique_ptr<Input::ButtonDevice> Create(const Common::ParamPackage& params) override;
+ explicit Keyboard(const std::string& input_engine_);
/**
* Sets the status of all buttons bound with the key to pressed
@@ -40,8 +30,15 @@ public:
void ReleaseAllKeys();
+ /// Used for automapping features
+ std::vector<Common::ParamPackage> GetInputDevices() const override;
+
private:
- std::shared_ptr<KeyButtonList> key_button_list;
+ const PadIdentifier identifier = {
+ .guid = Common::UUID{""},
+ .port = 0,
+ .pad = 0,
+ };
};
} // namespace InputCommon