diff options
| author | 2013-10-03 17:47:31 -0400 | |
|---|---|---|
| committer | 2013-10-03 17:47:31 -0400 | |
| commit | e0cb54ea35a79ce0268be8a20c0a6d6fb10d608a (patch) | |
| tree | 65007fada1b869db926700b2f78eb4ff0546ad4c /src | |
| parent | added core_timing and system modules to core vcproj (diff) | |
| download | yuzu-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.cpp | 4 | ||||
| -rw-r--r-- | src/core/src/core.cpp | 6 | ||||
| -rw-r--r-- | src/core/src/core.h | 8 | ||||
| -rw-r--r-- | src/core/src/system.cpp | 7 | ||||
| -rw-r--r-- | src/core/src/system.h | 3 |
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 | ||
| 28 | namespace Core { | 28 | namespace Core { |
| 29 | 29 | ||
| @@ -52,9 +52,7 @@ void Stop() { | |||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | /// Initialize the core | 54 | /// Initialize the core |
| 55 | int Init(EmuWindow* emu_window) { | 55 | int 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 | |||
| 34 | class EmuWindow; | ||
| 35 | |||
| 36 | namespace Core { | 30 | namespace Core { |
| 37 | 31 | ||
| 38 | /// Start the core | 32 | /// Start the core |
| @@ -51,7 +45,7 @@ void Halt(const char *msg); | |||
| 51 | void Stop(); | 45 | void Stop(); |
| 52 | 46 | ||
| 53 | /// Initialize the core | 47 | /// Initialize the core |
| 54 | int Init(EmuWindow* emu_window); | 48 | int 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 | ||
| 28 | namespace System { | 30 | namespace System { |
| @@ -33,7 +35,10 @@ extern MetaFileSystem g_ctr_file_system; | |||
| 33 | void UpdateState(State state) { | 35 | void UpdateState(State state) { |
| 34 | } | 36 | } |
| 35 | 37 | ||
| 36 | void Init() { | 38 | void Init(EmuWindow* emu_window) { |
| 39 | Core::Init(); | ||
| 40 | Memory::Init(); | ||
| 41 | CoreTiming::Init(); | ||
| 37 | } | 42 | } |
| 38 | 43 | ||
| 39 | void RunLoopFor(int cycles) { | 44 | void 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; | |||
| 47 | extern MetaFileSystem g_ctr_file_system; | 48 | extern MetaFileSystem g_ctr_file_system; |
| 48 | 49 | ||
| 49 | void UpdateState(State state); | 50 | void UpdateState(State state); |
| 50 | void Init(); | 51 | void Init(EmuWindow* emu_window); |
| 51 | void RunLoopFor(int cycles); | 52 | void RunLoopFor(int cycles); |
| 52 | void RunLoopUntil(u64 global_cycles); | 53 | void RunLoopUntil(u64 global_cycles); |
| 53 | void Shutdown(); | 54 | void Shutdown(); |