#include "conproc.h"
#include "direct.h"
-extern void S_BlockSound (void);
-
cvar_t sys_usetimegettime = {CVAR_SAVE, "sys_usetimegettime", "1", "use windows timeGetTime function (which has issues on some motherboards) for timing rather than QueryPerformanceCounter timer (which has issues on multicore/multiprocessor machines and processors which are designed to conserve power)"};
HANDLE hinput, houtput;
return NULL;
}
-void Sys_Sleep(int milliseconds)
+void Sys_Sleep(int microseconds)
{
- if (milliseconds < 1)
- milliseconds = 1;
- Sleep(milliseconds);
+ if (microseconds < 1000)
+ microseconds = 1000;
+ Sleep(microseconds / 1000);
}
char *Sys_GetClipboardData (void)
{
if ((cliptext = GlobalLock (hClipboardData)) != 0)
{
- data = Z_Malloc (GlobalSize(hClipboardData)+1);
- strcpy (data, cliptext);
+ size_t allocsize;
+ allocsize = GlobalSize (hClipboardData) + 1;
+ data = Z_Malloc (allocsize);
+ strlcpy (data, cliptext, allocsize);
GlobalUnlock (hClipboardData);
}
}