Fix weird new gcc namespace warning

This commit is contained in:
Megamouse 2024-06-27 20:37:33 +02:00
parent ef136acb6c
commit d5923ef808
8 changed files with 17 additions and 9 deletions

View file

@ -6,6 +6,8 @@
LOG_CHANNEL(ds3_log, "DS3");
using namespace reports;
constexpr std::array<u8, 6> battery_capacity = {0, 1, 25, 50, 75, 100};
constexpr id_pair SONY_DS3_ID_0 = {0x054C, 0x0268};

View file

@ -4,7 +4,7 @@
#include <unordered_map>
namespace
namespace reports
{
struct ds3_rumble
{
@ -67,7 +67,7 @@ public:
#ifdef _WIN32
u8 report_id = 0;
#endif
ds3_input_report report{};
reports::ds3_input_report report{};
};
class ds3_pad_handler final : public hid_pad_handler<ds3_device>

View file

@ -6,6 +6,8 @@
LOG_CHANNEL(ds4_log, "DS4");
using namespace reports;
constexpr id_pair SONY_DS4_ID_0 = {0x054C, 0x0BA0}; // Dongle
constexpr id_pair SONY_DS4_ID_1 = {0x054C, 0x05C4}; // CUH-ZCT1x
constexpr id_pair SONY_DS4_ID_2 = {0x054C, 0x09CC}; // CUH-ZCT2x

View file

@ -4,7 +4,7 @@
#include <unordered_map>
namespace
namespace reports
{
constexpr u32 DS4_ACC_RES_PER_G = 8192;
constexpr u32 DS4_GYRO_RES_PER_DEG_S = 86; // technically this could be 1024, but keeping it at 86 keeps us within 16 bits of precision
@ -119,8 +119,8 @@ public:
bool bt_controller{false};
bool has_calib_data{false};
std::array<CalibData, CalibIndex::COUNT> calib_data{};
ds4_input_report_usb report_usb{};
ds4_input_report_bt report_bt{};
reports::ds4_input_report_usb report_usb{};
reports::ds4_input_report_bt report_bt{};
};
class ds4_pad_handler final : public hid_pad_handler<DS4Device>

View file

@ -6,6 +6,8 @@
LOG_CHANNEL(dualsense_log, "DualSense");
using namespace reports;
template <>
void fmt_class_string<DualSenseDevice::DualSenseDataMode>::format(std::string& out, u64 arg)
{

View file

@ -4,7 +4,7 @@
#include <unordered_map>
namespace
namespace reports
{
constexpr u32 DUALSENSE_ACC_RES_PER_G = 8192;
constexpr u32 DUALSENSE_GYRO_RES_PER_DEG_S = 86; // technically this could be 1024, but keeping it at 86 keeps us within 16 bits of precision
@ -172,7 +172,7 @@ public:
u8 bt_sequence{0};
bool has_calib_data{false};
std::array<CalibData, CalibIndex::COUNT> calib_data{};
dualsense_input_report_common report{}; // No need to have separate reports for usb and bluetooth
reports::dualsense_input_report_common report{}; // No need to have separate reports for usb and bluetooth
DualSenseDataMode data_mode{DualSenseDataMode::Simple};
DualSenseFeatureSet feature_set{DualSenseFeatureSet::Normal};
bool init_lightbar{true};

View file

@ -4,6 +4,8 @@
LOG_CHANNEL(skateboard_log, "Skateboard");
using namespace reports;
namespace
{
constexpr id_pair SKATEBOARD_ID_0 = {0x12BA, 0x0400}; // Tony Hawk RIDE Skateboard

View file

@ -5,7 +5,7 @@
#include <array>
#include <unordered_map>
namespace
namespace reports
{
// Descriptor
// 0x09, 0x05, // Usage (0x05)
@ -143,7 +143,7 @@ class skateboard_device : public HidDevice
{
public:
bool skateboard_is_on = false;
skateboard_input_report report{};
reports::skateboard_input_report report{};
};
class skateboard_pad_handler final : public hid_pad_handler<skateboard_device>