mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
adding initializer to quit events and show messaage no game is currently running when clicking stop button and no game ir running.
This commit is contained in:
parent
7fb95216cf
commit
78ef595db3
@ -1280,7 +1280,7 @@ void MainWindow::StopGameforUpdate(bool shouldRelaunch) {
|
||||
Core::Emulator& emulator = Core::Emulator::GetInstance();
|
||||
emulator.StopEmulation();
|
||||
|
||||
SDL_Event quitEvent;
|
||||
SDL_Event quitEvent{};
|
||||
quitEvent.type = SDL_EVENT_QUIT;
|
||||
SDL_PushEvent(&quitEvent);
|
||||
|
||||
@ -1289,6 +1289,7 @@ void MainWindow::StopGameforUpdate(bool shouldRelaunch) {
|
||||
|
||||
void MainWindow::StopGame() {
|
||||
if (!isGameRunning) {
|
||||
ShowMessageBox("Stop Game", "No game is currently running.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1297,7 +1298,7 @@ void MainWindow::StopGame() {
|
||||
|
||||
if (isGameRunning == true)
|
||||
;
|
||||
SDL_Event quitEvent;
|
||||
SDL_Event quitEvent{};
|
||||
quitEvent.type = SDL_EVENT_QUIT + 1;
|
||||
SDL_PushEvent(&quitEvent);
|
||||
}
|
Loading…
Reference in New Issue
Block a user