mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-23 20:07:02 +02:00
[cmake] Allow proper unity builds
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
feb8c5f88e
commit
2c3483abb9
73 changed files with 857 additions and 767 deletions
|
|
@ -1,3 +1,6 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
|
@ -6,14 +9,14 @@
|
|||
|
||||
namespace InputCommon {
|
||||
|
||||
constexpr PadIdentifier identifier = {
|
||||
constexpr PadIdentifier touch_screen_identifier = {
|
||||
.guid = Common::UUID{},
|
||||
.port = 0,
|
||||
.pad = 0,
|
||||
};
|
||||
|
||||
TouchScreen::TouchScreen(std::string input_engine_) : InputEngine(std::move(input_engine_)) {
|
||||
PreSetController(identifier);
|
||||
PreSetController(touch_screen_identifier);
|
||||
ReleaseAllTouch();
|
||||
}
|
||||
|
||||
|
|
@ -26,9 +29,9 @@ void TouchScreen::TouchMoved(float x, float y, std::size_t finger_id) {
|
|||
}
|
||||
const auto i = index.value();
|
||||
fingers[i].is_active = true;
|
||||
SetButton(identifier, static_cast<int>(i), true);
|
||||
SetAxis(identifier, static_cast<int>(i * 2), x);
|
||||
SetAxis(identifier, static_cast<int>(i * 2 + 1), y);
|
||||
SetButton(touch_screen_identifier, static_cast<int>(i), true);
|
||||
SetAxis(touch_screen_identifier, static_cast<int>(i * 2), x);
|
||||
SetAxis(touch_screen_identifier, static_cast<int>(i * 2 + 1), y);
|
||||
}
|
||||
|
||||
void TouchScreen::TouchPressed(float x, float y, std::size_t finger_id) {
|
||||
|
|
@ -55,9 +58,9 @@ void TouchScreen::TouchReleased(std::size_t finger_id) {
|
|||
}
|
||||
const auto i = index.value();
|
||||
fingers[i].is_enabled = false;
|
||||
SetButton(identifier, static_cast<int>(i), false);
|
||||
SetAxis(identifier, static_cast<int>(i * 2), 0.0f);
|
||||
SetAxis(identifier, static_cast<int>(i * 2 + 1), 0.0f);
|
||||
SetButton(touch_screen_identifier, static_cast<int>(i), false);
|
||||
SetAxis(touch_screen_identifier, static_cast<int>(i * 2), 0.0f);
|
||||
SetAxis(touch_screen_identifier, static_cast<int>(i * 2 + 1), 0.0f);
|
||||
}
|
||||
|
||||
std::optional<std::size_t> TouchScreen::GetIndexFromFingerId(std::size_t finger_id) const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue