diff options
author | LittleWhite <lw.demoscene@googlemail.com> | 2016-01-07 20:33:54 +0100 |
---|---|---|
committer | LittleWhite <lw.demoscene@googlemail.com> | 2016-03-08 22:05:25 +0100 |
commit | 4be68dddfbdc7065139351e6e39b5fa97844264a (patch) | |
tree | 4b020326a58a7a4364b752cb731233cb6c264cd0 /src/core | |
parent | Display errors in GUI when loading ROM failed (diff) | |
download | yuzu-4be68dddfbdc7065139351e6e39b5fa97844264a.tar yuzu-4be68dddfbdc7065139351e6e39b5fa97844264a.tar.gz yuzu-4be68dddfbdc7065139351e6e39b5fa97844264a.tar.bz2 yuzu-4be68dddfbdc7065139351e6e39b5fa97844264a.tar.lz yuzu-4be68dddfbdc7065139351e6e39b5fa97844264a.tar.xz yuzu-4be68dddfbdc7065139351e6e39b5fa97844264a.tar.zst yuzu-4be68dddfbdc7065139351e6e39b5fa97844264a.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core.cpp | 3 | ||||
-rw-r--r-- | src/core/core.h | 2 | ||||
-rw-r--r-- | src/core/loader/loader.cpp | 1 | ||||
-rw-r--r-- | src/core/system.cpp | 6 | ||||
-rw-r--r-- | src/core/system.h | 9 |
5 files changed, 14 insertions, 7 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 453c7162d..84d6c392e 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -73,12 +73,11 @@ void Stop() { } /// Initialize the core -int Init() { +void Init() { g_sys_core = Common::make_unique<ARM_DynCom>(USER32MODE); g_app_core = Common::make_unique<ARM_DynCom>(USER32MODE); LOG_DEBUG(Core, "Initialized OK"); - return 0; } void Shutdown() { diff --git a/src/core/core.h b/src/core/core.h index 453e0a5f0..ad26dca3f 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -52,7 +52,7 @@ void Halt(const char *msg); void Stop(); /// Initialize the core -int Init(); +void Init(); /// Shutdown the core void Shutdown(); diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 99f1183ca..b1907cd55 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp @@ -140,7 +140,6 @@ ResultStatus LoadFile(const std::string& filename) { ResultStatus result = app_loader.Load(); if (ResultStatus::Success == result) { Service::FS::RegisterArchiveType(Common::make_unique<FileSys::ArchiveFactory_RomFS>(app_loader), Service::FS::ArchiveIdCode::RomFS); - return ResultStatus::Success; } return result; } diff --git a/src/core/system.cpp b/src/core/system.cpp index b62ebf69e..1e3b2783c 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -17,14 +17,16 @@ namespace System { -void Init(EmuWindow* emu_window) { +Result Init(EmuWindow* emu_window) { Core::Init(); CoreTiming::Init(); Memory::Init(); HW::Init(); Kernel::Init(); HLE::Init(); - VideoCore::Init(emu_window); + if (!VideoCore::Init(emu_window)) { + return Result::ErrorInitVideoCore; + } AudioCore::Init(); GDBStub::Init(); } diff --git a/src/core/system.h b/src/core/system.h index 59a75ca12..a4a627ea9 100644 --- a/src/core/system.h +++ b/src/core/system.h @@ -8,7 +8,14 @@ class EmuWindow; namespace System { -void Init(EmuWindow* emu_window); +enum class Result { + Success, ///< Everything is fine + Error, ///< Something went wrong (no module specified) + ErrorInitCore, ///< Something went wrong during core init + ErrorInitVideoCore, ///< Something went wrong during video core init +}; + +Result Init(EmuWindow* emu_window); void Shutdown(); } |