-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI state is not saved correctly if not using the internal Quit menu item #1832
Comments
Hmmmmm, this feels like a GLFW bug. Basically, here's how this is supposed to work: In Line 868 in 42e94fe
The Line 186 in 42e94fe
Which is listened to by the gui itself: Line 496 in 42e94fe
And it finally saves the imgui context out: Line 851 in 42e94fe
I think what you're describing is that somehow, this doesn't properly work in MacOS: https://www.glfw.org/docs/3.3/window_guide.html#window_close Unfortunately, I don't have a Mac machine myself to test or debug this out. |
Thanks for your feedback! I was able to fork and build on macOS to try to find the issue. It is due to GLFW forcing all windows to close when the app will terminate. So when saveCfg() is called in reaction to your quitting event, all secondary windows are already closed and the persisted GUI state will be wrong in that aspect. However, there seems to be some redundancy between Line 940 in 42e94fe
and Line 496 in 42e94fe
The first one seems to handle config saving pretty well. For testing, I just commented out saveCfg() in the event listener, just left the one in startFrame() and this solved the issue for me. |
Describe the bug
Running macOS, if I use Cmd+Q, the OS menu bar "Quit" item or any system way tell PCSX-Redux to exit, then all my currently opened windows won't be remembered at next launch. If I want to avoid the issue, I must click the internal ImGui menu item in the main window.
Expected behavior
The GUI state should be saved regardless of the way which is used to exit the app. Especially in a PSX development scenario where PCSX has to be started a lot and where it's easier to quit via a keyboard shortcut.
Steps to reproduce the bug
Operating System
macOS Sequoia 15.2
PCSX-Redux version
Version: bc029a7
Build: 65
Changeset: bc029a7
Date & time: 2024-10-24 07:29:35
CPU model
Apple Silicon M2 MAX
GPU model & Drivers
Apple Silicon M2 MAX
BIOS version
SCPH5502 - SCPH5552 (EU)
Options
Iso checks
No response
Logs
Glfw Error 65548: Cocoa: Regular windows do not have icons on macOS
Loading memory card /Users/xxx/.config/pcsx-redux/memcard1.mcd
Loading memory card /Users/xxx/.config/pcsx-redux/memcard2.mcd
Warning: OpenGL error reporting disabled. See About dialog for more information.
PCSX-Redux booting
Copyright (C) 2019-2024 PCSX-Redux authors
CPU type: Interpreted
Loaded BIOS: /Users/xxx/Development/ps1usb/ps1transfer/bios.bin
Known BIOS detected: SCPH-5502 - SCPH-5552 (EU) (d786f0b9)
Additional information
No response
The text was updated successfully, but these errors were encountered: