forked from focus-creative-games/il2cpp_plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvent.cpp
More file actions
82 lines (67 loc) · 1.85 KB
/
Event.cpp
File metadata and controls
82 lines (67 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include "il2cpp-config.h"
#if !RUNTIME_TINY
#include "os/c-api/Event-c-api.h"
#include "os/Event.h"
extern "C"
{
UnityPalEvent* UnityPalEventNew(int32_t manualReset, int32_t signaled)
{
return new il2cpp::os::Event(manualReset, signaled);
}
void UnityPalEventDelete(UnityPalEvent* event)
{
IL2CPP_ASSERT(event);
delete event;
}
UnityPalErrorCode UnityPalEventSet(UnityPalEvent* event)
{
IL2CPP_ASSERT(event);
return event->Set();
}
UnityPalErrorCode UnityPalEventReset(UnityPalEvent* event)
{
IL2CPP_ASSERT(event);
return event->Reset();
}
UnityPalWaitStatus UnityPalEventWait(UnityPalEvent* event, int32_t interruptible)
{
IL2CPP_ASSERT(event);
return event->Wait((bool)interruptible);
}
UnityPalWaitStatus UnityPalEventWaitMs(UnityPalEvent* event, uint32_t ms, int32_t interruptible)
{
IL2CPP_ASSERT(event);
return event->Wait(ms, interruptible);
}
UnityPalEventHandle* UnityPalEventHandleNew(UnityPalEvent* event)
{
IL2CPP_ASSERT(event);
return new UnityPalEventHandle(event);
}
void UnityPalEventHandleDelete(UnityPalEventHandle* handle)
{
IL2CPP_ASSERT(handle);
delete handle;
}
int32_t UnityPalEventHandleWait(UnityPalEventHandle* handle)
{
IL2CPP_ASSERT(handle);
return handle->Wait();
}
int32_t UnityPalEventHandleWaitMs(UnityPalEventHandle* handle, uint32_t ms)
{
IL2CPP_ASSERT(handle);
return handle->Wait(ms);
}
void UnityPalEventHandleSignal(UnityPalEventHandle* handle)
{
IL2CPP_ASSERT(handle);
handle->Signal();
}
UnityPalEvent* UnityPalEventHandleGet(UnityPalEventHandle* handle)
{
IL2CPP_ASSERT(handle);
return &handle->Get();
}
}
#endif