PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.84k stars 1.63k forks source link

[Feature Request]: Exit PCSX2 after game closes option in interface #11859

Closed quantum-glitch closed 1 month ago

quantum-glitch commented 1 month ago

Description

A check box option to close PCSX2 on game exit built into the interface tab, just like RPCS3 has.

Reason

I use Playnite as my game library manager and so it becomes irritating to have to manually close the app every time i want to switch titles, having this feature would be insanely beneficial.

Examples

Example SS of RPCS3. Screenshot 2024-09-29 172704

F0bes commented 1 month ago

What's your definition of game exit? When you press escape and the game closes to the game list?

Remember, unlike the PS3, most games on the PS2 don't have a feature to return to OSDSYS. You would just reset the console without your disc if you wanted to access your memory card or change OSDSYS settings.

quantum-glitch commented 1 month ago

What's your definition of game exit? When you press escape and the game closes to the game list?

Remember, unlike the PS3, most games on the PS2 don't have a feature to return to OSDSYS. You would just reset the console without your disc if you wanted to access your memory card or change OSDSYS settings.

Yes exactly like that, so when i press ESC and close the game it would also terminate the game list, which in turn would allow Playnite (my game library manager) to recognize the emulator process as no longer running, thus my game library GUI would be able to auto restore itself, allowing me to select a different title to launch.

I dont need to access the PS2 system menu or memory card, everything from launching games to opening the emulator i have running through Playnite so this wouldnt be an issue for me.

F0bes commented 1 month ago

I believe passing the -batch argument to PCSX2 is what you want. When you stop the VM it will close PCSX2.

quantum-glitch commented 1 month ago

I believe passing the -batch argument to PCSX2 is what you want. When you stop the VM it will close PCSX2.

I've tried this argument, however when i add this argument and attempt to run a title i get error "cannot use batch mode, because no boot filename was specified" and i don't know how to resolve this.

F0bes commented 1 month ago

You wont be able to use the PCSX2 gamelist when using the batch argument. You will need to configure your game library manager to pass the game to PCSX2 via the commandline.

An example is as follows: pcsx2-qt -batch D:\\Games\PS2\Tetris_Worlds.chd

quantum-glitch commented 1 month ago

pcsx2-qt -batch

I tried this but when running a title it will open for a millisecond then instantly close as shown in the clip.

https://github.com/user-attachments/assets/47a6344a-da65-4d7b-91f2-39b416fa91fa

F0bes commented 1 month ago

Can you go to Tools -> Enable File Logging in PCSX2. Save the settings and then execute it with the launcher again. Then upload the emulog.txt file PCSX2 generates? The log file can be found in Tools -> Open Data Directory and in the logs folder.

quantum-glitch commented 1 month ago

Can you go to Tools -> Enable File Logging in PCSX2. Save the settings and then execute it with the launcher again. Then upload the emulog.txt file PCSX2 generates? The log file can be found in Tools -> Open Data Directory and in the logs folder.

emulog.txt

F0bes commented 1 month ago

ReportErrorAsync: Error: Requested filename 'E:\EMU GAMES\ps2\Enter the Matrix (USA) (v1.01).iso D:\EMUs\ps2\pcsx2-qtx64-avx2 --fullscreen --nogui D:\EMU GAMES\ps2\Enter the Matrix (USA) (v1.01).iso' does not exist.

Somewhere you are passing arguments with double dashes. That isn't proper anymore and will lead to issues, simply replace them with single dashes. These arguments don't appear to match what is in your screenshot either. I believe you have something misconfigured.

quantum-glitch commented 1 month ago

ReportErrorAsync: Error: Requested filename 'E:\EMU GAMES\ps2\Enter the Matrix (USA) (v1.01).iso D:\EMUs\ps2\pcsx2-qtx64-avx2 --fullscreen --nogui D:\EMU GAMES\ps2\Enter the Matrix (USA) (v1.01).iso' does not exist.

Somewhere you are passing arguments with double dashes. That isn't proper anymore and will lead to issues, simply replace them with single dashes. These arguments don't appear to match what is in your screenshot either. I believe you have something misconfigured.

I managed to figure out where i went wrong & have now rectified it, thanks for conversing with me helped a lot.

F0bes commented 1 month ago

Awesome, glad it was figured out.