Skip to content

Commit 044df47

Browse files
committed
Whoops we can't zero initialize that
1 parent 57d8b8e commit 044df47

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libogc/stm.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,13 @@ struct eventhook {
6666
s32 fd;
6767
u32 event_code;
6868
stmcallback callback;
69-
enum { EVENTHOOK_UNSET = 0, EVENTHOOK_SET } state;
69+
enum { EVENTHOOK_UNSET, EVENTHOOK_SET } state;
7070
};
7171

72-
static struct eventhook __stm_eventhook;
72+
static struct eventhook __stm_eventhook = {
73+
.fd = -1,
74+
.state = EVENTHOOK_UNSET,
75+
};
7376

7477
static s32 __STMEventCallback(s32 result,void *usrdata);
7578
s32 __STM_SetEventHook(void);
@@ -157,7 +160,7 @@ static s32 __STMEventCallback(s32 result, void *usrdata)
157160
STM_printf("event=%08x\n", __stm_eventhook.event_code);
158161

159162
if (__stm_eventhook.event_code == 0) { // Release
160-
return 0;
163+
return result;
161164
}
162165
else {
163166
if (__stm_eventhook.callback)

0 commit comments

Comments
 (0)