mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
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:
parent
b6514b05f2
commit
68a7e2994c
12
src/3rdparty/win32_src/pdcurses/pdcutil.c
vendored
12
src/3rdparty/win32_src/pdcurses/pdcutil.c
vendored
@ -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.
Loading…
Reference in New Issue
Block a user