summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-07-10 16:36:12 -0700
committerGravatar Yuri Kunde Schlesner2015-07-10 16:36:12 -0700
commit867c28ae03b3b2883713896765f3ff76eaf90a19 (patch)
tree8ff8cf3ab24d2f167c19217efb8175a8841c0359 /src/core
parentMerge pull request #906 from aroulin/loader-format-specifier-warning (diff)
parentCore: Cleanup hw includes. (diff)
downloadyuzu-867c28ae03b3b2883713896765f3ff76eaf90a19.tar.gz
yuzu-867c28ae03b3b2883713896765f3ff76eaf90a19.tar.xz
yuzu-867c28ae03b3b2883713896765f3ff76eaf90a19.zip
Merge pull request #876 from linkmauve/include-cleanups
Cleanup includes, mostly in common
Diffstat (limited to 'src/core')
-rw-r--r--src/core/arm/disassembler/load_symbol_map.cpp1
-rw-r--r--src/core/arm/dyncom/arm_dyncom.h5
-rw-r--r--src/core/arm/skyeye_common/vfp/vfp.cpp6
-rw-r--r--src/core/arm/skyeye_common/vfp/vfpsingle.cpp4
-rw-r--r--src/core/core.cpp3
-rw-r--r--src/core/core_timing.cpp4
-rw-r--r--src/core/file_sys/archive_backend.cpp2
-rw-r--r--src/core/file_sys/archive_extsavedata.cpp5
-rw-r--r--src/core/file_sys/archive_extsavedata.h7
-rw-r--r--src/core/file_sys/archive_romfs.cpp3
-rw-r--r--src/core/file_sys/archive_romfs.h4
-rw-r--r--src/core/file_sys/archive_savedata.cpp4
-rw-r--r--src/core/file_sys/archive_savedata.h7
-rw-r--r--src/core/file_sys/archive_savedatacheck.cpp6
-rw-r--r--src/core/file_sys/archive_savedatacheck.h9
-rw-r--r--src/core/file_sys/archive_sdmc.cpp3
-rw-r--r--src/core/file_sys/archive_sdmc.h7
-rw-r--r--src/core/file_sys/archive_systemsavedata.cpp6
-rw-r--r--src/core/file_sys/archive_systemsavedata.h7
-rw-r--r--src/core/file_sys/disk_archive.cpp4
-rw-r--r--src/core/file_sys/disk_archive.h7
-rw-r--r--src/core/file_sys/file_backend.h2
-rw-r--r--src/core/file_sys/ivfc_archive.cpp2
-rw-r--r--src/core/file_sys/ivfc_archive.h4
-rw-r--r--src/core/hle/hle.cpp1
-rw-r--r--src/core/hle/kernel/kernel.cpp2
-rw-r--r--src/core/hle/kernel/kernel.h7
-rw-r--r--src/core/hle/kernel/process.h3
-rw-r--r--src/core/hle/kernel/session.h6
-rw-r--r--src/core/hle/kernel/thread.h1
-rw-r--r--src/core/hle/kernel/vm_manager.cpp2
-rw-r--r--src/core/hle/kernel/vm_manager.h1
-rw-r--r--src/core/hle/result.h2
-rw-r--r--src/core/hle/service/dsp_dsp.h2
-rw-r--r--src/core/hle/service/fs/archive.cpp10
-rw-r--r--src/core/hle/service/fs/archive.h13
-rw-r--r--src/core/hle/service/gsp_gpu.cpp4
-rw-r--r--src/core/hle/service/gsp_gpu.h3
-rw-r--r--src/core/hle/service/hid/hid.cpp1
-rw-r--r--src/core/hle/service/hid/hid.h16
-rw-r--r--src/core/hle/service/service.h3
-rw-r--r--src/core/hle/service/soc_u.cpp75
-rw-r--r--src/core/hle/service/soc_u.h2
-rw-r--r--src/core/hle/service/y2r_u.cpp1
-rw-r--r--src/core/hle/service/y2r_u.h2
-rw-r--r--src/core/hle/shared_page.cpp6
-rw-r--r--src/core/hle/shared_page.h3
-rw-r--r--src/core/hw/gpu.cpp11
-rw-r--r--src/core/hw/gpu.h1
-rw-r--r--src/core/hw/lcd.cpp2
-rw-r--r--src/core/hw/lcd.h1
-rw-r--r--src/core/hw/y2r.cpp4
-rw-r--r--src/core/loader/elf.cpp3
-rw-r--r--src/core/loader/loader.cpp2
-rw-r--r--src/core/loader/loader.h8
-rw-r--r--src/core/loader/ncch.cpp3
-rw-r--r--src/core/mem_map.cpp5
-rw-r--r--src/core/memory.cpp3
-rw-r--r--src/core/memory.h2
59 files changed, 203 insertions, 120 deletions
diff --git a/src/core/arm/disassembler/load_symbol_map.cpp b/src/core/arm/disassembler/load_symbol_map.cpp
index 13d26d170..eb20bf6f7 100644
--- a/src/core/arm/disassembler/load_symbol_map.cpp
+++ b/src/core/arm/disassembler/load_symbol_map.cpp
@@ -2,6 +2,7 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <sstream>
5#include <string> 6#include <string>
6#include <vector> 7#include <vector>
7 8
diff --git a/src/core/arm/dyncom/arm_dyncom.h b/src/core/arm/dyncom/arm_dyncom.h
index 2488c879c..cc9355722 100644
--- a/src/core/arm/dyncom/arm_dyncom.h
+++ b/src/core/arm/dyncom/arm_dyncom.h
@@ -10,6 +10,11 @@
10 10
11#include "core/arm/arm_interface.h" 11#include "core/arm/arm_interface.h"
12#include "core/arm/skyeye_common/armdefs.h" 12#include "core/arm/skyeye_common/armdefs.h"
13#include "core/arm/skyeye_common/arm_regformat.h"
14
15namespace Core {
16struct ThreadContext;
17}
13 18
14class ARM_DynCom final : virtual public ARM_Interface { 19class ARM_DynCom final : virtual public ARM_Interface {
15public: 20public:
diff --git a/src/core/arm/skyeye_common/vfp/vfp.cpp b/src/core/arm/skyeye_common/vfp/vfp.cpp
index 592d32a74..1ffc1f9af 100644
--- a/src/core/arm/skyeye_common/vfp/vfp.cpp
+++ b/src/core/arm/skyeye_common/vfp/vfp.cpp
@@ -20,6 +20,7 @@
20 20
21/* Note: this file handles interface with arm core and vfp registers */ 21/* Note: this file handles interface with arm core and vfp registers */
22 22
23#include "common/common_funcs.h"
23#include "common/logging/log.h" 24#include "common/logging/log.h"
24 25
25#include "core/arm/skyeye_common/armdefs.h" 26#include "core/arm/skyeye_common/armdefs.h"
@@ -143,9 +144,8 @@ void vfp_raise_exceptions(ARMul_State* state, u32 exceptions, u32 inst, u32 fpsc
143 LOG_TRACE(Core_ARM11, "VFP: raising exceptions %08x\n", exceptions); 144 LOG_TRACE(Core_ARM11, "VFP: raising exceptions %08x\n", exceptions);
144 145
145 if (exceptions == VFP_EXCEPTION_ERROR) { 146 if (exceptions == VFP_EXCEPTION_ERROR) {
146 LOG_TRACE(Core_ARM11, "unhandled bounce %x\n", inst); 147 LOG_CRITICAL(Core_ARM11, "unhandled bounce %x\n", inst);
147 exit(-1); 148 Crash();
148 return;
149 } 149 }
150 150
151 /* 151 /*
diff --git a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
index 5a655a6f2..e5d339252 100644
--- a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
+++ b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
@@ -53,6 +53,8 @@
53 53
54#include <cinttypes> 54#include <cinttypes>
55 55
56#include "common/common_funcs.h"
57#include "common/common_types.h"
56#include "common/logging/log.h" 58#include "common/logging/log.h"
57 59
58#include "core/arm/skyeye_common/vfp/vfp_helper.h" 60#include "core/arm/skyeye_common/vfp/vfp_helper.h"
@@ -1246,7 +1248,7 @@ u32 vfp_single_cpdo(ARMul_State* state, u32 inst, u32 fpscr)
1246 1248
1247 if (!fop->fn) { 1249 if (!fop->fn) {
1248 LOG_CRITICAL(Core_ARM11, "could not find single op %d, inst=0x%x@0x%x", FEXT_TO_IDX(inst), inst, state->Reg[15]); 1250 LOG_CRITICAL(Core_ARM11, "could not find single op %d, inst=0x%x@0x%x", FEXT_TO_IDX(inst), inst, state->Reg[15]);
1249 exit(-1); 1251 Crash();
1250 goto invalid; 1252 goto invalid;
1251 } 1253 }
1252 1254
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 79038cd52..dddc16708 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -2,15 +2,12 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "common/common_types.h"
6#include "common/logging/log.h" 5#include "common/logging/log.h"
7 6
8#include "core/core.h" 7#include "core/core.h"
9#include "core/core_timing.h" 8#include "core/core_timing.h"
10 9
11#include "core/settings.h"
12#include "core/arm/arm_interface.h" 10#include "core/arm/arm_interface.h"
13#include "core/arm/disassembler/arm_disasm.h"
14#include "core/arm/dyncom/arm_dyncom.h" 11#include "core/arm/dyncom/arm_dyncom.h"
15#include "core/hle/hle.h" 12#include "core/hle/hle.h"
16#include "core/hle/kernel/thread.h" 13#include "core/hle/kernel/thread.h"
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index e53c2e606..72006a53e 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -3,12 +3,12 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <atomic> 5#include <atomic>
6#include <cstdio>
7#include <mutex> 6#include <mutex>
8#include <vector> 7#include <vector>
9 8
10#include "common/assert.h"
11#include "common/chunk_file.h" 9#include "common/chunk_file.h"
10#include "common/logging/log.h"
11#include "common/string_util.h"
12 12
13#include "core/arm/arm_interface.h" 13#include "core/arm/arm_interface.h"
14#include "core/core.h" 14#include "core/core.h"
diff --git a/src/core/file_sys/archive_backend.cpp b/src/core/file_sys/archive_backend.cpp
index 45a559ce8..3f81447df 100644
--- a/src/core/file_sys/archive_backend.cpp
+++ b/src/core/file_sys/archive_backend.cpp
@@ -2,6 +2,8 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <cstddef>
6#include <iomanip>
5#include <sstream> 7#include <sstream>
6 8
7#include "common/logging/log.h" 9#include "common/logging/log.h"
diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp
index e50c58a52..92dad8e6f 100644
--- a/src/core/file_sys/archive_extsavedata.cpp
+++ b/src/core/file_sys/archive_extsavedata.cpp
@@ -2,17 +2,18 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <sys/stat.h> 5#include <algorithm>
6#include <vector>
6 7
7#include "common/common_types.h" 8#include "common/common_types.h"
8#include "common/file_util.h" 9#include "common/file_util.h"
9#include "common/logging/log.h" 10#include "common/logging/log.h"
10#include "common/make_unique.h" 11#include "common/make_unique.h"
12#include "common/string_util.h"
11 13
12#include "core/file_sys/archive_extsavedata.h" 14#include "core/file_sys/archive_extsavedata.h"
13#include "core/file_sys/disk_archive.h" 15#include "core/file_sys/disk_archive.h"
14#include "core/hle/service/fs/archive.h" 16#include "core/hle/service/fs/archive.h"
15#include "core/settings.h"
16 17
17//////////////////////////////////////////////////////////////////////////////////////////////////// 18////////////////////////////////////////////////////////////////////////////////////////////////////
18// FileSys namespace 19// FileSys namespace
diff --git a/src/core/file_sys/archive_extsavedata.h b/src/core/file_sys/archive_extsavedata.h
index ef0b27bde..ec8d770fc 100644
--- a/src/core/file_sys/archive_extsavedata.h
+++ b/src/core/file_sys/archive_extsavedata.h
@@ -4,10 +4,13 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <memory>
8#include <string>
9
7#include "common/common_types.h" 10#include "common/common_types.h"
8 11
9#include "core/file_sys/disk_archive.h" 12#include "core/file_sys/archive_backend.h"
10#include "core/loader/loader.h" 13#include "core/hle/result.h"
11 14
12//////////////////////////////////////////////////////////////////////////////////////////////////// 15////////////////////////////////////////////////////////////////////////////////////////////////////
13// FileSys namespace 16// FileSys namespace
diff --git a/src/core/file_sys/archive_romfs.cpp b/src/core/file_sys/archive_romfs.cpp
index d4a12ed10..c1e45dfeb 100644
--- a/src/core/file_sys/archive_romfs.cpp
+++ b/src/core/file_sys/archive_romfs.cpp
@@ -2,14 +2,15 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm>
5#include <memory> 6#include <memory>
6 7
7#include "common/common_types.h" 8#include "common/common_types.h"
8#include "common/file_util.h"
9#include "common/logging/log.h" 9#include "common/logging/log.h"
10#include "common/make_unique.h" 10#include "common/make_unique.h"
11 11
12#include "core/file_sys/archive_romfs.h" 12#include "core/file_sys/archive_romfs.h"
13#include "core/file_sys/ivfc_archive.h"
13 14
14//////////////////////////////////////////////////////////////////////////////////////////////////// 15////////////////////////////////////////////////////////////////////////////////////////////////////
15// FileSys namespace 16// FileSys namespace
diff --git a/src/core/file_sys/archive_romfs.h b/src/core/file_sys/archive_romfs.h
index 409bc670a..c69ff91c3 100644
--- a/src/core/file_sys/archive_romfs.h
+++ b/src/core/file_sys/archive_romfs.h
@@ -5,11 +5,13 @@
5#pragma once 5#pragma once
6 6
7#include <memory> 7#include <memory>
8#include <string>
8#include <vector> 9#include <vector>
9 10
10#include "common/common_types.h" 11#include "common/common_types.h"
11 12
12#include "core/file_sys/ivfc_archive.h" 13#include "core/file_sys/archive_backend.h"
14#include "core/hle/result.h"
13#include "core/loader/loader.h" 15#include "core/loader/loader.h"
14 16
15//////////////////////////////////////////////////////////////////////////////////////////////////// 17////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/file_sys/archive_savedata.cpp b/src/core/file_sys/archive_savedata.cpp
index a92309377..98823aec3 100644
--- a/src/core/file_sys/archive_savedata.cpp
+++ b/src/core/file_sys/archive_savedata.cpp
@@ -2,18 +2,18 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <sys/stat.h> 5#include <algorithm>
6 6
7#include "common/common_types.h" 7#include "common/common_types.h"
8#include "common/file_util.h" 8#include "common/file_util.h"
9#include "common/logging/log.h" 9#include "common/logging/log.h"
10#include "common/make_unique.h" 10#include "common/make_unique.h"
11#include "common/string_util.h"
11 12
12#include "core/file_sys/archive_savedata.h" 13#include "core/file_sys/archive_savedata.h"
13#include "core/file_sys/disk_archive.h" 14#include "core/file_sys/disk_archive.h"
14#include "core/hle/kernel/process.h" 15#include "core/hle/kernel/process.h"
15#include "core/hle/service/fs/archive.h" 16#include "core/hle/service/fs/archive.h"
16#include "core/settings.h"
17 17
18//////////////////////////////////////////////////////////////////////////////////////////////////// 18////////////////////////////////////////////////////////////////////////////////////////////////////
19// FileSys namespace 19// FileSys namespace
diff --git a/src/core/file_sys/archive_savedata.h b/src/core/file_sys/archive_savedata.h
index db17afc92..1f65297dd 100644
--- a/src/core/file_sys/archive_savedata.h
+++ b/src/core/file_sys/archive_savedata.h
@@ -4,10 +4,11 @@
4 4
5#pragma once 5#pragma once
6 6
7#include "common/common_types.h" 7#include <memory>
8#include <string>
8 9
9#include "core/file_sys/disk_archive.h" 10#include "core/file_sys/archive_backend.h"
10#include "core/loader/loader.h" 11#include "core/hle/result.h"
11 12
12//////////////////////////////////////////////////////////////////////////////////////////////////// 13////////////////////////////////////////////////////////////////////////////////////////////////////
13// FileSys namespace 14// FileSys namespace
diff --git a/src/core/file_sys/archive_savedatacheck.cpp b/src/core/file_sys/archive_savedatacheck.cpp
index e7e4fbf1d..dec838cae 100644
--- a/src/core/file_sys/archive_savedatacheck.cpp
+++ b/src/core/file_sys/archive_savedatacheck.cpp
@@ -2,11 +2,17 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm>
6#include <vector>
7
8#include "common/common_types.h"
5#include "common/file_util.h" 9#include "common/file_util.h"
6#include "common/logging/log.h" 10#include "common/logging/log.h"
7#include "common/make_unique.h" 11#include "common/make_unique.h"
12#include "common/string_util.h"
8 13
9#include "core/file_sys/archive_savedatacheck.h" 14#include "core/file_sys/archive_savedatacheck.h"
15#include "core/file_sys/ivfc_archive.h"
10#include "core/hle/service/fs/archive.h" 16#include "core/hle/service/fs/archive.h"
11 17
12//////////////////////////////////////////////////////////////////////////////////////////////////// 18////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/file_sys/archive_savedatacheck.h b/src/core/file_sys/archive_savedatacheck.h
index f78a6f02e..b14aefe8b 100644
--- a/src/core/file_sys/archive_savedatacheck.h
+++ b/src/core/file_sys/archive_savedatacheck.h
@@ -4,12 +4,11 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <vector> 7#include <memory>
8#include <string>
8 9
9#include "common/common_types.h" 10#include "core/file_sys/archive_backend.h"
10 11#include "core/hle/result.h"
11#include "core/file_sys/ivfc_archive.h"
12#include "core/loader/loader.h"
13 12
14//////////////////////////////////////////////////////////////////////////////////////////////////// 13////////////////////////////////////////////////////////////////////////////////////////////////////
15// FileSys namespace 14// FileSys namespace
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp
index c1234a186..5c825f429 100644
--- a/src/core/file_sys/archive_sdmc.cpp
+++ b/src/core/file_sys/archive_sdmc.cpp
@@ -2,9 +2,8 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <sys/stat.h> 5#include <algorithm>
6 6
7#include "common/common_types.h"
8#include "common/file_util.h" 7#include "common/file_util.h"
9#include "common/logging/log.h" 8#include "common/logging/log.h"
10#include "common/make_unique.h" 9#include "common/make_unique.h"
diff --git a/src/core/file_sys/archive_sdmc.h b/src/core/file_sys/archive_sdmc.h
index 1becf6c0f..10b273bdb 100644
--- a/src/core/file_sys/archive_sdmc.h
+++ b/src/core/file_sys/archive_sdmc.h
@@ -4,10 +4,11 @@
4 4
5#pragma once 5#pragma once
6 6
7#include "common/common_types.h" 7#include <memory>
8#include <string>
8 9
9#include "core/file_sys/disk_archive.h" 10#include "core/file_sys/archive_backend.h"
10#include "core/loader/loader.h" 11#include "core/hle/result.h"
11 12
12//////////////////////////////////////////////////////////////////////////////////////////////////// 13////////////////////////////////////////////////////////////////////////////////////////////////////
13// FileSys namespace 14// FileSys namespace
diff --git a/src/core/file_sys/archive_systemsavedata.cpp b/src/core/file_sys/archive_systemsavedata.cpp
index 4fe785c97..896f89529 100644
--- a/src/core/file_sys/archive_systemsavedata.cpp
+++ b/src/core/file_sys/archive_systemsavedata.cpp
@@ -2,15 +2,17 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <sys/stat.h> 5#include <algorithm>
6#include <vector>
6 7
7#include "common/common_types.h" 8#include "common/common_types.h"
8#include "common/file_util.h" 9#include "common/file_util.h"
9#include "common/make_unique.h" 10#include "common/make_unique.h"
11#include "common/string_util.h"
10 12
11#include "core/file_sys/archive_systemsavedata.h" 13#include "core/file_sys/archive_systemsavedata.h"
14#include "core/file_sys/disk_archive.h"
12#include "core/hle/service/fs/archive.h" 15#include "core/hle/service/fs/archive.h"
13#include "core/settings.h"
14 16
15//////////////////////////////////////////////////////////////////////////////////////////////////// 17////////////////////////////////////////////////////////////////////////////////////////////////////
16// FileSys namespace 18// FileSys namespace
diff --git a/src/core/file_sys/archive_systemsavedata.h b/src/core/file_sys/archive_systemsavedata.h
index 3431fed88..afc689848 100644
--- a/src/core/file_sys/archive_systemsavedata.h
+++ b/src/core/file_sys/archive_systemsavedata.h
@@ -4,10 +4,13 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <memory>
8#include <string>
9
7#include "common/common_types.h" 10#include "common/common_types.h"
8 11
9#include "core/file_sys/disk_archive.h" 12#include "core/file_sys/archive_backend.h"
10#include "core/loader/loader.h" 13#include "core/hle/result.h"
11 14
12//////////////////////////////////////////////////////////////////////////////////////////////////// 15////////////////////////////////////////////////////////////////////////////////////////////////////
13// FileSys namespace 16// FileSys namespace
diff --git a/src/core/file_sys/disk_archive.cpp b/src/core/file_sys/disk_archive.cpp
index 9980cced1..85151a311 100644
--- a/src/core/file_sys/disk_archive.cpp
+++ b/src/core/file_sys/disk_archive.cpp
@@ -2,7 +2,8 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <sys/stat.h> 5#include <algorithm>
6#include <cstdio>
6 7
7#include "common/common_types.h" 8#include "common/common_types.h"
8#include "common/file_util.h" 9#include "common/file_util.h"
@@ -10,7 +11,6 @@
10#include "common/make_unique.h" 11#include "common/make_unique.h"
11 12
12#include "core/file_sys/disk_archive.h" 13#include "core/file_sys/disk_archive.h"
13#include "core/settings.h"
14 14
15//////////////////////////////////////////////////////////////////////////////////////////////////// 15////////////////////////////////////////////////////////////////////////////////////////////////////
16// FileSys namespace 16// FileSys namespace
diff --git a/src/core/file_sys/disk_archive.h b/src/core/file_sys/disk_archive.h
index a22d3837a..5cfcddf6c 100644
--- a/src/core/file_sys/disk_archive.h
+++ b/src/core/file_sys/disk_archive.h
@@ -4,13 +4,18 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <cstddef>
8#include <memory>
9#include <string>
10#include <vector>
11
7#include "common/common_types.h" 12#include "common/common_types.h"
8#include "common/file_util.h" 13#include "common/file_util.h"
9 14
10#include "core/file_sys/archive_backend.h" 15#include "core/file_sys/archive_backend.h"
11#include "core/file_sys/directory_backend.h" 16#include "core/file_sys/directory_backend.h"
12#include "core/file_sys/file_backend.h" 17#include "core/file_sys/file_backend.h"
13#include "core/loader/loader.h" 18#include "core/hle/result.h"
14 19
15//////////////////////////////////////////////////////////////////////////////////////////////////// 20////////////////////////////////////////////////////////////////////////////////////////////////////
16// FileSys namespace 21// FileSys namespace
diff --git a/src/core/file_sys/file_backend.h b/src/core/file_sys/file_backend.h
index 0fcff1845..f5f72c722 100644
--- a/src/core/file_sys/file_backend.h
+++ b/src/core/file_sys/file_backend.h
@@ -4,6 +4,8 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <cstddef>
8
7#include "common/common_types.h" 9#include "common/common_types.h"
8 10
9//////////////////////////////////////////////////////////////////////////////////////////////////// 11////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/file_sys/ivfc_archive.cpp b/src/core/file_sys/ivfc_archive.cpp
index 2d2509d16..c88b39bcd 100644
--- a/src/core/file_sys/ivfc_archive.cpp
+++ b/src/core/file_sys/ivfc_archive.cpp
@@ -2,10 +2,10 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <cstring>
5#include <memory> 6#include <memory>
6 7
7#include "common/common_types.h" 8#include "common/common_types.h"
8#include "common/file_util.h"
9#include "common/logging/log.h" 9#include "common/logging/log.h"
10#include "common/make_unique.h" 10#include "common/make_unique.h"
11 11
diff --git a/src/core/file_sys/ivfc_archive.h b/src/core/file_sys/ivfc_archive.h
index 10415798d..1850b3b17 100644
--- a/src/core/file_sys/ivfc_archive.h
+++ b/src/core/file_sys/ivfc_archive.h
@@ -4,7 +4,9 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <cstddef>
7#include <memory> 8#include <memory>
9#include <string>
8#include <vector> 10#include <vector>
9 11
10#include "common/common_types.h" 12#include "common/common_types.h"
@@ -12,7 +14,7 @@
12#include "core/file_sys/archive_backend.h" 14#include "core/file_sys/archive_backend.h"
13#include "core/file_sys/directory_backend.h" 15#include "core/file_sys/directory_backend.h"
14#include "core/file_sys/file_backend.h" 16#include "core/file_sys/file_backend.h"
15#include "core/loader/loader.h" 17#include "core/hle/result.h"
16 18
17//////////////////////////////////////////////////////////////////////////////////////////////////// 19////////////////////////////////////////////////////////////////////////////////////////////////////
18// FileSys namespace 20// FileSys namespace
diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp
index fdeb9a028..cd0a400dc 100644
--- a/src/core/hle/hle.cpp
+++ b/src/core/hle/hle.cpp
@@ -10,7 +10,6 @@
10#include "core/hle/hle.h" 10#include "core/hle/hle.h"
11#include "core/hle/config_mem.h" 11#include "core/hle/config_mem.h"
12#include "core/hle/shared_page.h" 12#include "core/hle/shared_page.h"
13#include "core/hle/kernel/thread.h"
14#include "core/hle/service/service.h" 13#include "core/hle/service/service.h"
15 14
16//////////////////////////////////////////////////////////////////////////////////////////////////// 15////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 20e11da16..5711c0405 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -7,8 +7,6 @@
7#include "common/assert.h" 7#include "common/assert.h"
8#include "common/logging/log.h" 8#include "common/logging/log.h"
9 9
10#include "core/arm/arm_interface.h"
11#include "core/core.h"
12#include "core/hle/kernel/kernel.h" 10#include "core/hle/kernel/kernel.h"
13#include "core/hle/kernel/resource_limit.h" 11#include "core/hle/kernel/resource_limit.h"
14#include "core/hle/kernel/process.h" 12#include "core/hle/kernel/process.h"
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 64595f758..b29260b5d 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -4,10 +4,11 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <boost/intrusive_ptr.hpp> 7#include <boost/smart_ptr/intrusive_ptr.hpp>
8 8
9#include <algorithm>
9#include <array> 10#include <array>
10#include <memory> 11#include <cstddef>
11#include <string> 12#include <string>
12#include <vector> 13#include <vector>
13 14
@@ -16,8 +17,6 @@
16#include "core/hle/hle.h" 17#include "core/hle/hle.h"
17#include "core/hle/result.h" 18#include "core/hle/result.h"
18 19
19struct ApplicationInfo;
20
21namespace Kernel { 20namespace Kernel {
22 21
23class Thread; 22class Thread;
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h
index 7b8a68610..674f5093a 100644
--- a/src/core/hle/kernel/process.h
+++ b/src/core/hle/kernel/process.h
@@ -5,6 +5,8 @@
5#pragma once 5#pragma once
6 6
7#include <bitset> 7#include <bitset>
8#include <cstddef>
9#include <string>
8 10
9#include <boost/container/static_vector.hpp> 11#include <boost/container/static_vector.hpp>
10 12
@@ -12,7 +14,6 @@
12#include "common/common_types.h" 14#include "common/common_types.h"
13 15
14#include "core/hle/kernel/kernel.h" 16#include "core/hle/kernel/kernel.h"
15#include "core/hle/result.h"
16 17
17namespace Kernel { 18namespace Kernel {
18 19
diff --git a/src/core/hle/kernel/session.h b/src/core/hle/kernel/session.h
index 257da9105..adaffcafe 100644
--- a/src/core/hle/kernel/session.h
+++ b/src/core/hle/kernel/session.h
@@ -4,8 +4,14 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <string>
8
9#include "common/assert.h"
10#include "common/common_types.h"
11
7#include "core/hle/kernel/kernel.h" 12#include "core/hle/kernel/kernel.h"
8#include "core/hle/kernel/thread.h" 13#include "core/hle/kernel/thread.h"
14#include "core/hle/result.h"
9#include "core/memory.h" 15#include "core/memory.h"
10 16
11namespace IPC { 17namespace IPC {
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index b8160bb2c..1ff1d9b97 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -13,6 +13,7 @@
13 13
14#include "core/core.h" 14#include "core/core.h"
15 15
16#include "core/hle/hle.h"
16#include "core/hle/kernel/kernel.h" 17#include "core/hle/kernel/kernel.h"
17#include "core/hle/result.h" 18#include "core/hle/result.h"
18 19
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp
index b2dd21542..ec437cd61 100644
--- a/src/core/hle/kernel/vm_manager.cpp
+++ b/src/core/hle/kernel/vm_manager.cpp
@@ -2,6 +2,8 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <iterator>
6
5#include "common/assert.h" 7#include "common/assert.h"
6 8
7#include "core/hle/kernel/vm_manager.h" 9#include "core/hle/kernel/vm_manager.h"
diff --git a/src/core/hle/kernel/vm_manager.h b/src/core/hle/kernel/vm_manager.h
index 22b724603..271e2333e 100644
--- a/src/core/hle/kernel/vm_manager.h
+++ b/src/core/hle/kernel/vm_manager.h
@@ -6,7 +6,6 @@
6 6
7#include <map> 7#include <map>
8#include <memory> 8#include <memory>
9#include <string>
10#include <vector> 9#include <vector>
11 10
12#include "common/common_types.h" 11#include "common/common_types.h"
diff --git a/src/core/hle/result.h b/src/core/hle/result.h
index ce633d841..cb2d681e0 100644
--- a/src/core/hle/result.h
+++ b/src/core/hle/result.h
@@ -4,7 +4,7 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <cstddef> 7#include <new>
8#include <type_traits> 8#include <type_traits>
9#include <utility> 9#include <utility>
10 10
diff --git a/src/core/hle/service/dsp_dsp.h b/src/core/hle/service/dsp_dsp.h
index fa13bfb7c..54109b2a9 100644
--- a/src/core/hle/service/dsp_dsp.h
+++ b/src/core/hle/service/dsp_dsp.h
@@ -4,6 +4,8 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <string>
8
7#include "core/hle/service/service.h" 9#include "core/hle/service/service.h"
8 10
9//////////////////////////////////////////////////////////////////////////////////////////////////// 11////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp
index 4e275cb13..ba272f05f 100644
--- a/src/core/hle/service/fs/archive.cpp
+++ b/src/core/hle/service/fs/archive.cpp
@@ -2,29 +2,35 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <cstddef>
6#include <system_error>
7#include <type_traits>
5#include <memory> 8#include <memory>
6#include <unordered_map> 9#include <unordered_map>
10#include <utility>
7 11
8#include <boost/container/flat_map.hpp> 12#include <boost/container/flat_map.hpp>
9 13
14#include "common/assert.h"
10#include "common/common_types.h" 15#include "common/common_types.h"
11#include "common/file_util.h" 16#include "common/file_util.h"
12#include "common/logging/log.h" 17#include "common/logging/log.h"
13#include "common/make_unique.h" 18#include "common/make_unique.h"
14#include "common/math_util.h"
15 19
16#include "core/file_sys/archive_backend.h" 20#include "core/file_sys/archive_backend.h"
17#include "core/file_sys/archive_extsavedata.h" 21#include "core/file_sys/archive_extsavedata.h"
18#include "core/file_sys/archive_romfs.h"
19#include "core/file_sys/archive_savedata.h" 22#include "core/file_sys/archive_savedata.h"
20#include "core/file_sys/archive_savedatacheck.h" 23#include "core/file_sys/archive_savedatacheck.h"
21#include "core/file_sys/archive_sdmc.h" 24#include "core/file_sys/archive_sdmc.h"
22#include "core/file_sys/archive_systemsavedata.h" 25#include "core/file_sys/archive_systemsavedata.h"
23#include "core/file_sys/directory_backend.h" 26#include "core/file_sys/directory_backend.h"
27#include "core/file_sys/file_backend.h"
28#include "core/hle/hle.h"
24#include "core/hle/service/service.h" 29#include "core/hle/service/service.h"
25#include "core/hle/service/fs/archive.h" 30#include "core/hle/service/fs/archive.h"
26#include "core/hle/service/fs/fs_user.h" 31#include "core/hle/service/fs/fs_user.h"
27#include "core/hle/result.h" 32#include "core/hle/result.h"
33#include "core/memory.h"
28 34
29// Specializes std::hash for ArchiveIdCode, so that we can use it in std::unordered_map. 35// Specializes std::hash for ArchiveIdCode, so that we can use it in std::unordered_map.
30// Workaroung for libstdc++ bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60970 36// Workaroung for libstdc++ bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60970
diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h
index 357b6b096..f61125953 100644
--- a/src/core/hle/service/fs/archive.h
+++ b/src/core/hle/service/fs/archive.h
@@ -4,22 +4,25 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <memory>
8#include <string>
9
7#include "common/common_types.h" 10#include "common/common_types.h"
8 11
9#include "core/file_sys/archive_backend.h" 12#include "core/file_sys/archive_backend.h"
10#include "core/hle/kernel/kernel.h"
11#include "core/hle/kernel/session.h" 13#include "core/hle/kernel/session.h"
12#include "core/hle/result.h" 14#include "core/hle/result.h"
13 15
16namespace FileSys {
17class DirectoryBackend;
18class FileBackend;
19}
20
14/// The unique system identifier hash, also known as ID0 21/// The unique system identifier hash, also known as ID0
15extern const std::string SYSTEM_ID; 22extern const std::string SYSTEM_ID;
16/// The scrambled SD card CID, also known as ID1 23/// The scrambled SD card CID, also known as ID1
17extern const std::string SDCARD_ID; 24extern const std::string SDCARD_ID;
18 25
19namespace Kernel {
20 class Session;
21}
22
23namespace Service { 26namespace Service {
24namespace FS { 27namespace FS {
25 28
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp
index 4b0b4229d..f56bbe50f 100644
--- a/src/core/hle/service/gsp_gpu.cpp
+++ b/src/core/hle/service/gsp_gpu.cpp
@@ -9,14 +9,16 @@
9#include "core/hle/kernel/event.h" 9#include "core/hle/kernel/event.h"
10#include "core/hle/kernel/shared_memory.h" 10#include "core/hle/kernel/shared_memory.h"
11#include "core/hle/result.h" 11#include "core/hle/result.h"
12#include "gsp_gpu.h"
13#include "core/hw/hw.h" 12#include "core/hw/hw.h"
14#include "core/hw/gpu.h" 13#include "core/hw/gpu.h"
15#include "core/hw/lcd.h" 14#include "core/hw/lcd.h"
16 15
17#include "video_core/gpu_debugger.h" 16#include "video_core/gpu_debugger.h"
17#include "video_core/renderer_base.h"
18#include "video_core/video_core.h" 18#include "video_core/video_core.h"
19 19
20#include "gsp_gpu.h"
21
20// Main graphics debugger object - TODO: Here is probably not the best place for this 22// Main graphics debugger object - TODO: Here is probably not the best place for this
21GraphicsDebugger g_debugger; 23GraphicsDebugger g_debugger;
22 24
diff --git a/src/core/hle/service/gsp_gpu.h b/src/core/hle/service/gsp_gpu.h
index a435d418a..d9e9a1a60 100644
--- a/src/core/hle/service/gsp_gpu.h
+++ b/src/core/hle/service/gsp_gpu.h
@@ -5,8 +5,11 @@
5#pragma once 5#pragma once
6 6
7#include <cstddef> 7#include <cstddef>
8#include <string>
8 9
9#include "common/bit_field.h" 10#include "common/bit_field.h"
11#include "common/common_types.h"
12
10#include "core/hle/service/service.h" 13#include "core/hle/service/service.h"
11 14
12//////////////////////////////////////////////////////////////////////////////////////////////////// 15////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index c7c1bb5ab..70caa7d80 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -3,6 +3,7 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "common/logging/log.h" 5#include "common/logging/log.h"
6#include "common/emu_window.h"
6 7
7#include "core/hle/service/service.h" 8#include "core/hle/service/service.h"
8#include "core/hle/service/hid/hid.h" 9#include "core/hle/service/hid/hid.h"
diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h
index 68e2bcee0..d50d479f8 100644
--- a/src/core/hle/service/hid/hid.h
+++ b/src/core/hle/service/hid/hid.h
@@ -6,16 +6,18 @@
6 6
7#include <array> 7#include <array>
8 8
9#include "core/hle/kernel/kernel.h" 9#ifndef _MSC_VER
10#include "core/hle/service/service.h" 10#include <cstddef>
11#include "common/bit_field.h" 11#endif
12 12
13namespace Kernel { 13#include "common/bit_field.h"
14 class SharedMemory; 14#include "common/common_funcs.h"
15 class Event; 15#include "common/common_types.h"
16}
17 16
18namespace Service { 17namespace Service {
18
19class Interface;
20
19namespace HID { 21namespace HID {
20 22
21/** 23/**
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index 77bfb9ff1..f31135212 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -4,6 +4,7 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <cstddef>
7#include <string> 8#include <string>
8#include <unordered_map> 9#include <unordered_map>
9 10
@@ -11,8 +12,8 @@
11 12
12#include "common/common_types.h" 13#include "common/common_types.h"
13 14
14#include "core/hle/kernel/kernel.h"
15#include "core/hle/kernel/session.h" 15#include "core/hle/kernel/session.h"
16#include "core/hle/result.h"
16 17
17//////////////////////////////////////////////////////////////////////////////////////////////////// 18////////////////////////////////////////////////////////////////////////////////////////////////////
18// Namespace Service 19// Namespace Service
diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp
index 1bd420552..d0e166fdf 100644
--- a/src/core/hle/service/soc_u.cpp
+++ b/src/core/hle/service/soc_u.cpp
@@ -2,40 +2,47 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm>
6#include <cstring>
7#include <unordered_map>
8
9#include "common/assert.h"
10#include "common/bit_field.h"
11#include "common/common_types.h"
5#include "common/logging/log.h" 12#include "common/logging/log.h"
6#include "common/platform.h" 13#include "common/scope_exit.h"
7
8#if EMU_PLATFORM == PLATFORM_WINDOWS
9#include <winsock2.h>
10#include <ws2tcpip.h>
11
12// MinGW does not define several errno constants
13#ifndef _MSC_VER
14#define EBADMSG 104
15#define ENODATA 120
16#define ENOMSG 122
17#define ENOSR 124
18#define ENOSTR 125
19#define ETIME 137
20#define EIDRM 2001
21#define ENOLINK 2002
22#endif // _MSC_VER
23 14
15#include "core/hle/kernel/session.h"
16#include "core/hle/result.h"
17#include "core/hle/service/soc_u.h"
18#include "core/memory.h"
19
20#ifdef _WIN32
21 #include <winsock2.h>
22 #include <ws2tcpip.h>
23
24 // MinGW does not define several errno constants
25 #ifndef _MSC_VER
26 #define EBADMSG 104
27 #define ENODATA 120
28 #define ENOMSG 122
29 #define ENOSR 124
30 #define ENOSTR 125
31 #define ETIME 137
32 #define EIDRM 2001
33 #define ENOLINK 2002
34 #endif // _MSC_VER
24#else 35#else
25#include <sys/socket.h> 36 #include <cerrno>
26#include <netinet/in.h> 37 #include <fcntl.h>
27#include <netdb.h> 38 #include <netinet/in.h>
28#include <arpa/inet.h> 39 #include <netdb.h>
29#include <fcntl.h> 40 #include <poll.h>
30#include <poll.h> 41 #include <sys/socket.h>
42 #include <unistd.h>
31#endif 43#endif
32 44
33#include "common/scope_exit.h" 45#ifdef _WIN32
34#include "core/hle/hle.h"
35#include "core/hle/service/soc_u.h"
36#include <unordered_map>
37
38#if EMU_PLATFORM == PLATFORM_WINDOWS
39# define WSAEAGAIN WSAEWOULDBLOCK 46# define WSAEAGAIN WSAEWOULDBLOCK
40# define WSAEMULTIHOP -1 // Invalid dummy value 47# define WSAEMULTIHOP -1 // Invalid dummy value
41# define ERRNO(x) WSA##x 48# define ERRNO(x) WSA##x
@@ -371,7 +378,7 @@ static void Fcntl(Service::Interface* self) {
371 }); 378 });
372 379
373 if (ctr_cmd == 3) { // F_GETFL 380 if (ctr_cmd == 3) { // F_GETFL
374#if EMU_PLATFORM == PLATFORM_WINDOWS 381#ifdef _WIN32
375 posix_ret = 0; 382 posix_ret = 0;
376 auto iter = open_sockets.find(socket_handle); 383 auto iter = open_sockets.find(socket_handle);
377 if (iter != open_sockets.end() && iter->second.blocking == false) 384 if (iter != open_sockets.end() && iter->second.blocking == false)
@@ -388,7 +395,7 @@ static void Fcntl(Service::Interface* self) {
388 posix_ret |= 4; // O_NONBLOCK 395 posix_ret |= 4; // O_NONBLOCK
389#endif 396#endif
390 } else if (ctr_cmd == 4) { // F_SETFL 397 } else if (ctr_cmd == 4) { // F_SETFL
391#if EMU_PLATFORM == PLATFORM_WINDOWS 398#ifdef _WIN32
392 unsigned long tmp = (ctr_arg & 4 /* O_NONBLOCK */) ? 1 : 0; 399 unsigned long tmp = (ctr_arg & 4 /* O_NONBLOCK */) ? 1 : 0;
393 int ret = ioctlsocket(socket_handle, FIONBIO, &tmp); 400 int ret = ioctlsocket(socket_handle, FIONBIO, &tmp);
394 if (ret == SOCKET_ERROR_VALUE) { 401 if (ret == SOCKET_ERROR_VALUE) {
@@ -682,7 +689,7 @@ static void Connect(Service::Interface* self) {
682 689
683static void InitializeSockets(Service::Interface* self) { 690static void InitializeSockets(Service::Interface* self) {
684 // TODO(Subv): Implement 691 // TODO(Subv): Implement
685#if EMU_PLATFORM == PLATFORM_WINDOWS 692#ifdef _WIN32
686 WSADATA data; 693 WSADATA data;
687 WSAStartup(MAKEWORD(2, 2), &data); 694 WSAStartup(MAKEWORD(2, 2), &data);
688#endif 695#endif
@@ -696,7 +703,7 @@ static void ShutdownSockets(Service::Interface* self) {
696 // TODO(Subv): Implement 703 // TODO(Subv): Implement
697 CleanupSockets(); 704 CleanupSockets();
698 705
699#if EMU_PLATFORM == PLATFORM_WINDOWS 706#ifdef _WIN32
700 WSACleanup(); 707 WSACleanup();
701#endif 708#endif
702 709
@@ -747,7 +754,7 @@ Interface::Interface() {
747 754
748Interface::~Interface() { 755Interface::~Interface() {
749 CleanupSockets(); 756 CleanupSockets();
750#if EMU_PLATFORM == PLATFORM_WINDOWS 757#ifdef _WIN32
751 WSACleanup(); 758 WSACleanup();
752#endif 759#endif
753} 760}
diff --git a/src/core/hle/service/soc_u.h b/src/core/hle/service/soc_u.h
index 483b3111b..a091f597c 100644
--- a/src/core/hle/service/soc_u.h
+++ b/src/core/hle/service/soc_u.h
@@ -4,6 +4,8 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <string>
8
7#include "core/hle/service/service.h" 9#include "core/hle/service/service.h"
8 10
9//////////////////////////////////////////////////////////////////////////////////////////////////// 11////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp
index ac1967da8..e121a54e3 100644
--- a/src/core/hle/service/y2r_u.cpp
+++ b/src/core/hle/service/y2r_u.cpp
@@ -12,6 +12,7 @@
12#include "core/hw/y2r.h" 12#include "core/hw/y2r.h"
13#include "core/mem_map.h" 13#include "core/mem_map.h"
14 14
15#include "video_core/renderer_base.h"
15#include "video_core/utils.h" 16#include "video_core/utils.h"
16#include "video_core/video_core.h" 17#include "video_core/video_core.h"
17 18
diff --git a/src/core/hle/service/y2r_u.h b/src/core/hle/service/y2r_u.h
index 7df47fcb9..9454e5aab 100644
--- a/src/core/hle/service/y2r_u.h
+++ b/src/core/hle/service/y2r_u.h
@@ -5,9 +5,11 @@
5#pragma once 5#pragma once
6 6
7#include <array> 7#include <array>
8#include <string>
8 9
9#include "common/common_types.h" 10#include "common/common_types.h"
10 11
12#include "core/hle/result.h"
11#include "core/hle/service/service.h" 13#include "core/hle/service/service.h"
12 14
13//////////////////////////////////////////////////////////////////////////////////////////////////// 15////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/shared_page.cpp b/src/core/hle/shared_page.cpp
index 4014eee98..26d87c7e2 100644
--- a/src/core/hle/shared_page.cpp
+++ b/src/core/hle/shared_page.cpp
@@ -4,12 +4,6 @@
4 4
5#include <cstring> 5#include <cstring>
6 6
7#include "common/common_types.h"
8#include "common/common_funcs.h"
9
10#include "core/core.h"
11#include "core/memory.h"
12#include "core/hle/config_mem.h"
13#include "core/hle/shared_page.h" 7#include "core/hle/shared_page.h"
14 8
15//////////////////////////////////////////////////////////////////////////////////////////////////// 9////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/shared_page.h b/src/core/hle/shared_page.h
index fd2ab66a2..db6a5340b 100644
--- a/src/core/hle/shared_page.h
+++ b/src/core/hle/shared_page.h
@@ -10,9 +10,12 @@
10 * write access, according to 3dbrew; this is not emulated) 10 * write access, according to 3dbrew; this is not emulated)
11 */ 11 */
12 12
13#include "common/common_funcs.h"
13#include "common/common_types.h" 14#include "common/common_types.h"
14#include "common/swap.h" 15#include "common/swap.h"
15 16
17#include "core/memory.h"
18
16//////////////////////////////////////////////////////////////////////////////////////////////////// 19////////////////////////////////////////////////////////////////////////////////////////////////////
17 20
18namespace SharedPage { 21namespace SharedPage {
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index dd3b31650..a1789f9c7 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -2,17 +2,18 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <cstring>
6#include <type_traits>
7
5#include "common/color.h" 8#include "common/color.h"
6#include "common/common_types.h" 9#include "common/common_types.h"
7 10#include "common/logging/log.h"
8#include "core/arm/arm_interface.h" 11#include "common/vector_math.h"
9 12
10#include "core/settings.h" 13#include "core/settings.h"
11#include "core/core.h"
12#include "core/memory.h" 14#include "core/memory.h"
13#include "core/core_timing.h" 15#include "core/core_timing.h"
14 16
15#include "core/hle/hle.h"
16#include "core/hle/service/gsp_gpu.h" 17#include "core/hle/service/gsp_gpu.h"
17#include "core/hle/service/dsp_dsp.h" 18#include "core/hle/service/dsp_dsp.h"
18#include "core/hle/service/hid/hid.h" 19#include "core/hle/service/hid/hid.h"
@@ -21,6 +22,8 @@
21#include "core/hw/gpu.h" 22#include "core/hw/gpu.h"
22 23
23#include "video_core/command_processor.h" 24#include "video_core/command_processor.h"
25#include "video_core/hwrasterizer_base.h"
26#include "video_core/renderer_base.h"
24#include "video_core/utils.h" 27#include "video_core/utils.h"
25#include "video_core/video_core.h" 28#include "video_core/video_core.h"
26 29
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h
index 699bcd2a5..5b8c43f8b 100644
--- a/src/core/hw/gpu.h
+++ b/src/core/hw/gpu.h
@@ -5,6 +5,7 @@
5#pragma once 5#pragma once
6 6
7#include <cstddef> 7#include <cstddef>
8#include <type_traits>
8 9
9#include "common/assert.h" 10#include "common/assert.h"
10#include "common/bit_field.h" 11#include "common/bit_field.h"
diff --git a/src/core/hw/lcd.cpp b/src/core/hw/lcd.cpp
index 963c8d981..cdb757a18 100644
--- a/src/core/hw/lcd.cpp
+++ b/src/core/hw/lcd.cpp
@@ -7,8 +7,6 @@
7#include "common/common_types.h" 7#include "common/common_types.h"
8#include "common/logging/log.h" 8#include "common/logging/log.h"
9 9
10#include "core/arm/arm_interface.h"
11#include "core/hle/hle.h"
12#include "core/hw/hw.h" 10#include "core/hw/hw.h"
13#include "core/hw/lcd.h" 11#include "core/hw/lcd.h"
14 12
diff --git a/src/core/hw/lcd.h b/src/core/hw/lcd.h
index 8631eb201..bcce6d8cf 100644
--- a/src/core/hw/lcd.h
+++ b/src/core/hw/lcd.h
@@ -5,6 +5,7 @@
5#pragma once 5#pragma once
6 6
7#include <cstddef> 7#include <cstddef>
8#include <type_traits>
8 9
9#include "common/bit_field.h" 10#include "common/bit_field.h"
10#include "common/common_funcs.h" 11#include "common/common_funcs.h"
diff --git a/src/core/hw/y2r.cpp b/src/core/hw/y2r.cpp
index 5b7fb39e1..b40f13cae 100644
--- a/src/core/hw/y2r.cpp
+++ b/src/core/hw/y2r.cpp
@@ -2,8 +2,10 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm>
5#include <array> 6#include <array>
6#include <numeric> 7#include <cstddef>
8#include <memory>
7 9
8#include "common/assert.h" 10#include "common/assert.h"
9#include "common/color.h" 11#include "common/color.h"
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp
index f00753a79..a7eea78aa 100644
--- a/src/core/loader/elf.cpp
+++ b/src/core/loader/elf.cpp
@@ -2,6 +2,7 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <cstring>
5#include <string> 6#include <string>
6#include <memory> 7#include <memory>
7 8
@@ -10,7 +11,7 @@
10#include "common/logging/log.h" 11#include "common/logging/log.h"
11#include "common/symbols.h" 12#include "common/symbols.h"
12 13
13#include "core/hle/kernel/kernel.h" 14#include "core/hle/kernel/process.h"
14#include "core/hle/kernel/resource_limit.h" 15#include "core/hle/kernel/resource_limit.h"
15#include "core/loader/elf.h" 16#include "core/loader/elf.h"
16#include "core/memory.h" 17#include "core/memory.h"
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp
index 8b14edf00..2e450fce4 100644
--- a/src/core/loader/loader.cpp
+++ b/src/core/loader/loader.cpp
@@ -2,10 +2,12 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <memory>
5#include <string> 6#include <string>
6 7
7#include "common/logging/log.h" 8#include "common/logging/log.h"
8#include "common/make_unique.h" 9#include "common/make_unique.h"
10#include "common/string_util.h"
9 11
10#include "core/file_sys/archive_romfs.h" 12#include "core/file_sys/archive_romfs.h"
11#include "core/hle/kernel/process.h" 13#include "core/hle/kernel/process.h"
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index 87e16fb98..52bbf35b8 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -4,12 +4,18 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <algorithm>
8#include <initializer_list>
9#include <memory>
10#include <string>
7#include <vector> 11#include <vector>
8 12
9#include "common/common_types.h" 13#include "common/common_types.h"
10#include "common/file_util.h" 14#include "common/file_util.h"
11 15
12#include "core/hle/kernel/process.h" 16namespace Kernel {
17struct AddressMapping;
18}
13 19
14//////////////////////////////////////////////////////////////////////////////////////////////////// 20////////////////////////////////////////////////////////////////////////////////////////////////////
15// Loader namespace 21// Loader namespace
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp
index 6a9d866ae..2b26b31cf 100644
--- a/src/core/loader/ncch.cpp
+++ b/src/core/loader/ncch.cpp
@@ -3,6 +3,7 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <algorithm> 5#include <algorithm>
6#include <cstring>
6#include <memory> 7#include <memory>
7 8
8#include "common/logging/log.h" 9#include "common/logging/log.h"
@@ -10,7 +11,7 @@
10#include "common/string_util.h" 11#include "common/string_util.h"
11#include "common/swap.h" 12#include "common/swap.h"
12 13
13#include "core/hle/kernel/kernel.h" 14#include "core/hle/kernel/process.h"
14#include "core/hle/kernel/resource_limit.h" 15#include "core/hle/kernel/resource_limit.h"
15#include "core/loader/ncch.h" 16#include "core/loader/ncch.h"
16#include "core/memory.h" 17#include "core/memory.h"
diff --git a/src/core/mem_map.cpp b/src/core/mem_map.cpp
index bf814b945..d8cae50dd 100644
--- a/src/core/mem_map.cpp
+++ b/src/core/mem_map.cpp
@@ -3,13 +3,14 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <map> 5#include <map>
6#include <memory>
7#include <utility>
8#include <vector>
6 9
7#include "common/common_types.h" 10#include "common/common_types.h"
8#include "common/logging/log.h" 11#include "common/logging/log.h"
9 12
10#include "core/hle/config_mem.h" 13#include "core/hle/config_mem.h"
11#include "core/hle/kernel/kernel.h"
12#include "core/hle/kernel/shared_memory.h"
13#include "core/hle/kernel/vm_manager.h" 14#include "core/hle/kernel/vm_manager.h"
14#include "core/hle/result.h" 15#include "core/hle/result.h"
15#include "core/hle/shared_page.h" 16#include "core/hle/shared_page.h"
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 28844a915..172ae9054 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -9,9 +9,6 @@
9#include "common/logging/log.h" 9#include "common/logging/log.h"
10#include "common/swap.h" 10#include "common/swap.h"
11 11
12#include "core/hle/config_mem.h"
13#include "core/hle/shared_page.h"
14#include "core/hw/hw.h"
15#include "core/mem_map.h" 12#include "core/mem_map.h"
16#include "core/memory.h" 13#include "core/memory.h"
17#include "core/memory_setup.h" 14#include "core/memory_setup.h"
diff --git a/src/core/memory.h b/src/core/memory.h
index 0b8ff9ec4..418609de0 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -4,6 +4,8 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <cstddef>
8
7#include "common/common_types.h" 9#include "common/common_types.h"
8 10
9namespace Memory { 11namespace Memory {