From 4bb642d63f694a1d308fe5679deba462b1f618ca Mon Sep 17 00:00:00 2001 From: Joseph Mattello Date: Sun, 14 Nov 2021 05:27:57 -0500 Subject: [PATCH] mupen core feature updates Signed-off-by: Joseph Mattello --- Cores/Mupen64Plus/Compatibility/eventloop.m | 7 ++++++- Cores/Mupen64Plus/Compatibility/osd.m | 2 +- Cores/Mupen64Plus/MupenGameCore.h | 1 + Cores/Mupen64Plus/Plugins/Video/gliden64 | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cores/Mupen64Plus/Compatibility/eventloop.m b/Cores/Mupen64Plus/Compatibility/eventloop.m index fc646edb8b..88be2c5070 100644 --- a/Cores/Mupen64Plus/Compatibility/eventloop.m +++ b/Cores/Mupen64Plus/Compatibility/eventloop.m @@ -26,6 +26,7 @@ #import "osd/osd.h" #import "main/screenshot.h" +#import "../MupenGameCore.h" int event_set_core_defaults(void) { @@ -46,9 +47,13 @@ void event_sdl_keyup(int keysym, int keymod) int event_gameshark_active(void) { - return 0; + GET_CURRENT_OR_RETURN(0); + + return current.isGamesharkActive; } void event_set_gameshark(int active) { + GET_CURRENT_OR_RETURN(); + current.isGamesharkActive = active; } diff --git a/Cores/Mupen64Plus/Compatibility/osd.m b/Cores/Mupen64Plus/Compatibility/osd.m index 3209550e56..e08974201f 100644 --- a/Cores/Mupen64Plus/Compatibility/osd.m +++ b/Cores/Mupen64Plus/Compatibility/osd.m @@ -33,5 +33,5 @@ osd_message_t * osd_message_valid(osd_message_t *m) { - return NULL; + return m; } diff --git a/Cores/Mupen64Plus/MupenGameCore.h b/Cores/Mupen64Plus/MupenGameCore.h index 36f1e5ab6f..258fefcf39 100644 --- a/Cores/Mupen64Plus/MupenGameCore.h +++ b/Cores/Mupen64Plus/MupenGameCore.h @@ -51,6 +51,7 @@ __attribute__((visibility("default"))) @property (nonatomic, assign) int videoWidth; @property (nonatomic, assign) int videoHeight; @property (nonatomic, assign) int videoBitDepth; +@property (nonatomic, assign) BOOL isGamesharkActive; - (void) videoInterrupt; - (void) swapBuffers; diff --git a/Cores/Mupen64Plus/Plugins/Video/gliden64 b/Cores/Mupen64Plus/Plugins/Video/gliden64 index 9f121dc495..6a17b366bf 160000 --- a/Cores/Mupen64Plus/Plugins/Video/gliden64 +++ b/Cores/Mupen64Plus/Plugins/Video/gliden64 @@ -1 +1 @@ -Subproject commit 9f121dc495bbb1fa1904310edd42949e4486fb9e +Subproject commit 6a17b366bf62e6f533fd1503d1fd884256adc177