Tweaked pdcurses message pump patch to avoid potential overflows. Also

updated musikboix.rc's FileDescription field to be more inline with what
other apps display here.
This commit is contained in:
casey langen 2017-03-26 12:05:47 -07:00
parent b6514b05f2
commit 68a7e2994c
2 changed files with 6 additions and 6 deletions

View File

@ -16,10 +16,10 @@ void PDC_napms(int ms) /* 'ms' = milli, _not_ microseconds! */
{
/* RR: keep GUI window responsive while PDCurses sleeps */
MSG msg;
int start, end, sleepMs;
DWORD start, end, delta;
extern bool PDC_bDone;
start = (int) GetTickCount();
start = GetTickCount();
//PDC_LOG(("PDC_napms() - called: ms=%d\n", ms));
@ -30,10 +30,10 @@ void PDC_napms(int ms) /* 'ms' = milli, _not_ microseconds! */
DispatchMessage(&msg);
}
end = (int) GetTickCount();
sleepMs = ms - (end - start);
sleepMs = (sleepMs < 0) ? 0 : sleepMs;
Sleep((DWORD) sleepMs);
end = GetTickCount();
delta = end - start;
delta = ms > delta ? ms - delta : 0;
Sleep(delta);
}
const char *PDC_sysname(void)

Binary file not shown.