Make clang-format happy

This commit is contained in:
VoxelTek 2025-07-15 10:54:41 +10:00
parent e65bd269d4
commit ae60733e67
2 changed files with 24 additions and 20 deletions

View File

@ -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<int>(std::round((currentConfigApp->m_y_res) * standardAspect));
break;
}
case 1: {
float wideAspect = 16.0f / 9.0f;
currentConfigApp->m_x_res = static_cast<int>(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<int>(std::round((currentConfigApp->m_y_res) * standardAspect));
break;
}
case 1: {
float wideAspect = 16.0f / 9.0f;
currentConfigApp->m_x_res = static_cast<int>(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<float>(i));
m_modified = true;
UpdateInterface();

View File

@ -1095,7 +1095,6 @@ bool IsleApp::LoadConfig()
m_videoParam.GetRect() = MxRect32(0, 0, (m_xRes - 1), (m_yRes - 1));
m_frameDelta = static_cast<int>(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];