From ae60733e6791a6fd0e02fff9f58fe49e820db3fc Mon Sep 17 00:00:00 2001 From: VoxelTek <53562267+VoxelTek@users.noreply.github.com> Date: Tue, 15 Jul 2025 10:54:41 +1000 Subject: [PATCH] Make clang-format happy --- CONFIG/MainDlg.cpp | 43 ++++++++++++++++++++++++------------------- ISLE/isleapp.cpp | 1 - 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/CONFIG/MainDlg.cpp b/CONFIG/MainDlg.cpp index 32001106..a789a542 100644 --- a/CONFIG/MainDlg.cpp +++ b/CONFIG/MainDlg.cpp @@ -488,44 +488,48 @@ void CMainDialog::TexturePathEdited() UpdateInterface(); } -void CMainDialog::AspectRatioChanged(int index) { +void CMainDialog::AspectRatioChanged(int index) +{ currentConfigApp->m_aspect_ratio = index; EnsureAspectRatio(); m_modified = true; UpdateInterface(); } -void CMainDialog::XResChanged(int i) { +void CMainDialog::XResChanged(int i) +{ currentConfigApp->m_x_res = i; m_modified = true; UpdateInterface(); } -void CMainDialog::YResChanged(int i) { +void CMainDialog::YResChanged(int i) +{ currentConfigApp->m_y_res = i; EnsureAspectRatio(); m_modified = true; UpdateInterface(); } -void CMainDialog::EnsureAspectRatio() { +void CMainDialog::EnsureAspectRatio() +{ if (currentConfigApp->m_aspect_ratio != 3) { m_ui->xResSpinBox->setReadOnly(true); switch (currentConfigApp->m_aspect_ratio) { - case 0: { - float standardAspect = 4.0f / 3.0f; - currentConfigApp->m_x_res = static_cast(std::round((currentConfigApp->m_y_res) * standardAspect)); - break; - } - case 1: { - float wideAspect = 16.0f / 9.0f; - currentConfigApp->m_x_res = static_cast(std::round((currentConfigApp->m_y_res) * wideAspect)); - break; - } - case 2: { - currentConfigApp->m_x_res = currentConfigApp->m_y_res; - break; - } + case 0: { + float standardAspect = 4.0f / 3.0f; + currentConfigApp->m_x_res = static_cast(std::round((currentConfigApp->m_y_res) * standardAspect)); + break; + } + case 1: { + float wideAspect = 16.0f / 9.0f; + currentConfigApp->m_x_res = static_cast(std::round((currentConfigApp->m_y_res) * wideAspect)); + break; + } + case 2: { + currentConfigApp->m_x_res = currentConfigApp->m_y_res; + break; + } } } else { @@ -533,7 +537,8 @@ void CMainDialog::EnsureAspectRatio() { } } -void CMainDialog::FramerateChanged(int i) { +void CMainDialog::FramerateChanged(int i) +{ currentConfigApp->m_frame_delta = (1000.0f / static_cast(i)); m_modified = true; UpdateInterface(); diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index cb16ecf2..c4c8c670 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -1095,7 +1095,6 @@ bool IsleApp::LoadConfig() m_videoParam.GetRect() = MxRect32(0, 0, (m_xRes - 1), (m_yRes - 1)); m_frameDelta = static_cast(std::round(iniparser_getdouble(dict, "isle:Frame Delta", m_frameDelta))); - const char* deviceId = iniparser_getstring(dict, "isle:3D Device ID", NULL); if (deviceId != NULL) { m_deviceId = new char[strlen(deviceId) + 1];