mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-11 20:21:30 -06:00
61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include "common/enum.h"
|
|
#include "common/types.h"
|
|
#include "core/libraries/system/userservice.h"
|
|
|
|
namespace Core::Loader {
|
|
class SymbolsResolver;
|
|
}
|
|
|
|
namespace Libraries::Move {
|
|
|
|
struct OrbisMoveDeviceInfo {
|
|
float sphere_radius;
|
|
float accelerometer_offset[3];
|
|
};
|
|
|
|
enum class OrbisMoveButtonDataOffset : u16 {
|
|
Select = (1 << 0),
|
|
T = (1 << 1),
|
|
Move = (1 << 2),
|
|
Start = (1 << 3),
|
|
Triangle = (1 << 4),
|
|
Circle = (1 << 5),
|
|
Cross = (1 << 6),
|
|
Square = (1 << 7),
|
|
Intercepted = (1 << 15),
|
|
};
|
|
DECLARE_ENUM_FLAG_OPERATORS(OrbisMoveButtonDataOffset)
|
|
|
|
struct OrbisMoveButtonData {
|
|
u16 button_data;
|
|
u16 trigger_data;
|
|
};
|
|
|
|
struct OrbisMoveExtensionPortData {
|
|
u16 status;
|
|
u16 digital0;
|
|
u16 digital1;
|
|
u16 analog_right_x;
|
|
u16 analog_right_y;
|
|
u16 analog_left_x;
|
|
u16 analog_left_y;
|
|
unsigned char custom[5];
|
|
};
|
|
|
|
struct OrbisMoveData {
|
|
float accelerometer[3];
|
|
float gyro[3];
|
|
OrbisMoveButtonData button_data;
|
|
OrbisMoveExtensionPortData extension_data;
|
|
s64 timestamp;
|
|
s32 count;
|
|
float temperature;
|
|
};
|
|
|
|
void RegisterLib(Core::Loader::SymbolsResolver* sym);
|
|
} // namespace Libraries::Move
|