1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

fix some warnings

This commit is contained in:
Megamouse 2021-08-15 18:43:48 +02:00
parent cad96cef72
commit ac986c7c61
4 changed files with 7 additions and 7 deletions

View File

@ -95,8 +95,8 @@ struct gem_config
u8 rumble = 0; // Rumble intensity
gem_color sphere_rgb = {}; // RGB color of the sphere LED
u32 hue = 0; // Tracking hue of the motion controller
u32 distance{1500}; // Distance from the camera in mm
u32 radius{10}; // Radius of the sphere in camera pixels
f32 distance{1500.0f}; // Distance from the camera in mm
f32 radius{10.0f}; // Radius of the sphere in camera pixels
bool is_calibrating{false}; // Whether or not we are currently calibrating
u64 calibration_start_us{0}; // The start timestamp of the calibration in microseconds
@ -380,7 +380,7 @@ static bool mouse_pos_to_gem_image_state(const u32 mouse_no, const gem_config::g
if (mouse_height <= 0) mouse_height = shared_data.height;
const f32 scaling_width = mouse_width / static_cast<f32>(shared_data.width);
const f32 scaling_height = mouse_height / static_cast<f32>(shared_data.height);
const f32 mmPerPixel = CELL_GEM_SPHERE_RADIUS_MM / static_cast<f32>(controller.radius);
const f32 mmPerPixel = CELL_GEM_SPHERE_RADIUS_MM / controller.radius;
// Image coordinates in pixels
const f32 image_x = static_cast<f32>(mouse.x_pos) / scaling_width;
@ -425,7 +425,7 @@ static bool mouse_pos_to_gem_state(const u32 mouse_no, const gem_config::gem_con
if (mouse_height <= 0) mouse_height = shared_data.height;
const f32 scaling_width = mouse_width / static_cast<f32>(shared_data.width);
const f32 scaling_height = mouse_height / static_cast<f32>(shared_data.height);
const f32 mmPerPixel = CELL_GEM_SPHERE_RADIUS_MM / static_cast<f32>(controller.radius);
const f32 mmPerPixel = CELL_GEM_SPHERE_RADIUS_MM / controller.radius;
// Image coordinates in pixels
const f32 image_x = static_cast<f32>(mouse.x_pos) / scaling_width;

View File

@ -467,7 +467,7 @@ bool PadHandlerBase::bindPadToDevice(std::shared_ptr<Pad> pad, const std::string
);
pad->m_buttons.emplace_back(special_button_offset, mapping[button::pressure_intensity_button], special_button_value::pressure_intensity);
pad->m_pressure_intensity_button_index = pad->m_buttons.size() - 1;
pad->m_pressure_intensity_button_index = static_cast<s32>(pad->m_buttons.size()) - 1;
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, mapping[button::up], CELL_PAD_CTRL_UP);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, mapping[button::down], CELL_PAD_CTRL_DOWN);

View File

@ -963,7 +963,7 @@ bool evdev_joystick_handler::bindPadToDevice(std::shared_ptr<Pad> pad, const std
);
pad->m_buttons.emplace_back(special_button_offset, evdevbutton(cfg->pressure_intensity_button).code, special_button_value::pressure_intensity);
pad->m_pressure_intensity_button_index = pad->m_buttons.size() - 1;
pad->m_pressure_intensity_button_index = static_cast<s32>(pad->m_buttons.size()) - 1;
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, evdevbutton(cfg->triangle).code, CELL_PAD_CTRL_TRIANGLE);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, evdevbutton(cfg->circle).code, CELL_PAD_CTRL_CIRCLE);

View File

@ -746,7 +746,7 @@ bool keyboard_pad_handler::bindPadToDevice(std::shared_ptr<Pad> pad, const std::
);
pad->m_buttons.emplace_back(special_button_offset, find_key(cfg->pressure_intensity_button), special_button_value::pressure_intensity);
pad->m_pressure_intensity_button_index = pad->m_buttons.size() - 1;
pad->m_pressure_intensity_button_index = static_cast<s32>(pad->m_buttons.size()) - 1;
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, find_key(cfg->left), CELL_PAD_CTRL_LEFT);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, find_key(cfg->down), CELL_PAD_CTRL_DOWN);