We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d91b72 commit 51a5826Copy full SHA for 51a5826
1 file changed
libogc/stm.c
@@ -66,10 +66,13 @@ struct eventhook {
66
s32 fd;
67
u32 event_code;
68
stmcallback callback;
69
- enum { EVENTHOOK_UNSET = 0, EVENTHOOK_SET } state;
+ enum { EVENTHOOK_UNSET, EVENTHOOK_SET } state;
70
};
71
72
-static struct eventhook __stm_eventhook;
+static struct eventhook __stm_eventhook = {
73
+ .fd = -1,
74
+ .state = EVENTHOOK_UNSET,
75
+};
76
77
static s32 __STMEventCallback(s32 result,void *usrdata);
78
s32 __STM_SetEventHook(void);
@@ -157,7 +160,7 @@ static s32 __STMEventCallback(s32 result, void *usrdata)
157
160
STM_printf("event=%08x\n", __stm_eventhook.event_code);
158
161
159
162
if (__stm_eventhook.event_code == 0) { // Release
- return 0;
163
+ return result;
164
}
165
else {
166
if (__stm_eventhook.callback)
0 commit comments