forked from Bill-Gray/PDCursesMod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pdcutil.c
55 lines (49 loc) · 878 Bytes
/
pdcutil.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef MOUSE_MOVED
#else
#include <unistd.h>
#endif
#include "curspriv.h"
void PDC_beep(void)
{
}
void PDC_napms(int ms)
{
#ifdef _WIN32
Sleep(ms);
#else
#ifndef DOS
#ifdef LINUX_FRAMEBUFFER_PORT
PDC_check_for_blinking( );
while( ms > 0)
{
const int ms_to_nap = (ms > 50 ? 50 : ms);
usleep( 1000 * ms_to_nap);
ms -= ms_to_nap;
PDC_check_for_blinking( );
}
#else
usleep(1000 * ms);
#endif
#endif
#endif
}
const char *PDC_sysname(void)
{
#ifdef USE_DRM
return( "Direct Rendering Manager");
#else
#ifdef LINUX_FRAMEBUFFER_PORT
return( "LinuxFB");
#else
return( "VTx00");
#endif
#endif
}
#ifdef LINUX_FRAMEBUFFER_PORT
enum PDC_port PDC_port_val = PDC_PORT_LINUX_FB;
#else
enum PDC_port PDC_port_val = PDC_PORT_VT;
#endif