Skip to content
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

Implement Emulator::GracefulShutdown() #11399

Merged
merged 5 commits into from
Feb 5, 2022
Merged

Implement Emulator::GracefulShutdown() #11399

merged 5 commits into from
Feb 5, 2022

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Jan 18, 2022

Addresses #11397

@Nekotekina
Copy link
Member

I think "graceful" is better word, very strange to use "merciful" in computing.

@Megamouse
Copy link
Contributor

I think simply something like RequestShutdown wouldn't be too weird either

@Darkhost1999
Copy link
Contributor

Lol. C'mon guys. There's plenty of memes in the code like the last of Arse and other Easter eggs. Let's be merciful when killing a process.

@elad335 elad335 changed the title Implement Emulator::MercifulShutdown() Implement Emulator::GracefulShutdown() Jan 18, 2022
@elad335
Copy link
Contributor Author

elad335 commented Jan 18, 2022

"Request" implies the ability to refuse, I choose "graceful".

@ScottieD
Copy link

This build seems to cause RPCS3 to crash. It also does not behave the same way as sending the exit CMD.

@illusion0001
Copy link
Contributor

Copy link
Contributor

@Megamouse Megamouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you basically have to exit gracefully whenever you first call Kill during some user interaction (after GetBootConfirmation)

rpcs3/rpcs3qt/user_manager_dialog.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/main_window.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/main_window.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/main_window.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/main_window.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/main_window.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/gs_frame.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/game_list_frame.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/game_list_frame.cpp Outdated Show resolved Hide resolved
rpcs3/Emu/system_progress.cpp Outdated Show resolved Hide resolved
@Megamouse
Copy link
Contributor

We most likely need a flag that tells us if we're still compiling at the beginning, so that graceful shutdown can just kill right away.
Otherwise it will be a pain in the ass to figure this out on every single occasion

@Megamouse
Copy link
Contributor

Megamouse commented Jan 18, 2022

We most likely need a flag that tells us if we're still compiling at the beginning, so that graceful shutdown can just kill right away. Otherwise it will be a pain in the ass to figure this out on every single occasion

This is already done by checking the send call in GraceFulShutdown, so it's probably safe to simply call GraceFulShutdown instead of kill in the gui

@Megamouse
Copy link
Contributor

We most likely need a flag that tells us if we're still compiling at the beginning, so that graceful shutdown can just kill right away. Otherwise it will be a pain in the ass to figure this out on every single occasion

This is already done by checking the send call in GraceFulShutdown, so it's probably safe to simply call GraceFulShutdown instead of kill in the gui

I suggest adding a blocking MainWindow wrapper that simply calls (GracefulExit + ProcessEvents loop) and using that instead of the Kill calls that I pointed out

rpcs3/Emu/System.h Outdated Show resolved Hide resolved
rpcs3/Emu/System.cpp Outdated Show resolved Hide resolved
rpcs3/Emu/System.cpp Outdated Show resolved Hide resolved
rpcs3/Emu/RSX/Overlays/Shaders/shader_loading_dialog.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/main_window.cpp Outdated Show resolved Hide resolved
rpcs3/rpcs3qt/main_window.cpp Show resolved Hide resolved
rpcs3/Emu/System.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@Megamouse Megamouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please only do new commits until we merge.
I don't want to re-read all the code again ^^

I think the only part that's wrong now is the GetBootConfirmation I mentioned earlier. (If you decline then it will spawn a new one right away).

After that is sorted out, I'll actuallly test it ;)

rpcs3/Emu/System.cpp Outdated Show resolved Hide resolved
@Megamouse
Copy link
Contributor

K I'll test tomorrow

@Megamouse
Copy link
Contributor

lgtm I guess. The TODO seems curious, but I'll merge if that's not a blocker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants