Commit 2d250dbf authored by James's avatar James
Browse files

Add messages for in-game emulation errors

parent 0c0d3dc7
......@@ -261,7 +261,26 @@ void retro_run() {
UpdateSettings(false);
while(!emu_window->HasSubmittedFrame()) {
system_core.RunLoop();
auto result = system_core.RunLoop();
if (result != Core::System::ResultStatus::Success) {
std::string errorContent = Core::System::GetInstance().GetStatusDetails();
std::string msg;
switch(result) {
case Core::System::ResultStatus::ErrorSystemFiles:
msg = "Citra was unable to locate a 3DS system archive: " + errorContent;
break;
case Core::System::ResultStatus::ErrorSharedFont:
msg = "Citra was unable to locate the 3DS shared fonts.";
break;
default:
msg = "Fatal Error encountered: " + errorContent;
break;
}
LibRetro::DisplayMessage(msg.c_str());
}
}
}
......
......@@ -69,7 +69,7 @@ bool Shutdown() {
bool DisplayMessage(const char* sg) {
retro_message msg;
msg.msg = sg;
msg.frames = 180;
msg.frames = 60 * 10;
return environ_cb(RETRO_ENVIRONMENT_SET_MESSAGE, &msg);
}
......@@ -122,8 +122,6 @@ void retro_set_input_state(retro_input_state_t cb) {
}
void retro_get_system_av_info(struct retro_system_av_info *info) {
LOG_INFO(Frontend, "Av go!");
// These are placeholders until we get control.
info->timing.fps = 60.0;
info->timing.sample_rate = 41000;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment