@@ -892,35 +892,35 @@ void PCSX::GUI::close() {
892
892
893
893
void PCSX::GUI::saveCfg () {
894
894
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
+ }
924
924
}
925
925
926
926
void PCSX::GUI::glfwKeyCallback (GLFWwindow* window, int key, int scancode, int action, int mods) {
@@ -1171,8 +1171,8 @@ void PCSX::GUI::endFrame() {
1171
1171
_ (" Output" ), &outputWindowShown,
1172
1172
ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoCollapse)) {
1173
1173
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 )) {
1176
1176
// if output is the only visible window in dockspace, switch to full window render mode automatically
1177
1177
outputWindowShown = false ;
1178
1178
}
@@ -1183,7 +1183,7 @@ void PCSX::GUI::endFrame() {
1183
1183
m_setupScreenSize = true ;
1184
1184
}
1185
1185
ImGuiHelpers::normalizeDimensions (textureSize, renderRatio);
1186
- ImGui::SetCursorPos (ImGui::GetCursorPos () + (contentRegion - textureSize) * 0 .5f );
1186
+ ImGui::SetCursorPos (ImGui::GetCursorPos () + (contentRegion - textureSize) * 0 .5f );
1187
1187
ImTextureID texture = m_offscreenTextures[m_currentTexture];
1188
1188
if (g_system->getArgs ().isShadersDisabled ()) {
1189
1189
ImGui::Image (texture, textureSize, ImVec2 (0 , 0 ), ImVec2 (1 , 1 ));
0 commit comments