| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
#include "winpoop.h" |
| 16 |
#include "iaxclient_lib.h" |
| 17 |
|
| 18 |
void os_init(void) |
| 19 |
{ |
| 20 |
WSADATA wsd; |
| 21 |
|
| 22 |
if(WSAStartup(0x0101,&wsd)) |
| 23 |
{ |
| 24 |
exit(1); |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
|
| 29 |
EXPORT void iaxc_millisleep(long ms) |
| 30 |
{ |
| 31 |
Sleep(ms); |
| 32 |
} |
| 33 |
|
| 34 |
int iaxci_post_event_callback(iaxc_event ev) { |
| 35 |
iaxc_event *e; |
| 36 |
e = (iaxc_event *)malloc(sizeof(ev)); |
| 37 |
*e = ev; |
| 38 |
|
| 39 |
if (!PostMessage((HWND)post_event_handle,post_event_id,(WPARAM) NULL, (LPARAM) e)) |
| 40 |
free(e); |
| 41 |
return 0; |
| 42 |
} |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
int iaxci_prioboostbegin() { |
| 50 |
if ( !SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_TIME_CRITICAL) ) { |
| 51 |
fprintf(stderr, "SetThreadPriority failed: %ld.\n", GetLastError()); |
| 52 |
} |
| 53 |
return 0; |
| 54 |
} |
| 55 |
|
| 56 |
int iaxci_prioboostend() { |
| 57 |
|
| 58 |
return 0; |
| 59 |
} |
| 60 |
|