Skip to content

Commit 8df902d

Browse files
authored
Merge pull request #1874 from grumpycoders/chores-code-format
[Chores] Format code
2 parents 5a26d7d + 20de16c commit 8df902d

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

src/gui/gui.cc

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -892,35 +892,35 @@ void PCSX::GUI::close() {
892892

893893
void PCSX::GUI::saveCfg() {
894894
if (g_system->getArgs().isTestModeEnabled()) return;
895-
std::filesystem::path cfgTmpPath = g_system->getPersistentDir() / "pcsx.json.tmp";
896-
std::filesystem::path cfgPath = g_system->getPersistentDir() / "pcsx.json";
897-
{
898-
std::ofstream cfg(cfgTmpPath);
899-
json j;
900-
901-
if (m_fullscreen || glfwGetWindowAttrib(m_window, GLFW_ICONIFIED) > 0) {
902-
m_glfwPosX = settings.get<WindowPosX>();
903-
m_glfwPosY = settings.get<WindowPosY>();
904-
m_glfwSizeX = settings.get<WindowSizeX>();
905-
m_glfwSizeY = settings.get<WindowSizeY>();
906-
m_glfwMaximized = settings.get<WindowMaximized>();
907-
} else {
908-
glfwGetWindowPos(m_window, &m_glfwPosX, &m_glfwPosY);
909-
glfwGetWindowSize(m_window, &m_glfwSizeX, &m_glfwSizeY);
910-
m_glfwMaximized = glfwGetWindowAttrib(m_window, GLFW_MAXIMIZED) != 0;
911-
}
912-
913-
j["imgui"] = ImGui::SaveIniSettingsToMemory(nullptr);
914-
j["SPU"] = PCSX::g_emulator->m_spu->getCfg();
915-
j["emulator"] = PCSX::g_emulator->settings.serialize();
916-
j["gui"] = settings.serialize();
917-
j["loggers"] = m_log.serialize();
918-
j["pads"] = PCSX::g_emulator->m_pads->getCfg();
919-
cfg << std::setw(2) << j << std::endl;
920-
}
921-
if (std::filesystem::copy_file(cfgTmpPath, cfgPath, std::filesystem::copy_options::overwrite_existing)) {
922-
std::filesystem::remove(cfgTmpPath);
923-
}
895+
std::filesystem::path cfgTmpPath = g_system->getPersistentDir() / "pcsx.json.tmp";
896+
std::filesystem::path cfgPath = g_system->getPersistentDir() / "pcsx.json";
897+
{
898+
std::ofstream cfg(cfgTmpPath);
899+
json j;
900+
901+
if (m_fullscreen || glfwGetWindowAttrib(m_window, GLFW_ICONIFIED) > 0) {
902+
m_glfwPosX = settings.get<WindowPosX>();
903+
m_glfwPosY = settings.get<WindowPosY>();
904+
m_glfwSizeX = settings.get<WindowSizeX>();
905+
m_glfwSizeY = settings.get<WindowSizeY>();
906+
m_glfwMaximized = settings.get<WindowMaximized>();
907+
} else {
908+
glfwGetWindowPos(m_window, &m_glfwPosX, &m_glfwPosY);
909+
glfwGetWindowSize(m_window, &m_glfwSizeX, &m_glfwSizeY);
910+
m_glfwMaximized = glfwGetWindowAttrib(m_window, GLFW_MAXIMIZED) != 0;
911+
}
912+
913+
j["imgui"] = ImGui::SaveIniSettingsToMemory(nullptr);
914+
j["SPU"] = PCSX::g_emulator->m_spu->getCfg();
915+
j["emulator"] = PCSX::g_emulator->settings.serialize();
916+
j["gui"] = settings.serialize();
917+
j["loggers"] = m_log.serialize();
918+
j["pads"] = PCSX::g_emulator->m_pads->getCfg();
919+
cfg << std::setw(2) << j << std::endl;
920+
}
921+
if (std::filesystem::copy_file(cfgTmpPath, cfgPath, std::filesystem::copy_options::overwrite_existing)) {
922+
std::filesystem::remove(cfgTmpPath);
923+
}
924924
}
925925

926926
void PCSX::GUI::glfwKeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods) {
@@ -1171,8 +1171,8 @@ void PCSX::GUI::endFrame() {
11711171
_("Output"), &outputWindowShown,
11721172
ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoCollapse)) {
11731173
ImGuiDockNode* outputNode = ImGui::GetWindowDockNode();
1174-
if (outputNode && dockspaceNode->OnlyNodeWithWindows == outputNode
1175-
&& (!outputNode->TabBar || outputNode->TabBar->Tabs.size() == 1)) {
1174+
if (outputNode && dockspaceNode->OnlyNodeWithWindows == outputNode &&
1175+
(!outputNode->TabBar || outputNode->TabBar->Tabs.size() == 1)) {
11761176
// if output is the only visible window in dockspace, switch to full window render mode automatically
11771177
outputWindowShown = false;
11781178
}
@@ -1183,7 +1183,7 @@ void PCSX::GUI::endFrame() {
11831183
m_setupScreenSize = true;
11841184
}
11851185
ImGuiHelpers::normalizeDimensions(textureSize, renderRatio);
1186-
ImGui::SetCursorPos(ImGui::GetCursorPos() + (contentRegion - textureSize) * 0.5f);
1186+
ImGui::SetCursorPos(ImGui::GetCursorPos() + (contentRegion - textureSize) * 0.5f);
11871187
ImTextureID texture = m_offscreenTextures[m_currentTexture];
11881188
if (g_system->getArgs().isShadersDisabled()) {
11891189
ImGui::Image(texture, textureSize, ImVec2(0, 0), ImVec2(1, 1));

src/main/main.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ int pcsxMain(int argc, char **argv) {
193193
// enabled as much as possible.
194194
SystemImpl *system = new SystemImpl(args);
195195
PCSX::g_system = system;
196-
static std::atomic_bool scheduledQuit = false;
196+
static std::atomic_bool scheduledQuit = false;
197197
auto sigint = std::signal(SIGINT, [](auto signal) { scheduledQuit = true; });
198198
auto sigterm = std::signal(SIGTERM, [](auto signal) { scheduledQuit = true; });
199199
#ifndef _WIN32
@@ -455,10 +455,10 @@ runner.init({
455455
// when the emulator is paused.
456456
s_ui->update();
457457
}
458-
if (scheduledQuit) {
459-
PCSX::g_system->quit(-1);
460-
return exitCode;
461-
}
458+
if (scheduledQuit) {
459+
PCSX::g_system->quit(-1);
460+
return exitCode;
461+
}
462462
}
463463
} catch (...) {
464464
// This will ensure we don't do certain cleanups that are awaiting other tasks,

0 commit comments

Comments
 (0)