mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 01:17:34 +09:00
Add support for compiling under MinGW + fix Windows compiling in general
This commit is contained in:
parent
e3a45c193c
commit
a5cf494890
56 changed files with 243 additions and 76 deletions
|
|
@ -73,11 +73,17 @@ void SetCurrentThreadName(const char* name) {
|
|||
DWORD dwFlags;
|
||||
} threadname_info = {0x1000, name, static_cast<DWORD>(-1), 0};
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
__try {
|
||||
::RaiseException(0x406D1388, 0, sizeof(threadname_info) / sizeof(DWORD),
|
||||
reinterpret_cast<ULONG_PTR*>(&threadname_info));
|
||||
} __except (EXCEPTION_EXECUTE_HANDLER) {
|
||||
}
|
||||
#else
|
||||
// MinGW does not support MSVC's __try/__except syntax.
|
||||
::RaiseException(0x406D1388, 0, sizeof(threadname_info) / sizeof(DWORD),
|
||||
reinterpret_cast<ULONG_PTR*>(&threadname_info));
|
||||
#endif
|
||||
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
|
||||
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name));
|
||||
#elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ BOOL MyWinHttpGetProxyForUrl(pfnWinHttpGetProxyForUrl pWHGPFU,
|
|||
// error.
|
||||
BOOL success = FALSE;
|
||||
|
||||
#if (_HAS_EXCEPTIONS == 0)
|
||||
#if (_HAS_EXCEPTIONS == 0) && defined(_MSC_VER)
|
||||
__try {
|
||||
success = pWHGPFU(hWinHttp, url, options, info);
|
||||
} __except(EXCEPTION_EXECUTE_HANDLER) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ protected:
|
|||
int32_t capabilityIndex);
|
||||
|
||||
int32_t DisconnectGraph();
|
||||
HRESULT VideoCaptureDS::ConnectDVCamera();
|
||||
HRESULT ConnectDVCamera();
|
||||
|
||||
DeviceInfoDS _dsInfo;
|
||||
VideoCaptureCapability _activeCapability;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <direct.h>
|
||||
#include <tchar.h>
|
||||
|
|
@ -33,7 +35,6 @@
|
|||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "webrtc/typedefs.h" // For architecture defines
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue