mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-17 17:05:50 +00:00
39 lines
712 B
C
39 lines
712 B
C
#pragma once
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#ifdef _WIN32
|
|
#include <Windows.h>
|
|
#else
|
|
#include <unistd.h>
|
|
#include <pthread.h>
|
|
#endif
|
|
|
|
|
|
#ifdef _WIN32
|
|
# if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
|
# define LC_WINDOWS_PHONE
|
|
# elif WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
|
|
# define LC_WINDOWS
|
|
# endif
|
|
#else
|
|
# define LC_POSIX
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
#ifdef LC_WINDOWS_PHONE
|
|
extern WCHAR DbgBuf[512];
|
|
#define Limelog(s, ...) \
|
|
swprintf(DbgBuf, sizeof(DbgBuf) / sizeof(WCHAR), L ## s, ##__VA_ARGS__); \
|
|
OutputDebugString(DbgBuf)
|
|
#else
|
|
#define Limelog printf
|
|
#endif
|
|
|
|
#if defined(LC_WINDOWS_PHONE) || defined(LC_WINDOWS)
|
|
#include <crtdbg.h>
|
|
#define LC_ASSERT _ASSERTE
|
|
#else
|
|
#define LC_ASSERT(x)
|
|
#endif |