summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers/camera.h
blob: 24b27e3258f3dce39ad0195caaf4af654fb6351f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <span>

#include "input_common/input_engine.h"

namespace InputCommon {

/**
 * A button device factory representing a keyboard. It receives keyboard events and forward them
 * to all button devices it created.
 */
class Camera final : public InputEngine {
public:
    explicit Camera(std::string input_engine_);

    void SetCameraData(std::size_t width, std::size_t height, std::span<const u32> data);

    std::size_t getImageWidth() const;
    std::size_t getImageHeight() const;

    Common::Input::DriverResult SetCameraFormat(const PadIdentifier& identifier_,
                                                Common::Input::CameraFormat camera_format) override;

private:
    Common::Input::CameraStatus status{};
};

} // namespace InputCommon