mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -04:00
fix not compiling with TCC, avoid shellapi.h
This commit is contained in:
parent
bb9d8fb29f
commit
5aaefd4510
21
src/Audio.c
21
src/Audio.c
@ -281,21 +281,20 @@ cc_result Audio_IsFinished(struct AudioContext* ctx, cc_bool* finished) {
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------WinMM backend------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
/* === BEGIN WINDOWS HEADERS === */
|
||||
typedef unsigned long DWORD;
|
||||
typedef unsigned short WORD;
|
||||
typedef unsigned int UINT;
|
||||
typedef char CHAR;
|
||||
typedef cc_uintptr DWORD_PTR;
|
||||
typedef char* LPSTR;
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOSERVICE
|
||||
#define NOMCX
|
||||
#define NOIME
|
||||
#ifndef UNICODE
|
||||
#define UNICODE
|
||||
#define _UNICODE
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#define WINAPI __stdcall
|
||||
#define DECLSPEC_IMPORT __declspec(dllimport)
|
||||
/* === BEGIN mmsyscom.h === */
|
||||
#define CALLBACK_NULL 0x00000000l
|
||||
typedef UINT MMRESULT;
|
||||
#define WINMMAPI DECLSPEC_IMPORT
|
||||
|
||||
/* === BEGIN mmeapi.h === */
|
||||
typedef struct WAVEHDR_ {
|
||||
LPSTR lpData;
|
||||
@ -330,7 +329,7 @@ WINMMAPI MMRESULT WINAPI waveOutPrepareHeader(HWAVEOUT hwo, WAVEHDR* hdr, UINT h
|
||||
WINMMAPI MMRESULT WINAPI waveOutUnprepareHeader(HWAVEOUT hwo, WAVEHDR* hdr, UINT hdrSize);
|
||||
WINMMAPI MMRESULT WINAPI waveOutWrite(HWAVEOUT hwo, WAVEHDR* hdr, UINT hdrSize);
|
||||
WINMMAPI MMRESULT WINAPI waveOutReset(HWAVEOUT hwo);
|
||||
/* === END WINDOWS HEADERS === */
|
||||
/* === END mmeapi.h === */
|
||||
|
||||
struct AudioContext {
|
||||
HWAVEOUT handle;
|
||||
|
@ -386,19 +386,18 @@ static cc_result Http_BackendDo(struct HttpRequest* req, cc_string* url) {
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------WinINet backend-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
/* === BEGIN WINDOWS HEADERS === */
|
||||
typedef unsigned long DWORD;
|
||||
typedef int BOOL;
|
||||
typedef unsigned short WORD;
|
||||
typedef void* PVOID;
|
||||
typedef const char* PCSTR;
|
||||
typedef cc_uintptr DWORD_PTR;
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOSERVICE
|
||||
#define NOMCX
|
||||
#define NOIME
|
||||
#ifndef UNICODE
|
||||
#define UNICODE
|
||||
#define _UNICODE
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#define WINAPI _stdcall
|
||||
#define WINBASEAPI __declspec(dllimport)
|
||||
WINBASEAPI DWORD WINAPI GetLastError(void);
|
||||
/* === BEGIN wininet.h === */
|
||||
#define INETAPI __declspec(dllimport)
|
||||
#define INETAPI DECLSPEC_IMPORT
|
||||
typedef PVOID HINTERNET;
|
||||
typedef WORD INTERNET_PORT;
|
||||
|
||||
@ -430,7 +429,7 @@ INETAPI BOOL WINAPI HttpQueryInfoA(HINTERNET hRequest, DWORD infoLevel, PVOID bu
|
||||
INETAPI BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hRequest, PCSTR headers, DWORD headersLength, DWORD modifiers);
|
||||
INETAPI HINTERNET WINAPI HttpOpenRequestA(HINTERNET hConnect, PCSTR verb, PCSTR objectName, PCSTR version, PCSTR referrer, PCSTR* acceptTypes, DWORD flags, DWORD_PTR context);
|
||||
INETAPI BOOL WINAPI HttpSendRequestA(HINTERNET hRequest, PCSTR headers, DWORD headersLength, PVOID optional, DWORD optionalLength);
|
||||
/* === END WINDOWS HEADERS === */
|
||||
/* === END wininet.h === */
|
||||
|
||||
/* caches connections to web servers */
|
||||
struct HttpCacheEntry {
|
||||
|
@ -19,9 +19,13 @@
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <shellapi.h>
|
||||
#include <wincrypt.h>
|
||||
|
||||
/* === BEGIN shellapi.h === */
|
||||
#define SHELLAPI DECLSPEC_IMPORT
|
||||
SHELLAPI HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
|
||||
/* === END shellapi.h === */
|
||||
|
||||
static HANDLE heap;
|
||||
const cc_result ReturnCode_FileShareViolation = ERROR_SHARING_VIOLATION;
|
||||
const cc_result ReturnCode_FileNotFound = ERROR_FILE_NOT_FOUND;
|
||||
|
Loading…
x
Reference in New Issue
Block a user