handle `DebugMessage(M64MSG_ERROR` uniformly by using my new approach of kicking it to a vsync so the frontend can recover. In one particular case (trying to read from an unmapped memory range) this can result in emulation proceeding instead of just hanging the frontend, although the results from that point may be questionable.

This commit is contained in:
zeromus 2018-11-02 16:28:20 -04:00
parent 4bb5ce8941
commit d4aceb2aa1
4 changed files with 9 additions and 4 deletions

View File

@ -55,6 +55,15 @@ void DebugMessage(int level, const char *message, ...)
{
char msgbuf[256];
va_list args;
extern HANDLE rompausesem;
extern int stop;
if(level == M64MSG_ERROR)
{
//trigger a vsync just to get out of frame advance
new_vi();
WaitForSingleObject(rompausesem, INFINITE);
}
if (pDebugFunc == NULL)
return;

View File

@ -394,7 +394,6 @@ static void prefetch(void)
else
{
DebugMessage(M64MSG_ERROR, "prefetch() execute address :%x", PC->addr);
stop=1;
}
}

View File

@ -236,9 +236,6 @@ static void NOTCOMPILED(void)
else
{
DebugMessage(M64MSG_ERROR, "not compiled exception");
//trigger a vsync just to get out of frame advance
new_vi();
WaitForSingleObject(rompausesem, INFINITE);
}
/*#ifdef DBG

Binary file not shown.