Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/Common/CommonTypes.h
5664 views
1
// Copyright (C) 2003 Dolphin Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official SVN repository and contact information can be found at
16
// http://code.google.com/p/dolphin-emu/
17
18
19
// This header contains type definitions that are shared between the Dolphin core and
20
// other parts of the code. Any definitions that are only used by the core should be
21
// placed in "Common.h" instead.
22
23
#pragma once
24
25
#if defined(_MSC_VER)
26
27
#define NO_INLINE __declspec(noinline)
28
29
typedef unsigned __int8 u8;
30
typedef unsigned __int16 u16;
31
typedef unsigned __int32 u32;
32
typedef unsigned __int64 u64;
33
34
typedef signed __int8 s8;
35
typedef signed __int16 s16;
36
typedef signed __int32 s32;
37
typedef signed __int64 s64;
38
39
#else
40
41
#define NO_INLINE __attribute__((noinline))
42
43
#ifdef __SWITCH__
44
// Other conflicts
45
#define Event _Event
46
#define Framebuffer _Framebuffer
47
#define Waitable _Waitable
48
#define ThreadContext _ThreadContext
49
#include <switch.h>
50
// Cleanup
51
#undef KeyInputFlags::UP
52
#undef KeyInputFlags::DOWN
53
#undef Event
54
#undef Framebuffer
55
#undef Waitable
56
#undef ThreadContext
57
58
// Conflicting types with libnx
59
#ifndef _u64
60
#define u64 _u64
61
#endif // _u64
62
63
#ifndef s64
64
#define s64 _s64
65
#endif // _s64
66
67
typedef unsigned char u_char;
68
typedef unsigned short u_short;
69
typedef unsigned int u_int;
70
typedef unsigned long u_long;
71
#endif // __SWITCH__
72
73
typedef unsigned char u8;
74
typedef unsigned short u16;
75
typedef unsigned int u32;
76
typedef unsigned long long u64;
77
78
typedef signed char s8;
79
typedef signed short s16;
80
typedef signed int s32;
81
typedef signed long long s64;
82
83
#endif // _WIN32
84
85