mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 23:59:27 +01:00
Merge pull request #7184 from spycrab/qt_tas_round
Qt/TAS: Fix slightly off-center default values
This commit is contained in:
commit
227290055d
@ -4,6 +4,8 @@
|
||||
|
||||
#include "DolphinQt2/TAS/Shared.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <QGroupBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
@ -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<int>(std::round(max_x / 2.)));
|
||||
y_value->setValue(static_cast<int>(std::round(max_y / 2.)));
|
||||
|
||||
auto* visual_ar = new AspectRatioWidget(visual, max_x, max_y);
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
#include "DolphinQt2/TAS/WiiTASInputWindow.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QGroupBox>
|
||||
#include <QHBoxLayout>
|
||||
@ -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<int>(std::round(ir_max_x / 2.)));
|
||||
m_ir_y_value->setValue(static_cast<int>(std::round(ir_max_y / 2.)));
|
||||
|
||||
auto* visual_ar = new AspectRatioWidget(visual, ir_max_x, ir_max_y);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user