mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-07-03 08:15:32 +00:00
Fix MSVC build issues
This commit is contained in:
parent
dd7820f100
commit
487a62f58c
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -392,7 +394,7 @@ int LiSendScrollEvent(signed char scrollClicks);
|
|||||||
// This function returns a time in milliseconds with an implementation-defined epoch.
|
// This function returns a time in milliseconds with an implementation-defined epoch.
|
||||||
// NOTE: This will be populated from gettimeofday() if !HAVE_CLOCK_GETTIME and
|
// NOTE: This will be populated from gettimeofday() if !HAVE_CLOCK_GETTIME and
|
||||||
// populated from clock_gettime(CLOCK_MONOTONIC) if HAVE_CLOCK_GETTIME.
|
// populated from clock_gettime(CLOCK_MONOTONIC) if HAVE_CLOCK_GETTIME.
|
||||||
unsigned long long LiGetMillis(void);
|
uint64_t LiGetMillis(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,6 @@ void LiInitializeServerInformation(PSERVER_INFORMATION serverInfo) {
|
|||||||
memset(serverInfo, 0, sizeof(*serverInfo));
|
memset(serverInfo, 0, sizeof(*serverInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long LiGetMillis(void) {
|
uint64_t LiGetMillis(void) {
|
||||||
return PltGetMillis();
|
return PltGetMillis();
|
||||||
}
|
}
|
||||||
|
@ -16,19 +16,6 @@ struct thread_context {
|
|||||||
|
|
||||||
static int running_threads = 0;
|
static int running_threads = 0;
|
||||||
|
|
||||||
#if defined(LC_WINDOWS)
|
|
||||||
void LimelogWindows(char* Format, ...) {
|
|
||||||
va_list va;
|
|
||||||
char buffer[1024];
|
|
||||||
|
|
||||||
va_start(va, Format);
|
|
||||||
vsprintf(buffer, Format, va);
|
|
||||||
va_end(va);
|
|
||||||
|
|
||||||
OutputDebugStringA(buffer);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
DWORD WINAPI ThreadProc(LPVOID lpParameter) {
|
DWORD WINAPI ThreadProc(LPVOID lpParameter) {
|
||||||
struct thread_context* ctx = (struct thread_context*)lpParameter;
|
struct thread_context* ctx = (struct thread_context*)lpParameter;
|
||||||
@ -293,7 +280,7 @@ int PltWaitForEvent(PLT_EVENT* event) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long long PltGetMillis(void) {
|
uint64_t PltGetMillis(void) {
|
||||||
#if defined(LC_WINDOWS)
|
#if defined(LC_WINDOWS)
|
||||||
return GetTickCount64();
|
return GetTickCount64();
|
||||||
#elif HAVE_CLOCK_GETTIME
|
#elif HAVE_CLOCK_GETTIME
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
@ -62,4 +63,4 @@
|
|||||||
int initializePlatform(void);
|
int initializePlatform(void);
|
||||||
void cleanupPlatform(void);
|
void cleanupPlatform(void);
|
||||||
|
|
||||||
unsigned long long PltGetMillis(void);
|
uint64_t PltGetMillis(void);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
typedef struct _RTP_QUEUE_ENTRY {
|
typedef struct _RTP_QUEUE_ENTRY {
|
||||||
PRTP_PACKET packet;
|
PRTP_PACKET packet;
|
||||||
|
|
||||||
unsigned long long queueTimeMs;
|
uint64_t queueTimeMs;
|
||||||
|
|
||||||
struct _RTP_QUEUE_ENTRY* next;
|
struct _RTP_QUEUE_ENTRY* next;
|
||||||
struct _RTP_QUEUE_ENTRY* prev;
|
struct _RTP_QUEUE_ENTRY* prev;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user