diff --git a/Common/CommonTypes.h b/Common/CommonTypes.h index ab2b7145af..2fc1451c0b 100644 --- a/Common/CommonTypes.h +++ b/Common/CommonTypes.h @@ -36,6 +36,39 @@ typedef signed __int64 s64; #else +#ifdef __SWITCH__ +// Some HID conflicts +#define KEY_UP PKEY_UP +#define KEY_DOWN PKEY_DOWN +// Other conflicts +#define Event _Event +#define Framebuffer _Framebuffer +#define Waitable _Waitable +#define ThreadContext _ThreadContext +#include +// Cleanup +#undef KEY_UP +#undef KEY_DOWN +#undef Event +#undef Framebuffer +#undef Waitable +#undef ThreadContext + +// Conflicting types with libnx +#ifndef _u64 +#define u64 _u64 +#endif // _u64 + +#ifndef s64 +#define s64 _s64 +#endif // _s64 + +typedef unsigned char u_char; +typedef unsigned short u_short; +typedef unsigned int u_int; +typedef unsigned long u_long; +#endif // __SWITCH__ + typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32;