diff --git a/Source/Core/DolphinQt2/TAS/Shared.cpp b/Source/Core/DolphinQt2/TAS/Shared.cpp index c9c7446bbc..a30405f4fa 100644 --- a/Source/Core/DolphinQt2/TAS/Shared.cpp +++ b/Source/Core/DolphinQt2/TAS/Shared.cpp @@ -4,6 +4,8 @@ #include "DolphinQt2/TAS/Shared.h" +#include + #include #include #include @@ -47,8 +49,8 @@ QGroupBox* CreateStickInputs(QDialog* window, QString name, QSpinBox*& x_value, window->connect(visual, &StickWidget::ChangedX, x_value, &QSpinBox::setValue); window->connect(visual, &StickWidget::ChangedY, y_value, &QSpinBox::setValue); - x_value->setValue(max_x / 2); - y_value->setValue(max_y / 2); + x_value->setValue(static_cast(std::round(max_x / 2.))); + y_value->setValue(static_cast(std::round(max_y / 2.))); auto* visual_ar = new AspectRatioWidget(visual, max_x, max_y); diff --git a/Source/Core/DolphinQt2/TAS/WiiTASInputWindow.cpp b/Source/Core/DolphinQt2/TAS/WiiTASInputWindow.cpp index ad2d9565c2..120806c6c9 100644 --- a/Source/Core/DolphinQt2/TAS/WiiTASInputWindow.cpp +++ b/Source/Core/DolphinQt2/TAS/WiiTASInputWindow.cpp @@ -4,6 +4,8 @@ #include "DolphinQt2/TAS/WiiTASInputWindow.h" +#include + #include #include #include @@ -55,8 +57,8 @@ WiiTASInputWindow::WiiTASInputWindow(QWidget* parent, int num) : QDialog(parent) connect(visual, &IRWidget::ChangedX, m_ir_x_value, &QSpinBox::setValue); connect(visual, &IRWidget::ChangedY, m_ir_y_value, &QSpinBox::setValue); - m_ir_x_value->setValue(ir_max_x / 2); - m_ir_y_value->setValue(ir_max_y / 2); + m_ir_x_value->setValue(static_cast(std::round(ir_max_x / 2.))); + m_ir_y_value->setValue(static_cast(std::round(ir_max_y / 2.))); auto* visual_ar = new AspectRatioWidget(visual, ir_max_x, ir_max_y);