Improve error report from Init() functions
Add error popup when citra initialization failed
This commit is contained in:
parent
7ad669a911
commit
4be68dddfb
12 changed files with 72 additions and 27 deletions
|
@ -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() {
|
||||
|
|
|
@ -52,7 +52,7 @@ void Halt(const char *msg);
|
|||
void Stop();
|
||||
|
||||
/// Initialize the core
|
||||
int Init();
|
||||
void Init();
|
||||
|
||||
/// Shutdown the core
|
||||
void Shutdown();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue