2014-04-09 04:45:46 +05:30
|
|
|
// Copyright 2014 Citra Emulator Project
|
2014-12-17 11:08:14 +05:30
|
|
|
// Licensed under GPLv2 or any later version
|
2014-04-09 04:45:46 +05:30
|
|
|
// Refer to the license.txt file included.
|
2013-10-02 04:40:47 +05:30
|
|
|
|
2016-02-21 18:43:52 +05:30
|
|
|
#include "audio_core/audio_core.h"
|
|
|
|
|
2014-04-09 05:45:08 +05:30
|
|
|
#include "core/core.h"
|
|
|
|
#include "core/core_timing.h"
|
|
|
|
#include "core/system.h"
|
2016-02-21 18:43:52 +05:30
|
|
|
#include "core/gdbstub/gdbstub.h"
|
2014-04-09 05:45:08 +05:30
|
|
|
#include "core/hw/hw.h"
|
2014-04-11 08:15:40 +05:30
|
|
|
#include "core/hle/hle.h"
|
2014-06-11 08:13:50 +05:30
|
|
|
#include "core/hle/kernel/kernel.h"
|
2015-07-29 20:38:00 +05:30
|
|
|
#include "core/hle/kernel/memory.h"
|
2014-04-09 05:45:08 +05:30
|
|
|
|
|
|
|
#include "video_core/video_core.h"
|
2013-10-02 04:40:47 +05:30
|
|
|
|
|
|
|
namespace System {
|
|
|
|
|
2016-01-08 01:03:54 +05:30
|
|
|
Result Init(EmuWindow* emu_window) {
|
2014-04-11 08:15:40 +05:30
|
|
|
Core::Init();
|
2015-01-09 08:18:18 +05:30
|
|
|
CoreTiming::Init();
|
2014-04-11 08:15:40 +05:30
|
|
|
Memory::Init();
|
2014-04-05 09:31:07 +05:30
|
|
|
HW::Init();
|
2014-12-14 13:25:11 +05:30
|
|
|
Kernel::Init();
|
2014-04-11 08:15:40 +05:30
|
|
|
HLE::Init();
|
2016-01-08 01:03:54 +05:30
|
|
|
if (!VideoCore::Init(emu_window)) {
|
|
|
|
return Result::ErrorInitVideoCore;
|
|
|
|
}
|
2016-02-21 18:43:52 +05:30
|
|
|
AudioCore::Init();
|
2015-09-02 18:26:38 +05:30
|
|
|
GDBStub::Init();
|
2016-03-10 02:50:08 +05:30
|
|
|
|
|
|
|
return Result::Success;
|
2013-10-02 04:40:47 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
void Shutdown() {
|
2015-10-12 05:37:58 +05:30
|
|
|
GDBStub::Shutdown();
|
2016-02-21 18:43:52 +05:30
|
|
|
AudioCore::Shutdown();
|
2014-04-07 02:25:54 +05:30
|
|
|
VideoCore::Shutdown();
|
2014-12-14 13:25:11 +05:30
|
|
|
HLE::Shutdown();
|
2014-06-11 08:13:50 +05:30
|
|
|
Kernel::Shutdown();
|
2014-12-14 13:25:11 +05:30
|
|
|
HW::Shutdown();
|
2015-01-09 08:18:18 +05:30
|
|
|
CoreTiming::Shutdown();
|
2014-12-14 13:25:11 +05:30
|
|
|
Core::Shutdown();
|
2013-10-02 04:40:47 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace
|