summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt3
-rw-r--r--src/common/microprofile.cpp7
-rw-r--r--src/common/microprofile.h25
-rw-r--r--src/common/microprofileui.h16
4 files changed, 51 insertions, 0 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index e743a026d..7f3712efa 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -11,6 +11,7 @@ set(SRCS
11 logging/text_formatter.cpp 11 logging/text_formatter.cpp
12 logging/backend.cpp 12 logging/backend.cpp
13 memory_util.cpp 13 memory_util.cpp
14 microprofile.cpp
14 misc.cpp 15 misc.cpp
15 profiler.cpp 16 profiler.cpp
16 scm_rev.cpp 17 scm_rev.cpp
@@ -43,6 +44,8 @@ set(HEADERS
43 make_unique.h 44 make_unique.h
44 math_util.h 45 math_util.h
45 memory_util.h 46 memory_util.h
47 microprofile.h
48 microprofileui.h
46 platform.h 49 platform.h
47 profiler.h 50 profiler.h
48 profiler_reporting.h 51 profiler_reporting.h
diff --git a/src/common/microprofile.cpp b/src/common/microprofile.cpp
new file mode 100644
index 000000000..ee25dd37f
--- /dev/null
+++ b/src/common/microprofile.cpp
@@ -0,0 +1,7 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5// Includes the MicroProfile implementation in this file for compilation
6#define MICROPROFILE_IMPL 1
7#include "common/microprofile.h"
diff --git a/src/common/microprofile.h b/src/common/microprofile.h
new file mode 100644
index 000000000..9eb6016a8
--- /dev/null
+++ b/src/common/microprofile.h
@@ -0,0 +1,25 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7// Customized Citra settings.
8// This file wraps the MicroProfile header so that these are consistent everywhere.
9#define MICROPROFILE_WEBSERVER 0
10#define MICROPROFILE_GPU_TIMERS 0 // TODO: Implement timer queries when we upgrade to OpenGL 3.3
11#define MICROPROFILE_CONTEXT_SWITCH_TRACE 0
12#define MICROPROFILE_PER_THREAD_BUFFER_SIZE (2048<<12) // 8 MB
13
14#include <microprofile.h>
15
16#define MP_RGB(r, g, b) ((r) << 16 | (g) << 8 | (b) << 0)
17
18// On OS X, some Mach header included by MicroProfile defines these as macros, conflicting with
19// identifiers we use.
20#ifdef PAGE_SIZE
21#undef PAGE_SIZE
22#endif
23#ifdef PAGE_MASK
24#undef PAGE_MASK
25#endif
diff --git a/src/common/microprofileui.h b/src/common/microprofileui.h
new file mode 100644
index 000000000..97c369bd9
--- /dev/null
+++ b/src/common/microprofileui.h
@@ -0,0 +1,16 @@
1// Copyright 2015 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "common/microprofile.h"
8
9// Customized Citra settings.
10// This file wraps the MicroProfile header so that these are consistent everywhere.
11#define MICROPROFILE_TEXT_WIDTH 6
12#define MICROPROFILE_TEXT_HEIGHT 12
13#define MICROPROFILE_HELP_ALT "Right-Click"
14#define MICROPROFILE_HELP_MOD "Ctrl"
15
16#include <microprofileui.h>