mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-10 21:40:43 +00:00
cellGem: Split horizontal and vertical mouse rotation cone setting
This commit is contained in:
parent
c56147e04b
commit
5073477415
@ -956,9 +956,10 @@ static inline void pos_to_gem_state(u32 gem_num, gem_config::gem_controller& con
|
||||
static constexpr f32 PI = 3.14159265f;
|
||||
const auto degree_to_rad = [](f32 degree) -> f32 { return degree * PI / 180.0f; };
|
||||
|
||||
const f32 max_angle_per_side = g_cfg.io.fake_move_rotation_cone / 2.0f;
|
||||
const f32 roll = -degree_to_rad((image_y - half_height) / half_height * max_angle_per_side); // This is actually the pitch
|
||||
const f32 pitch = -degree_to_rad((image_x - half_width) / half_width * max_angle_per_side); // This is actually the yaw
|
||||
const f32 max_angle_per_side_h = g_cfg.io.fake_move_rotation_cone_h / 2.0f;
|
||||
const f32 max_angle_per_side_v = g_cfg.io.fake_move_rotation_cone_v / 2.0f;
|
||||
const f32 roll = -degree_to_rad((image_y - half_height) / half_height * max_angle_per_side_v); // This is actually the pitch
|
||||
const f32 pitch = -degree_to_rad((image_x - half_width) / half_width * max_angle_per_side_h); // This is actually the yaw
|
||||
const f32 yaw = degree_to_rad(0.0f);
|
||||
const f32 cr = std::cos(roll * 0.5f);
|
||||
const f32 sr = std::sin(roll * 0.5f);
|
||||
|
@ -83,7 +83,8 @@ namespace rsx
|
||||
|
||||
add_dropdown(&g_cfg.io.pad_mode, localized_string_id::HOME_MENU_SETTINGS_INPUT_PAD_MODE);
|
||||
add_unsigned_slider(&g_cfg.io.pad_sleep, localized_string_id::HOME_MENU_SETTINGS_INPUT_PAD_SLEEP, " µs", 100);
|
||||
add_unsigned_slider(&g_cfg.io.fake_move_rotation_cone, localized_string_id::HOME_MENU_SETTINGS_INPUT_FAKE_MOVE_ROTATION_CONE, "°", 1);
|
||||
add_unsigned_slider(&g_cfg.io.fake_move_rotation_cone_h, localized_string_id::HOME_MENU_SETTINGS_INPUT_FAKE_MOVE_ROTATION_CONE_H, "°", 1);
|
||||
add_unsigned_slider(&g_cfg.io.fake_move_rotation_cone_v, localized_string_id::HOME_MENU_SETTINGS_INPUT_FAKE_MOVE_ROTATION_CONE_V, "°", 1);
|
||||
|
||||
apply_layout();
|
||||
}
|
||||
|
@ -223,7 +223,8 @@ enum class localized_string_id
|
||||
HOME_MENU_SETTINGS_INPUT_CAMERA_FLIP,
|
||||
HOME_MENU_SETTINGS_INPUT_PAD_MODE,
|
||||
HOME_MENU_SETTINGS_INPUT_PAD_SLEEP,
|
||||
HOME_MENU_SETTINGS_INPUT_FAKE_MOVE_ROTATION_CONE,
|
||||
HOME_MENU_SETTINGS_INPUT_FAKE_MOVE_ROTATION_CONE_H,
|
||||
HOME_MENU_SETTINGS_INPUT_FAKE_MOVE_ROTATION_CONE_V,
|
||||
HOME_MENU_SETTINGS_ADVANCED,
|
||||
HOME_MENU_SETTINGS_ADVANCED_PREFERRED_SPU_THREADS,
|
||||
HOME_MENU_SETTINGS_ADVANCED_MAX_CPU_PREEMPTIONS,
|
||||
|
@ -283,7 +283,8 @@ struct cfg_root : cfg::node
|
||||
cfg::string midi_devices{this, "Emulated Midi devices", "ßßß@@@ßßß@@@ßßß@@@"};
|
||||
cfg::_bool load_sdl_mappings{ this, "Load SDL GameController Mappings", true };
|
||||
cfg::_bool debug_overlay{ this, "IO Debug overlay", false, true };
|
||||
cfg::uint<1, 180> fake_move_rotation_cone{ this, "Fake Move Rotation Cone", 10, true };
|
||||
cfg::uint<1, 180> fake_move_rotation_cone_h{ this, "Fake Move Rotation Cone", 10, true };
|
||||
cfg::uint<1, 180> fake_move_rotation_cone_v{ this, "Fake Move Rotation Cone (Vertical)", 10, true };
|
||||
|
||||
} io{ this };
|
||||
|
||||
|
@ -244,7 +244,8 @@ private:
|
||||
case localized_string_id::HOME_MENU_SETTINGS_INPUT_CAMERA_FLIP: return tr("Camera Flip", "Input");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_INPUT_PAD_MODE: return tr("Pad Handler Mode", "Input");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_INPUT_PAD_SLEEP: return tr("Pad Handler Sleep", "Input");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_INPUT_FAKE_MOVE_ROTATION_CONE: return tr("Fake PS Move Rotation Cone", "Input");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_INPUT_FAKE_MOVE_ROTATION_CONE_H: return tr("Fake PS Move Rotation Cone (Horizontal)", "Input");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_INPUT_FAKE_MOVE_ROTATION_CONE_V: return tr("Fake PS Move Rotation Cone (Vertical)", "Input");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_ADVANCED: return tr("Advanced");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_ADVANCED_PREFERRED_SPU_THREADS: return tr("Preferred SPU Threads", "Advanced");
|
||||
case localized_string_id::HOME_MENU_SETTINGS_ADVANCED_MAX_CPU_PREEMPTIONS: return tr("Max Power Saving CPU-Preemptions", "Advanced");
|
||||
|
Loading…
x
Reference in New Issue
Block a user