[Android] Register panic alert handler.

This lets me see _assert_msg_ alerts on Android when passing dumb arguments to my AArch64 emitter.
This commit is contained in:
Ryan Houdek 2015-02-12 18:41:52 -06:00
parent f2f2d61950
commit 57c66798fc

View File

@ -105,6 +105,12 @@ void Host_SetWiiMoteConnectionState(int _State) {}
void Host_ShowVideoConfig(void*, const std::string&, const std::string&) {}
static bool MsgAlert(const char* caption, const char* text, bool /*yes_no*/, int /*Style*/)
{
__android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "%s:%s", caption, text);
return false;
}
#define DVD_BANNER_WIDTH 96
#define DVD_BANNER_HEIGHT 32
std::vector<std::string> m_volume_names;
@ -344,6 +350,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv *
OSD::AddCallback(OSD::OSD_INIT, ButtonManager::Init);
OSD::AddCallback(OSD::OSD_SHUTDOWN, ButtonManager::Shutdown);
RegisterMsgAlertHandler(&MsgAlert);
UICommon::Init();
// No use running the loop when booting fails