少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
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
#include "il2cpp-config.h"
#include "icalls/mscorlib/System.Threading/NativeEventCalls.h"
#include "os/Event.h"
#include "vm/Exception.h"
 
namespace il2cpp
{
namespace icalls
{
namespace mscorlib
{
namespace System
{
namespace Threading
{
    bool NativeEventCalls::ResetEvent_internal(intptr_t handlePtr)
    {
        os::EventHandle* handle = (os::EventHandle*)handlePtr;
        os::ErrorCode result = handle->Get().Reset();
 
        return os::kErrorCodeSuccess == result;
    }
 
    bool NativeEventCalls::SetEvent_internal(intptr_t handlePtr)
    {
        os::EventHandle* handle = (os::EventHandle*)handlePtr;
        os::ErrorCode result = handle->Get().Set();
 
        return os::kErrorCodeSuccess == result;
    }
 
    intptr_t NativeEventCalls::CreateEvent_internal(bool manual, bool initial, Il2CppString* name, int32_t *errorCode)
    {
        *errorCode = 0;
        il2cpp::os::Event* event = NULL;
 
        if (name == NULL)
            event = new os::Event(manual, initial);
        else
            NOT_SUPPORTED_IL2CPP(NativeEventCalls::CreateEvent_internal, "Named events are not supported.");
 
        return reinterpret_cast<intptr_t>(new os::EventHandle(event));
    }
 
    intptr_t NativeEventCalls::OpenEvent_internal(Il2CppString* name, EventWaitHandleRights rights, int32_t* errorCode)
    {
        IL2CPP_NOT_IMPLEMENTED_ICALL(NativeEventCalls::OpenEvent_internal);
        return intptr_t();
    }
 
    void NativeEventCalls::CloseEvent_internal(intptr_t handlePtr)
    {
        os::Handle* handle = (os::Handle*)handlePtr;
        // should we close or just delete
        //handle->Close ();
        delete handle;
    }
} /* namespace Threading */
} /* namespace System */
} /* namespace mscorlib */
} /* namespace icalls */
} /* namespace il2cpp */