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