SDL: psp: Hook up event subsystem init/quit. (6cde9)

From 6cde96f9a06b555870fc60b5b3418c2da3b6ee28 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Wed, 22 Nov 2023 17:59:36 -0500
Subject: [PATCH] psp: Hook up event subsystem init/quit.

Fixes #8554.

(cherry picked from commit 0e9d050296ba754d23e82752eb1bd61221768586)
---
 src/video/psp/SDL_pspevents_c.h | 2 ++
 src/video/psp/SDL_pspvideo.c    | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/video/psp/SDL_pspevents_c.h b/src/video/psp/SDL_pspevents_c.h
index dd299a6f27e4..76739678bbb2 100644
--- a/src/video/psp/SDL_pspevents_c.h
+++ b/src/video/psp/SDL_pspevents_c.h
@@ -23,5 +23,7 @@
 
 extern void PSP_InitOSKeymap(SDL_VideoDevice *_this);
 extern void PSP_PumpEvents(SDL_VideoDevice *_this);
+extern int PSP_EventInit(SDL_VideoDevice *_this);
+extern void PSP_EventQuit(SDL_VideoDevice *_this);
 
 /* end of SDL_pspevents_c.h ... */
diff --git a/src/video/psp/SDL_pspvideo.c b/src/video/psp/SDL_pspvideo.c
index 44269db934a9..14a5599dfce5 100644
--- a/src/video/psp/SDL_pspvideo.c
+++ b/src/video/psp/SDL_pspvideo.c
@@ -131,6 +131,10 @@ int PSP_VideoInit(SDL_VideoDevice *_this)
 {
     SDL_DisplayMode mode;
 
+    if (PSP_EventInit(_this) == -1) {
+        return -1;  /* error string would already be set */
+    }
+
     SDL_zero(mode);
     mode.w = 480;
     mode.h = 272;
@@ -145,8 +149,9 @@ int PSP_VideoInit(SDL_VideoDevice *_this)
     return 0;
 }
 
-void PSP_VideoQuit(SDL_VideoDevice *_this)
+void PSP_VideoQuit(_THIS)
 {
+    PSP_EventQuit(_this);
 }
 
 int PSP_GetDisplayModes(SDL_VideoDevice *_this, SDL_VideoDisplay *display)