diff --git a/src/core/namco_guncon.cpp b/src/core/namco_guncon.cpp index b3bf49488..295aed3f6 100644 --- a/src/core/namco_guncon.cpp +++ b/src/core/namco_guncon.cpp @@ -222,10 +222,10 @@ u32 NamcoGunCon::StaticGetVibrationMotorCount() Controller::SettingList NamcoGunCon::StaticGetSettings() { static constexpr std::array settings = { - {{SettingInfo::Type::Path, "CrosshairImagePath", "Crosshair Image Path", - "Path to an image to use as a crosshair/cursor."}, - {SettingInfo::Type::Float, "CrosshairScale", "Crosshair Image Scale", "Scale of crosshair image on screen.", "1.0", - "0.0001", "100.0"}}}; + {{SettingInfo::Type::Path, "CrosshairImagePath", TRANSLATABLE("NamcoGunCon", "Crosshair Image Path"), + TRANSLATABLE("NamcoGunCon", "Path to an image to use as a crosshair/cursor.")}, + {SettingInfo::Type::Float, "CrosshairScale", TRANSLATABLE("NamcoGunCon", "Crosshair Image Scale"), + TRANSLATABLE("NamcoGunCon", "Scale of crosshair image on screen."), "1.0", "0.0001", "100.0"}}}; return SettingList(settings.begin(), settings.end()); } diff --git a/src/core/negcon.cpp b/src/core/negcon.cpp index d1c8e16c5..0c20318b1 100644 --- a/src/core/negcon.cpp +++ b/src/core/negcon.cpp @@ -2,6 +2,7 @@ #include "common/assert.h" #include "common/log.h" #include "common/state_wrapper.h" +#include "host_interface.h" #include #include @@ -219,25 +220,22 @@ std::optional NeGcon::StaticGetButtonCodeByName(std::string_view button_nam Controller::AxisList NeGcon::StaticGetAxisNames() { -#define A(n, t) \ - { \ - #n, static_cast (Axis::n), Controller::AxisType::t \ - } - - return {A(Steering, Full), A(I, Half), A(II, Half), A(L, Half)}; - -#undef A + return {{TRANSLATABLE("NeGcon", "Steering"), static_cast(Axis::Steering), AxisType::Full}, + {TRANSLATABLE("NeGcon", "I"), static_cast(Axis::I), AxisType::Half}, + {TRANSLATABLE("NeGcon", "II"), static_cast(Axis::II), AxisType::Half}, + {TRANSLATABLE("NeGcon", "L"), static_cast(Axis::L), AxisType::Half}}; } Controller::ButtonList NeGcon::StaticGetButtonNames() { -#define B(n) \ - { \ - #n, static_cast (Button::n) \ - } - - return {B(Up), B(Down), B(Left), B(Right), B(A), B(B), B(R), B(Start)}; -#undef B + return {{TRANSLATABLE("NeGcon", "Up"), static_cast(Button::Up)}, + {TRANSLATABLE("NeGcon", "Down"), static_cast(Button::Down)}, + {TRANSLATABLE("NeGcon", "Left"), static_cast(Button::Left)}, + {TRANSLATABLE("NeGcon", "Right"), static_cast(Button::Right)}, + {TRANSLATABLE("NeGcon", "A"), static_cast(Button::A)}, + {TRANSLATABLE("NeGcon", "B"), static_cast(Button::B)}, + {TRANSLATABLE("NeGcon", "R"), static_cast(Button::R)}, + {TRANSLATABLE("NeGcon", "Start"), static_cast(Button::Start)}}; } u32 NeGcon::StaticGetVibrationMotorCount() diff --git a/src/core/playstation_mouse.cpp b/src/core/playstation_mouse.cpp index 2d063b534..0c69d92ac 100644 --- a/src/core/playstation_mouse.cpp +++ b/src/core/playstation_mouse.cpp @@ -190,12 +190,8 @@ Controller::AxisList PlayStationMouse::StaticGetAxisNames() Controller::ButtonList PlayStationMouse::StaticGetButtonNames() { -#define B(n) \ - { \ -#n, static_cast < s32>(Button::n) \ - } - return {B(Left), B(Right)}; -#undef B + return {{TRANSLATABLE("PlayStationMouse", "Left"), static_cast(Button::Left)}, + {TRANSLATABLE("PlayStationMouse", "Right"), static_cast(Button::Right)}}; } u32 PlayStationMouse::StaticGetVibrationMotorCount()