From a3546e50697f2424a39f991148708c60903c553b Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 18 Aug 2024 08:25:44 -0700
Subject: [PATCH] PSP: Throw SDL_EVENT_QUIT event upon exit (thanks
@sharkwouter!)
Closes https://github.com/libsdl-org/SDL/pull/10565
(cherry picked from commit 59ac561062b9d842cb27849905225cdc0ac183ac)
---
src/main/psp/SDL_psp_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/psp/SDL_psp_main.c b/src/main/psp/SDL_psp_main.c
index 3d083cc75a9fd..c3555b3cf083b 100644
--- a/src/main/psp/SDL_psp_main.c
+++ b/src/main/psp/SDL_psp_main.c
@@ -8,6 +8,7 @@
#include "SDL_main.h"
#include <pspkernel.h>
#include <pspthreadman.h>
+#include "../../events/SDL_events_c.h"
#ifdef main
#undef main
@@ -28,7 +29,7 @@ PSP_MAIN_THREAD_ATTR(THREAD_ATTR_VFPU | THREAD_ATTR_USER);
int sdl_psp_exit_callback(int arg1, int arg2, void *common)
{
- sceKernelExitGame();
+ SDL_SendQuit();
return 0;
}