CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Common/CommonTypes.h
Views: 1401
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
typedef unsigned __int8 u8;
28
typedef unsigned __int16 u16;
29
typedef unsigned __int32 u32;
30
typedef unsigned __int64 u64;
31
32
typedef signed __int8 s8;
33
typedef signed __int16 s16;
34
typedef signed __int32 s32;
35
typedef signed __int64 s64;
36
37
#else
38
39
#ifdef __SWITCH__
40
// Some HID conflicts
41
#define KEY_UP PKEY_UP
42
#define KEY_DOWN PKEY_DOWN
43
// Other conflicts
44
#define Event _Event
45
#define Framebuffer _Framebuffer
46
#define Waitable _Waitable
47
#define ThreadContext _ThreadContext
48
#include <switch.h>
49
// Cleanup
50
#undef KEY_UP
51
#undef KEY_DOWN
52
#undef Event
53
#undef Framebuffer
54
#undef Waitable
55
#undef ThreadContext
56
57
// Conflicting types with libnx
58
#ifndef _u64
59
#define u64 _u64
60
#endif // _u64
61
62
#ifndef s64
63
#define s64 _s64
64
#endif // _s64
65
66
typedef unsigned char u_char;
67
typedef unsigned short u_short;
68
typedef unsigned int u_int;
69
typedef unsigned long u_long;
70
#endif // __SWITCH__
71
72
typedef unsigned char u8;
73
typedef unsigned short u16;
74
typedef unsigned int u32;
75
typedef unsigned long long u64;
76
77
typedef signed char s8;
78
typedef signed short s16;
79
typedef signed int s32;
80
typedef signed long long s64;
81
82
#endif // _WIN32
83
84