summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ShizZy2013-10-03 17:47:31 -0400
committerGravatar ShizZy2013-10-03 17:47:31 -0400
commite0cb54ea35a79ce0268be8a20c0a6d6fb10d608a (patch)
tree65007fada1b869db926700b2f78eb4ff0546ad4c /src
parentadded core_timing and system modules to core vcproj (diff)
downloadyuzu-e0cb54ea35a79ce0268be8a20c0a6d6fb10d608a.tar.gz
yuzu-e0cb54ea35a79ce0268be8a20c0a6d6fb10d608a.tar.xz
yuzu-e0cb54ea35a79ce0268be8a20c0a6d6fb10d608a.zip
moved some core functions over to system module
Diffstat (limited to 'src')
-rw-r--r--src/citra/src/citra.cpp4
-rw-r--r--src/core/src/core.cpp6
-rw-r--r--src/core/src/core.h8
-rw-r--r--src/core/src/system.cpp7
-rw-r--r--src/core/src/system.h3
5 files changed, 13 insertions, 15 deletions
diff --git a/src/citra/src/citra.cpp b/src/citra/src/citra.cpp
index eb0290687..fc4610405 100644
--- a/src/citra/src/citra.cpp
+++ b/src/citra/src/citra.cpp
@@ -26,7 +26,7 @@
26#include "log_manager.h" 26#include "log_manager.h"
27#include "file_util.h" 27#include "file_util.h"
28 28
29#include "core.h" 29#include "system.h"
30 30
31#include "emu_window/emu_window_glfw.h" 31#include "emu_window/emu_window_glfw.h"
32 32
@@ -46,7 +46,7 @@ int __cdecl main(int argc, char **argv) {
46 46
47 EmuWindow_GLFW* emu_window = new EmuWindow_GLFW; 47 EmuWindow_GLFW* emu_window = new EmuWindow_GLFW;
48 48
49 Core::Init(emu_window); 49 System::Init(emu_window);
50 50
51 //if (E_OK != core::Init(emu_window)) { 51 //if (E_OK != core::Init(emu_window)) {
52 // LOG_ERROR(TMASTER, "core initialization failed, exiting..."); 52 // LOG_ERROR(TMASTER, "core initialization failed, exiting...");
diff --git a/src/core/src/core.cpp b/src/core/src/core.cpp
index 5b118d4fb..6ed7c5be8 100644
--- a/src/core/src/core.cpp
+++ b/src/core/src/core.cpp
@@ -22,8 +22,8 @@
22 * http://code.google.com/p/gekko-gc-emu/ 22 * http://code.google.com/p/gekko-gc-emu/
23 */ 23 */
24 24
25#include "log.h"
25#include "core.h" 26#include "core.h"
26#include "mem_map.h"
27 27
28namespace Core { 28namespace Core {
29 29
@@ -52,9 +52,7 @@ void Stop() {
52} 52}
53 53
54/// Initialize the core 54/// Initialize the core
55int Init(EmuWindow* emu_window) { 55int Init() {
56 Memory::Init();
57
58 NOTICE_LOG(MASTER_LOG, "Core initialized OK"); 56 NOTICE_LOG(MASTER_LOG, "Core initialized OK");
59 return 0; 57 return 0;
60} 58}
diff --git a/src/core/src/core.h b/src/core/src/core.h
index 78ee3ff75..8021b762e 100644
--- a/src/core/src/core.h
+++ b/src/core/src/core.h
@@ -27,12 +27,6 @@
27 27
28//////////////////////////////////////////////////////////////////////////////////////////////////// 28////////////////////////////////////////////////////////////////////////////////////////////////////
29 29
30#include "common.h"
31
32////////////////////////////////////////////////////////////////////////////////////////////////////
33
34class EmuWindow;
35
36namespace Core { 30namespace Core {
37 31
38/// Start the core 32/// Start the core
@@ -51,7 +45,7 @@ void Halt(const char *msg);
51void Stop(); 45void Stop();
52 46
53/// Initialize the core 47/// Initialize the core
54int Init(EmuWindow* emu_window); 48int Init();
55 49
56} // namespace 50} // namespace
57 51
diff --git a/src/core/src/system.cpp b/src/core/src/system.cpp
index 36fdf028c..545362694 100644
--- a/src/core/src/system.cpp
+++ b/src/core/src/system.cpp
@@ -22,7 +22,9 @@
22* http://code.google.com/p/gekko-gc-emu/ 22* http://code.google.com/p/gekko-gc-emu/
23*/ 23*/
24 24
25#include "core.h"
25#include "core_timing.h" 26#include "core_timing.h"
27#include "mem_map.h"
26#include "system.h" 28#include "system.h"
27 29
28namespace System { 30namespace System {
@@ -33,7 +35,10 @@ extern MetaFileSystem g_ctr_file_system;
33void UpdateState(State state) { 35void UpdateState(State state) {
34} 36}
35 37
36void Init() { 38void Init(EmuWindow* emu_window) {
39 Core::Init();
40 Memory::Init();
41 CoreTiming::Init();
37} 42}
38 43
39void RunLoopFor(int cycles) { 44void RunLoopFor(int cycles) {
diff --git a/src/core/src/system.h b/src/core/src/system.h
index b86a87164..e05413d86 100644
--- a/src/core/src/system.h
+++ b/src/core/src/system.h
@@ -25,6 +25,7 @@
25#ifndef CORE_SYSTEM_H_ 25#ifndef CORE_SYSTEM_H_
26#define CORE_SYSTEM_H_ 26#define CORE_SYSTEM_H_
27 27
28#include "emu_window.h"
28#include "file_sys/meta_file_system.h" 29#include "file_sys/meta_file_system.h"
29 30
30//////////////////////////////////////////////////////////////////////////////////////////////////// 31////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -47,7 +48,7 @@ extern volatile State g_state;
47extern MetaFileSystem g_ctr_file_system; 48extern MetaFileSystem g_ctr_file_system;
48 49
49void UpdateState(State state); 50void UpdateState(State state);
50void Init(); 51void Init(EmuWindow* emu_window);
51void RunLoopFor(int cycles); 52void RunLoopFor(int cycles);
52void RunLoopUntil(u64 global_cycles); 53void RunLoopUntil(u64 global_cycles);
53void Shutdown(); 54void Shutdown();