[fix] fix all unused variables and type conversions on Windows

This commit is contained in:
dijunkun
2024-11-27 11:17:43 +08:00
parent 9e70d0e8fc
commit ddc62c90bb
2 changed files with 5 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ int Render::ControlWindow() {
}
if (reset_control_bar_pos_) {
int new_control_window_pos_x, new_control_window_pos_y, new_cursor_pos_x,
float new_control_window_pos_x, new_control_window_pos_y, new_cursor_pos_x,
new_cursor_pos_y;
// set control window pos
@@ -94,7 +94,8 @@ int Render::ControlWindow() {
if (0 != mouse_diff_control_bar_pos_x_ &&
0 != mouse_diff_control_bar_pos_y_) {
SDL_WarpMouseInWindow(stream_window_, new_cursor_pos_x, new_cursor_pos_y);
SDL_WarpMouseInWindow(stream_window_, (int)new_cursor_pos_x,
(int)new_cursor_pos_y);
}
reset_control_bar_pos_ = false;
} else if (!reset_control_bar_pos_ &&