mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-18 05:11:15 +00:00
Make clang-format happy
This commit is contained in:
parent
e65bd269d4
commit
ae60733e67
@ -488,44 +488,48 @@ void CMainDialog::TexturePathEdited()
|
|||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainDialog::AspectRatioChanged(int index) {
|
void CMainDialog::AspectRatioChanged(int index)
|
||||||
|
{
|
||||||
currentConfigApp->m_aspect_ratio = index;
|
currentConfigApp->m_aspect_ratio = index;
|
||||||
EnsureAspectRatio();
|
EnsureAspectRatio();
|
||||||
m_modified = true;
|
m_modified = true;
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainDialog::XResChanged(int i) {
|
void CMainDialog::XResChanged(int i)
|
||||||
|
{
|
||||||
currentConfigApp->m_x_res = i;
|
currentConfigApp->m_x_res = i;
|
||||||
m_modified = true;
|
m_modified = true;
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainDialog::YResChanged(int i) {
|
void CMainDialog::YResChanged(int i)
|
||||||
|
{
|
||||||
currentConfigApp->m_y_res = i;
|
currentConfigApp->m_y_res = i;
|
||||||
EnsureAspectRatio();
|
EnsureAspectRatio();
|
||||||
m_modified = true;
|
m_modified = true;
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainDialog::EnsureAspectRatio() {
|
void CMainDialog::EnsureAspectRatio()
|
||||||
|
{
|
||||||
if (currentConfigApp->m_aspect_ratio != 3) {
|
if (currentConfigApp->m_aspect_ratio != 3) {
|
||||||
m_ui->xResSpinBox->setReadOnly(true);
|
m_ui->xResSpinBox->setReadOnly(true);
|
||||||
switch (currentConfigApp->m_aspect_ratio) {
|
switch (currentConfigApp->m_aspect_ratio) {
|
||||||
case 0: {
|
case 0: {
|
||||||
float standardAspect = 4.0f / 3.0f;
|
float standardAspect = 4.0f / 3.0f;
|
||||||
currentConfigApp->m_x_res = static_cast<int>(std::round((currentConfigApp->m_y_res) * standardAspect));
|
currentConfigApp->m_x_res = static_cast<int>(std::round((currentConfigApp->m_y_res) * standardAspect));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1: {
|
case 1: {
|
||||||
float wideAspect = 16.0f / 9.0f;
|
float wideAspect = 16.0f / 9.0f;
|
||||||
currentConfigApp->m_x_res = static_cast<int>(std::round((currentConfigApp->m_y_res) * wideAspect));
|
currentConfigApp->m_x_res = static_cast<int>(std::round((currentConfigApp->m_y_res) * wideAspect));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: {
|
case 2: {
|
||||||
currentConfigApp->m_x_res = currentConfigApp->m_y_res;
|
currentConfigApp->m_x_res = currentConfigApp->m_y_res;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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));
|
currentConfigApp->m_frame_delta = (1000.0f / static_cast<float>(i));
|
||||||
m_modified = true;
|
m_modified = true;
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
|
|||||||
@ -1095,7 +1095,6 @@ bool IsleApp::LoadConfig()
|
|||||||
m_videoParam.GetRect() = MxRect32(0, 0, (m_xRes - 1), (m_yRes - 1));
|
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)));
|
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);
|
const char* deviceId = iniparser_getstring(dict, "isle:3D Device ID", NULL);
|
||||||
if (deviceId != NULL) {
|
if (deviceId != NULL) {
|
||||||
m_deviceId = new char[strlen(deviceId) + 1];
|
m_deviceId = new char[strlen(deviceId) + 1];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user