rexglue-skate3/include/rex/input/nop/nop_input_driver.h

37 lines
1.5 KiB
C++

#pragma once
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*
* @modified Tom Clay, 2026 - Adapted for ReXGlue runtime
*/
#include <rex/input/input_driver.h>
namespace rex::input::nop {
class NopInputDriver final : public InputDriver {
public:
explicit NopInputDriver(rex::ui::Window* window, size_t window_z_order);
~NopInputDriver() override;
X_STATUS Setup() override;
X_RESULT GetCapabilities(uint32_t user_index, uint32_t flags,
X_INPUT_CAPABILITIES* out_caps) override;
X_RESULT GetState(uint32_t user_index, X_INPUT_STATE* out_state) override;
// The spoofed always-connected pad exists only so the guest doesn't pause;
// it must not read as a real pad to host UI overlays.
X_RESULT GetStateUi(uint32_t, X_INPUT_STATE*) override {
return X_ERROR_DEVICE_NOT_CONNECTED;
}
X_RESULT SetState(uint32_t user_index, X_INPUT_VIBRATION* vibration) override;
X_RESULT GetKeystroke(uint32_t user_index, uint32_t flags,
X_INPUT_KEYSTROKE* out_keystroke) override;
};
} // namespace rex::input::nop