mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-02 20:11:15 +00:00
Make clang-format happy
This commit is contained in:
parent
ef3b316fbd
commit
249b43a2a8
@ -13,8 +13,8 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QMessageBox>
|
||||
#include <QProcess>
|
||||
#include <cmath>
|
||||
#include <SDL3/SDL.h>
|
||||
#include <cmath>
|
||||
#include <mxdirectx/legodxinfo.h>
|
||||
#include <ui_maindialog.h>
|
||||
|
||||
@ -57,24 +57,9 @@ CMainDialog::CMainDialog(QWidget* pParent) : QDialog(pParent)
|
||||
&CMainDialog::OnRadiobuttonTextureHighQuality
|
||||
);
|
||||
|
||||
connect(
|
||||
m_ui->windowedRadioButton,
|
||||
&QRadioButton::toggled,
|
||||
this,
|
||||
&CMainDialog::OnRadioWindowed
|
||||
);
|
||||
connect(
|
||||
m_ui->fullscreenRadioButton,
|
||||
&QRadioButton::toggled,
|
||||
this,
|
||||
&CMainDialog::OnRadioFullscreen
|
||||
);
|
||||
connect(
|
||||
m_ui->exFullscreenRadioButton,
|
||||
&QRadioButton::toggled,
|
||||
this,
|
||||
&CMainDialog::OnRadioExclusiveFullscreen
|
||||
);
|
||||
connect(m_ui->windowedRadioButton, &QRadioButton::toggled, this, &CMainDialog::OnRadioWindowed);
|
||||
connect(m_ui->fullscreenRadioButton, &QRadioButton::toggled, this, &CMainDialog::OnRadioFullscreen);
|
||||
connect(m_ui->exFullscreenRadioButton, &QRadioButton::toggled, this, &CMainDialog::OnRadioExclusiveFullscreen);
|
||||
connect(m_ui->devicesList, &QListWidget::currentRowChanged, this, &CMainDialog::OnList3DevicesSelectionChanged);
|
||||
connect(m_ui->musicCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxMusic);
|
||||
connect(m_ui->sound3DCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckbox3DSound);
|
||||
@ -193,10 +178,13 @@ bool CMainDialog::OnInitDialog()
|
||||
displayModes = SDL_GetFullscreenDisplayModes(SDL_GetPrimaryDisplay(), &displayModeCount);
|
||||
|
||||
for (int i = 0; i < displayModeCount; ++i) {
|
||||
QString mode = QString("%1x%2 @ %3Hz").arg(displayModes[i]->w).arg(displayModes[i]->h).arg(displayModes[i]->refresh_rate);
|
||||
QString mode =
|
||||
QString("%1x%2 @ %3Hz").arg(displayModes[i]->w).arg(displayModes[i]->h).arg(displayModes[i]->refresh_rate);
|
||||
m_ui->exFullResComboBox->addItem(mode);
|
||||
|
||||
if ((displayModes[i]->w == currentConfigApp->m_exf_x_res) && (displayModes[i]->h == currentConfigApp->m_exf_y_res) && (displayModes[i]->refresh_rate == currentConfigApp->m_exf_fps)) {
|
||||
if ((displayModes[i]->w == currentConfigApp->m_exf_x_res) &&
|
||||
(displayModes[i]->h == currentConfigApp->m_exf_y_res) &&
|
||||
(displayModes[i]->refresh_rate == currentConfigApp->m_exf_fps)) {
|
||||
m_ui->exFullResComboBox->setCurrentIndex(i);
|
||||
}
|
||||
}
|
||||
@ -392,7 +380,8 @@ void CMainDialog::OnRadiobuttonTextureHighQuality(bool checked)
|
||||
}
|
||||
}
|
||||
|
||||
void CMainDialog::OnRadioWindowed(bool checked) {
|
||||
void CMainDialog::OnRadioWindowed(bool checked)
|
||||
{
|
||||
if (checked) {
|
||||
currentConfigApp->m_full_screen = false;
|
||||
currentConfigApp->m_exclusive_full_screen = false;
|
||||
|
||||
@ -30,7 +30,7 @@ class CMainDialog : public QDialog {
|
||||
bool m_modified = false;
|
||||
bool m_advanced = false;
|
||||
Ui::MainDialog* m_ui = nullptr;
|
||||
SDL_DisplayMode ** displayModes;
|
||||
SDL_DisplayMode** displayModes;
|
||||
|
||||
void keyReleaseEvent(QKeyEvent* event) override;
|
||||
bool OnInitDialog();
|
||||
|
||||
@ -269,15 +269,15 @@ bool CConfigApp::ValidateSettings()
|
||||
m_full_screen = TRUE;
|
||||
is_modified = TRUE;
|
||||
}
|
||||
if (!(m_msaa & (m_msaa - 1))) { //Check if MSAA is power of 2 (1, 2, 4, 8, etc)
|
||||
m_msaa = exp2(round(log2(m_msaa))); //Closest power of 2
|
||||
if (!(m_msaa & (m_msaa - 1))) { // Check if MSAA is power of 2 (1, 2, 4, 8, etc)
|
||||
m_msaa = exp2(round(log2(m_msaa))); // Closest power of 2
|
||||
is_modified = TRUE;
|
||||
}
|
||||
if (m_msaa > 16) {
|
||||
m_msaa = 16;
|
||||
is_modified = TRUE;
|
||||
}
|
||||
else if (m_msaa < 1){
|
||||
else if (m_msaa < 1) {
|
||||
m_msaa = 1;
|
||||
is_modified = TRUE;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user