Merge pull request #1344 from LittleWhite-tb/error-output

Output errors in GUI
This commit is contained in:
bunnei 2016-03-08 23:12:04 -05:00
commit 8530a2d7df
12 changed files with 95 additions and 24 deletions

View file

@ -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() {

View file

@ -52,7 +52,7 @@ void Halt(const char *msg);
void Stop();
/// Initialize the core
int Init();
void Init();
/// Shutdown the core
void Shutdown();

View file

@ -137,11 +137,11 @@ ResultStatus LoadFile(const std::string& filename) {
AppLoader_NCCH app_loader(std::move(file), filename);
// Load application and RomFS
if (ResultStatus::Success == app_loader.Load()) {
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;
}
break;
return result;
}
// CIA file format...

View file

@ -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();
}

View file

@ -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();
}