diff --git a/Common/CPUDetect.cpp b/Common/CPUDetect.cpp index 8fdb524655..c73ffc259e 100644 --- a/Common/CPUDetect.cpp +++ b/Common/CPUDetect.cpp @@ -62,16 +62,7 @@ void do_cpuid(u32 regs[4], u32 cpuid_leaf) { __cpuid((int *)regs, cpuid_leaf); } -#ifdef __MINGW32__ -static uint64_t do_xgetbv(unsigned int index) { - unsigned int eax, edx; - // This is xgetbv directly, so we can avoid compilers warning we need runtime checks. - asm(".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c"(index)); - return ((uint64_t)edx << 32) | eax; -} -#else #define do_xgetbv _xgetbv -#endif #else // _WIN32 diff --git a/Common/CommonFuncs.h b/Common/CommonFuncs.h index 65b3344090..caabf62e8e 100644 --- a/Common/CommonFuncs.h +++ b/Common/CommonFuncs.h @@ -76,11 +76,13 @@ inline u64 __rotr64(u64 x, unsigned int shift){ #define strncasecmp _strnicmp #endif +#ifndef __MINGW32__ #define unlink _unlink #define __rotl _rotl #define __rotl64 _rotl64 #define __rotr _rotr #define __rotr64 _rotr64 +#endif // 64 bit offsets for windows #ifndef __MINGW32__ diff --git a/Common/File/DirListing.cpp b/Common/File/DirListing.cpp index bd027a21ce..9a87e81d90 100644 --- a/Common/File/DirListing.cpp +++ b/Common/File/DirListing.cpp @@ -1,5 +1,12 @@ #include "ppsspp_config.h" +#ifdef __MINGW32__ +#include +#ifndef _POSIX_THREAD_SAFE_FUNCTIONS +#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L +#endif +#endif + #if PPSSPP_PLATFORM(WINDOWS) #define WIN32_LEAN_AND_MEAN #include "Common/CommonWindows.h" diff --git a/Common/File/FileUtil.cpp b/Common/File/FileUtil.cpp index cf43790a48..975adb648e 100644 --- a/Common/File/FileUtil.cpp +++ b/Common/File/FileUtil.cpp @@ -29,13 +29,6 @@ #include "android/jni/app-android.h" -#ifdef __MINGW32__ -#include -#ifndef _POSIX_THREAD_SAFE_FUNCTIONS -#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L -#endif -#endif - #include #include #include diff --git a/Common/GPU/D3D11/thin3d_d3d11.cpp b/Common/GPU/D3D11/thin3d_d3d11.cpp index 801333ee3c..1822e906c5 100644 --- a/Common/GPU/D3D11/thin3d_d3d11.cpp +++ b/Common/GPU/D3D11/thin3d_d3d11.cpp @@ -22,11 +22,6 @@ #include #include -#ifdef __MINGW32__ -#undef __uuidof -#define __uuidof(type) IID_##type -#endif - namespace Draw { static constexpr int MAX_BOUND_TEXTURES = 8; diff --git a/Common/Log/LogManager.cpp b/Common/Log/LogManager.cpp index 6e192df66a..eee4c714d9 100644 --- a/Common/Log/LogManager.cpp +++ b/Common/Log/LogManager.cpp @@ -31,6 +31,7 @@ #include "Common/Log/LogManager.h" #if PPSSPP_PLATFORM(WINDOWS) +#include #include "Common/Log/ConsoleListener.h" #endif diff --git a/Common/OSVersion.h b/Common/OSVersion.h index c1704b85df..06eb7c54d4 100644 --- a/Common/OSVersion.h +++ b/Common/OSVersion.h @@ -1,5 +1,6 @@ #pragma once +#include #include #ifdef _WIN32 diff --git a/Common/Thread/ThreadUtil.cpp b/Common/Thread/ThreadUtil.cpp index 2c76c77ae6..a67e1e65ac 100644 --- a/Common/Thread/ThreadUtil.cpp +++ b/Common/Thread/ThreadUtil.cpp @@ -4,10 +4,6 @@ #include "Common/CommonWindows.h" -#ifdef __MINGW32__ -#include -#endif - #define TLS_SUPPORTED #elif defined(__ANDROID__) @@ -197,19 +193,11 @@ void SetCurrentThreadNameThroughException(const char *threadName) { info.dwThreadID = -1; //dwThreadID; info.dwFlags = 0; -#ifdef __MINGW32__ - __try1 (ehandler) -#else __try -#endif { RaiseException(MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info); } -#ifdef __MINGW32__ - __except1 -#else __except(EXCEPTION_CONTINUE_EXECUTION) -#endif {} #endif } diff --git a/Core/Debugger/DebugInterface.h b/Core/Debugger/DebugInterface.h index 319ef013b2..d08ce76c19 100644 --- a/Core/Debugger/DebugInterface.h +++ b/Core/Debugger/DebugInterface.h @@ -18,6 +18,7 @@ #pragma once #include "Common/CommonTypes.h" +#include struct MemMap; diff --git a/Core/HLE/NetInetConstants.cpp b/Core/HLE/NetInetConstants.cpp index ae73a7f77b..d62c89abab 100644 --- a/Core/HLE/NetInetConstants.cpp +++ b/Core/HLE/NetInetConstants.cpp @@ -6,6 +6,9 @@ #include "Core/HLE/NetInetConstants.h" #include "Core/HLE/sceKernel.h" #include "Core/HLE/HLE.h" +#ifdef __MINGW32__ +#include +#endif int convertMsgFlagPSP2Host(int flag) { switch (flag) { diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index 492ba9811b..63776786da 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -1052,7 +1052,10 @@ static bool decodePmpVideo(PSPPointer ringbuffer, u32 pmpctxA sws_freeContext(img_convert_ctx); // update timestamp -#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(55, 58, 100) +#if LIBAVUTIL_VERSION_MAJOR >= 59 + int64_t bestPts = mediaengine->m_pFrame->best_effort_timestamp; + int64_t ptsDuration = mediaengine->m_pFrame->duration; +#elif LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(55, 58, 100) int64_t bestPts = mediaengine->m_pFrame->best_effort_timestamp; int64_t ptsDuration = mediaengine->m_pFrame->pkt_duration; #else diff --git a/Core/HLE/sceNetInet.cpp b/Core/HLE/sceNetInet.cpp index 489da3096c..a1eea64444 100644 --- a/Core/HLE/sceNetInet.cpp +++ b/Core/HLE/sceNetInet.cpp @@ -22,6 +22,9 @@ #include "Core/MemMapHelpers.h" #include "Core/Util/PortManager.h" #include "Core/Instance.h" +#ifdef __MINGW32__ +#include +#endif int inetLastErrno = 0; // TODO: since errno can only be read once, we should keep track the value to be used on sceNetInetGetErrno @@ -1005,7 +1008,7 @@ static int sceNetInetSendmsg(int socket, u32 msghdrPtr, int flags) { // Note: Many existing implementations of CMSG_FIRSTHDR never look at msg_controllen and just return the value of cmsg_control. if (pspMsghdr->msg_controllen >= sizeof(InetCmsghdr)) { // TODO: Creates our own CMSG_* macros (32-bit version of it, similar to the one on PSP) to avoid alignment/size issue that can lead to memory corruption/out of bound issue. - for (WSACMSGHDR* cmsgptr = CMSG_FIRSTHDR(&hdr); cmsgptr != NULL; cmsgptr = CMSG_NXTHDR(&hdr, cmsgptr)) { + for (WSACMSGHDR* cmsgptr = WSA_CMSG_FIRSTHDR(&hdr); cmsgptr != NULL; cmsgptr = WSA_CMSG_NXTHDR(&hdr, cmsgptr)) { cmsgptr->cmsg_type = convertCMsgTypePSP2Host(cmsgptr->cmsg_type, cmsgptr->cmsg_level); cmsgptr->cmsg_level = convertSockoptLevelPSP2Host(cmsgptr->cmsg_level); } diff --git a/Core/HLE/sceRtc.cpp b/Core/HLE/sceRtc.cpp index ff0dd67620..2ae40a1762 100644 --- a/Core/HLE/sceRtc.cpp +++ b/Core/HLE/sceRtc.cpp @@ -82,18 +82,10 @@ static u64 __RtcGetCurrentTick() return CoreTiming::GetGlobalTimeUs() + rtcBaseTicks; } -#if defined(__MINGW32__) +#if defined(__MINGW32__) && !defined(_UCRT) errno_t _get_timezone(long *seconds) { - time_t now = time(NULL); - - struct tm *gm = gmtime(&now); - time_t gmt = mktime(gm); - - struct tm *loc = localtime(&now); - time_t local = mktime(loc); - - *seconds = local - gmt; + *seconds = _timezone; return 0; } #endif diff --git a/Core/HLE/sceUsbGps.cpp b/Core/HLE/sceUsbGps.cpp index 877d262f17..dbd0dd7b7c 100644 --- a/Core/HLE/sceUsbGps.cpp +++ b/Core/HLE/sceUsbGps.cpp @@ -15,9 +15,6 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#ifdef __MINGW32__ -#include -#endif #include #include "Common/System/System.h" diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp index bfe762795c..0d636feab5 100644 --- a/Core/HW/MediaEngine.cpp +++ b/Core/HW/MediaEngine.cpp @@ -703,7 +703,10 @@ bool MediaEngine::stepVideo(int videoPixelMode, bool skipFrame) { m_pCodecCtx->height, m_pFrameRGB->data, m_pFrameRGB->linesize); } -#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(55, 58, 100) +#if LIBAVUTIL_VERSION_MAJOR >= 59 + int64_t bestPts = m_pFrame->best_effort_timestamp; + int64_t ptsDuration = m_pFrame->duration; +#elif LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(55, 58, 100) int64_t bestPts = m_pFrame->best_effort_timestamp; int64_t ptsDuration = m_pFrame->pkt_duration; #else diff --git a/Core/HW/SimpleAudioDec.cpp b/Core/HW/SimpleAudioDec.cpp index 144db032c8..a2c3373076 100644 --- a/Core/HW/SimpleAudioDec.cpp +++ b/Core/HW/SimpleAudioDec.cpp @@ -190,8 +190,15 @@ FFmpegAudioDecoder::FFmpegAudioDecoder(PSPAudioType audioType, int sampleRateHz, ERROR_LOG(Log::ME, "Failed to allocate a codec context"); return; } - codecCtx_->channels = channels_; - codecCtx_->channel_layout = channels_ == 2 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; +#if LIBAVUTIL_VERSION_MAJOR >= 59 + if (channels_ == 2) + codecCtx_->ch_layout = AV_CHANNEL_LAYOUT_STEREO; + else + codecCtx_->ch_layout = AV_CHANNEL_LAYOUT_MONO; +#else + codecCtx_->channels = channels_; + codecCtx_->channel_layout = channels_ == 2 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; +#endif codecCtx_->sample_rate = sample_rate_; codecOpen_ = false; #endif // USE_FFMPEG @@ -229,8 +236,15 @@ void FFmpegAudioDecoder::SetChannels(int channels) { ERROR_LOG(Log::ME, "Codec already open, cannot change channels"); } else { channels_ = channels; +#if LIBAVUTIL_VERSION_MAJOR >= 59 + if (channels_ == 2) + codecCtx_->ch_layout = AV_CHANNEL_LAYOUT_STEREO; + else + codecCtx_->ch_layout = AV_CHANNEL_LAYOUT_MONO; +#else codecCtx_->channels = channels_; codecCtx_->channel_layout = channels_ == 2 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; +#endif } #endif } @@ -309,10 +323,27 @@ bool FFmpegAudioDecoder::Decode(const uint8_t *inbuf, int inbytes, int *inbytesC if (got_frame) { // Initializing the sample rate convert. We will use it to convert float output into int. _dbg_assert_(outputChannels == 2); +#if LIBAVUTIL_VERSION_MAJOR >= 59 + AVChannelLayout wanted_channel_layout = AV_CHANNEL_LAYOUT_STEREO; // we want stereo output layout + const AVChannelLayout& dec_channel_layout = frame_->ch_layout; // decoded channel layout +#else int64_t wanted_channel_layout = AV_CH_LAYOUT_STEREO; // we want stereo output layout int64_t dec_channel_layout = frame_->channel_layout; // decoded channel layout +#endif if (!swrCtx_) { +#if LIBAVUTIL_VERSION_MAJOR >= 59 + swr_alloc_set_opts2( + &swrCtx_, + &wanted_channel_layout, + AV_SAMPLE_FMT_S16, + codecCtx_->sample_rate, + &dec_channel_layout, + codecCtx_->sample_fmt, + codecCtx_->sample_rate, + 0, + NULL); +#else swrCtx_ = swr_alloc_set_opts( swrCtx_, wanted_channel_layout, @@ -323,6 +354,7 @@ bool FFmpegAudioDecoder::Decode(const uint8_t *inbuf, int inbytes, int *inbytesC codecCtx_->sample_rate, 0, NULL); +#endif if (!swrCtx_ || swr_init(swrCtx_) < 0) { ERROR_LOG(Log::ME, "swr_init: Failed to initialize the resampling context"); @@ -350,7 +382,7 @@ bool FFmpegAudioDecoder::Decode(const uint8_t *inbuf, int inbytes, int *inbytesC return true; #else // Zero bytes output. No need to memset. - *outbytes = 0; + *outSamples = 0; return true; #endif // USE_FFMPEG } diff --git a/Core/MIPS/MIPSInt.cpp b/Core/MIPS/MIPSInt.cpp index 5393810317..48061c3c33 100644 --- a/Core/MIPS/MIPSInt.cpp +++ b/Core/MIPS/MIPSInt.cpp @@ -715,7 +715,11 @@ namespace MIPSInt } else if (_RS == 1) //rotr { +#ifdef __MINGW32__ + R(rd) = _rotr(R(rt), sa); +#else R(rd) = __rotr(R(rt), sa); +#endif break; } else @@ -731,7 +735,11 @@ namespace MIPSInt } else if (_FD == 1) // rotrv { +#ifdef __MINGW32__ + R(rd) = _rotr(R(rt), R(rs)); +#else R(rd) = __rotr(R(rt), R(rs)); +#endif break; } else goto wrong; diff --git a/GPU/Directx9/TextureCacheDX9.cpp b/GPU/Directx9/TextureCacheDX9.cpp index 1cd2ed6f62..69a2412546 100644 --- a/GPU/Directx9/TextureCacheDX9.cpp +++ b/GPU/Directx9/TextureCacheDX9.cpp @@ -112,7 +112,7 @@ void TextureCacheDX9::ForgetLastTexture() { lastBoundTexture = INVALID_TEX; } -D3DFORMAT getClutDestFormat(GEPaletteFormat format) { +static D3DFORMAT getClutDestFormat(GEPaletteFormat format) { switch (format) { case GE_CMODE_16BIT_ABGR4444: return D3DFMT_A4R4G4B4; diff --git a/GPU/Directx9/TextureCacheDX9.h b/GPU/Directx9/TextureCacheDX9.h index 22991e06f9..31471fadff 100644 --- a/GPU/Directx9/TextureCacheDX9.h +++ b/GPU/Directx9/TextureCacheDX9.h @@ -76,4 +76,4 @@ private: FramebufferManagerDX9 *framebufferManagerDX9_; }; -D3DFORMAT getClutDestFormat(GEPaletteFormat format); +static D3DFORMAT getClutDestFormat(GEPaletteFormat format); diff --git a/GPU/GLES/TextureCacheGLES.cpp b/GPU/GLES/TextureCacheGLES.cpp index 6e7cdb5270..cc38b91386 100644 --- a/GPU/GLES/TextureCacheGLES.cpp +++ b/GPU/GLES/TextureCacheGLES.cpp @@ -62,7 +62,7 @@ void TextureCacheGLES::Clear(bool delete_them) { TextureCacheCommon::Clear(delete_them); } -Draw::DataFormat getClutDestFormat(GEPaletteFormat format) { +static Draw::DataFormat getClutDestFormat(GEPaletteFormat format) { switch (format) { case GE_CMODE_16BIT_ABGR4444: return Draw::DataFormat::R4G4B4A4_UNORM_PACK16; diff --git a/GPU/GLES/TextureCacheGLES.h b/GPU/GLES/TextureCacheGLES.h index 7538bd3052..eb9792dd77 100644 --- a/GPU/GLES/TextureCacheGLES.h +++ b/GPU/GLES/TextureCacheGLES.h @@ -82,4 +82,4 @@ private: enum { INVALID_TEX = -1 }; }; -Draw::DataFormat getClutDestFormat(GEPaletteFormat format); +static Draw::DataFormat getClutDestFormat(GEPaletteFormat format); diff --git a/Windows/DSoundStream.cpp b/Windows/DSoundStream.cpp index 9c12d7e346..da7f8ef6f3 100644 --- a/Windows/DSoundStream.cpp +++ b/Windows/DSoundStream.cpp @@ -2,13 +2,7 @@ #include #include -#ifdef __MINGW32__ -#define __null -#endif #include -#ifdef __MINGW32__ -#undef __null -#endif #include "Common/Thread/ThreadUtil.h" #include "Common/Log.h" diff --git a/Windows/GPU/D3D11Context.cpp b/Windows/GPU/D3D11Context.cpp index d24c422554..b6aba1b895 100644 --- a/Windows/GPU/D3D11Context.cpp +++ b/Windows/GPU/D3D11Context.cpp @@ -18,11 +18,6 @@ #include "Common/GPU/thin3d_create.h" #include "Common/GPU/D3D11/D3D11Loader.h" -#ifdef __MINGW32__ -#undef __uuidof -#define __uuidof(type) IID_##type -#endif - #ifndef DXGI_ERROR_NOT_FOUND #define _FACDXGI 0x87a #define MAKE_DXGI_HRESULT(code) MAKE_HRESULT(1, _FACDXGI, code) @@ -261,7 +256,7 @@ void D3D11Context::Shutdown() { d3dInfoQueue_->SetBreakOnSeverity(D3D11_MESSAGE_SEVERITY_WARNING, false); } if (d3dDebug_) { - d3dDebug_->ReportLiveDeviceObjects(D3D11_RLDO_SUMMARY | D3D11_RLDO_DETAIL); + d3dDebug_->ReportLiveDeviceObjects(D3D11_RLDO_FLAGS(D3D11_RLDO_SUMMARY | D3D11_RLDO_DETAIL)); d3dDebug_->Release(); d3dDebug_ = nullptr; } diff --git a/Windows/WASAPIStream.cpp b/Windows/WASAPIStream.cpp index 034bdafd74..4b8f0b3a58 100644 --- a/Windows/WASAPIStream.cpp +++ b/Windows/WASAPIStream.cpp @@ -1,5 +1,6 @@ #include "stdafx.h" +#include #include "WindowsAudio.h" #include "WASAPIStream.h" #include "Common/Log.h" @@ -18,14 +19,16 @@ #include #include "Functiondiscoverykeys_devpkey.h" -// Includes some code from https://msdn.microsoft.com/en-us/library/dd370810%28VS.85%29.aspx?f=255&MSPPError=-2147217396 +// Includes some code from https://learn.microsoft.com/en-us/windows/win32/coreaudio/device-events +#ifdef _MSC_VER #pragma comment(lib, "ole32.lib") const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator); const IID IID_IMMDeviceEnumerator = __uuidof(IMMDeviceEnumerator); const IID IID_IAudioClient = __uuidof(IAudioClient); const IID IID_IAudioRenderClient = __uuidof(IAudioRenderClient); +#endif // Adapted from a MSDN sample. diff --git a/Windows/XinputDevice.cpp b/Windows/XinputDevice.cpp index 8700e9c973..43c8a95ad6 100644 --- a/Windows/XinputDevice.cpp +++ b/Windows/XinputDevice.cpp @@ -21,13 +21,16 @@ #if !PPSSPP_PLATFORM(UWP) +#ifndef __MINGW32__ struct XINPUT_CAPABILITIES_EX { XINPUT_CAPABILITIES Capabilities; - WORD vendorId; - WORD productId; - WORD revisionId; - DWORD a4; //unknown + WORD VendorId; + WORD ProductId; + WORD VersionNumber; + WORD unk1; + DWORD unk2; }; +#endif typedef DWORD (WINAPI *XInputGetState_t) (DWORD dwUserIndex, XINPUT_STATE* pState); typedef DWORD (WINAPI *XInputSetState_t) (DWORD dwUserIndex, XINPUT_VIBRATION* pVibration); @@ -189,7 +192,7 @@ void XinputDevice::UpdatePad(int pad, const XINPUT_STATE &state, XINPUT_VIBRATIO #if !PPSSPP_PLATFORM(UWP) XINPUT_CAPABILITIES_EX caps{}; if (PPSSPP_XInputGetCapabilitiesEx != nullptr && PPSSPP_XInputGetCapabilitiesEx(1, pad, 0, &caps) == ERROR_SUCCESS) { - KeyMap::NotifyPadConnected(DEVICE_ID_XINPUT_0 + pad, StringFromFormat("Xbox 360 Pad: %d/%d", caps.vendorId, caps.productId)); + KeyMap::NotifyPadConnected(DEVICE_ID_XINPUT_0 + pad, StringFromFormat("Xbox 360 Pad: %d/%d", caps.VendorId, caps.ProductId)); } else { #else { diff --git a/Windows/main.cpp b/Windows/main.cpp index 093c4be7d2..4f80b64659 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -730,7 +730,7 @@ static std::string GetDefaultLangRegion() { wchar_t lcLangName[256] = {}; // LOCALE_SNAME is only available in WinVista+ - if (0 != GetLocaleInfo(LOCALE_NAME_USER_DEFAULT, LOCALE_SNAME, lcLangName, ARRAY_SIZE(lcLangName))) { + if (0 != GetLocaleInfoEx(LOCALE_NAME_USER_DEFAULT, LOCALE_SNAME, lcLangName, ARRAY_SIZE(lcLangName))) { std::string result = ConvertWStringToUTF8(lcLangName); std::replace(result.begin(), result.end(), '-', '_'); return result; diff --git a/Windows/mingw_defines.h b/Windows/mingw_defines.h deleted file mode 100644 index ff49b2dbaa..0000000000 --- a/Windows/mingw_defines.h +++ /dev/null @@ -1,237 +0,0 @@ - -/* these defines are needed when using the msvc headers from the dx9sdk directory with mingw */ - -#pragma once - -#define WINAPI_FAMILY_ONE_PARTITION(vset, v) ((WINAPI_FAMILY & vset) == v) - -#define __REQUIRED_RPCNDR_H_VERSION__ 475 -/* Pointer parameters */ -#define _In_ -#define _Out_ -#define _Inout_ -#define _In_z_ -#define _Inout_z_ -#define _In_reads_(s) -#define _In_reads_bytes_(s) -#define _In_reads_z_(s) -#define _In_reads_or_z_(s) -#define _Out_writes_(s) -#define _Out_writes_bytes_(s) -#define _Out_writes_z_(s) -#define _Inout_updates_(s) -#define _Inout_updates_bytes_(s) -#define _Inout_updates_z_(s) -#define _Out_writes_to_(s,c) -#define _Out_writes_bytes_to_(s, c) -#define _Out_writes_all_(s) -#define _Out_writes_bytes_all_(s) -#define _Inout_updates_to_(s, c) -#define _Inout_updates_bytes_to_(s, c) -#define _Inout_updates_all_(s) -#define _Inout_updates_bytes_all_(s) -#define _In_reads_to_ptr_(p) -#define _In_reads_to_ptr_z_(p) -#define _Out_writes_to_ptr_(p) -#define _Out_writes_to_ptr_z(p) - -/* Optional pointer parameters */ -#define __in_opt -#define __out_opt -#define __inout_opt -#define _In_opt_ -#define _Out_opt_ -#define _Inout_opt_ -#define _In_opt_z_ -#define _Inout_opt_z_ -#define _In_reads_opt_(s) -#define _In_reads_bytes_opt_(s) -#define _In_reads_opt_z_(s) - -#define _Out_writes_opt_(s) -#define _Out_writes_opt_z_(s) -#define _Inout_updates_opt_(s) -#define _Inout_updates_bytes_opt_(s) -#define _Inout_updates_opt_z_(s) -#define _Out_writes_to_opt_(s, c) -#define _Out_writes_bytes_to_opt_(s, c) -#define _Out_writes_all_opt_(s) -#define _Out_writes_bytes_all_opt_(s) - -#define _Inout_updates_to_opt_(s, c) -#define _Inout_updates_bytes_to_opt_(s, c) -#define _Inout_updates_all_opt_(s) -#define _Inout_updates_bytes_all_opt_(s) -#define _In_reads_to_ptr_opt_(p) -#define _In_reads_to_ptr_opt_z_(p) -#define _Out_writes_to_ptr_opt_(p) -#define _Out_writes_to_ptr_opt_z_(p) - -/* Output pointer parameters */ -#define _Outptr_ -#define _Outptr_opt_ -#define _Outptr_result_maybenull_ -#define _Outptr_opt_result_maybenull_ -#define _Outptr_result_z_ -#define _Outptr_opt_result_z_ -#define _Outptr_result_maybenull_z_ -#define _Outptr_opt_result_maybenull_z_ -#define _COM_Outptr_ -#define _COM_Outptr_opt_ -#define _COM_Outptr_result_maybenull_ -#define _COM_Outptr_opt_result_maybenull_ -#define _Outptr_result_buffer_(s) -#define _Outptr_result_bytebuffer_(s) -#define _Outptr_opt_result_buffer_(s) -#define _Outptr_opt_result_bytebuffer_(s) -#define _Outptr_result_buffer_to_(s, c) -#define _Outptr_result_bytebuffer_to_(s, c) -#define _Outptr_result_bytebuffer_maybenull_(s) -#define _Outptr_opt_result_buffer_to_(s, c) -#define _Outptr_opt_result_bytebuffer_to_(s, c) -#define _Result_nullonfailure_ -#define _Result_zeroonfailure_ -#define _Outptr_result_nullonfailure_ -#define _Outptr_opt_result_nullonfailure_ -#define _Outref_result_nullonfailure_ - -/* Output reference parameters */ -#define _Outref_ -#define _Outref_result_maybenull_ -#define _Outref_result_buffer_(s) -#define _Outref_result_bytebuffer_(s) -#define _Outref_result_buffer_to_(s, c) -#define _Outref_result_bytebuffer_to_(s, c) -#define _Outref_result_buffer_all_(s) -#define _Outref_result_bytebuffer_all_(s) -#define _Outref_result_buffer_maybenull_(s) -#define _Outref_result_bytebuffer_maybenull_(s) -#define _Outref_result_buffer_to_maybenull_(s, c) -#define _Outref_result_bytebuffer_to_maybenull_(s, c) -#define _Outref_result_buffer_all_maybenull_(s) -#define _Outref_result_bytebuffer_all_maybenull_(s) - -/* Return values */ -#define _Ret_z_ -#define _Ret_writes_(s) -#define _Ret_writes_bytes_(s) -#define _Ret_writes_z_(s) -#define _Ret_writes_bytes_to_(s, c) -#define _Ret_writes_maybenull_(s) -#define _Ret_writes_to_maybenull_(s, c) -#define _Ret_writes_maybenull_z_(s) -#define _Ret_maybenull_ -#define _Ret_maybenull_z_ -#define _Ret_null_ -#define _Ret_notnull_ -#define _Ret_writes_bytes_to_(s, c) -#define _Ret_writes_bytes_maybenull_(s) -#define _Ret_writes_bytes_to_maybenull_(s, c) - -/* Other common annotations */ -#define _In_range_(low, hi) -#define _Out_range_(low, hi) -#define _Ret_range_(low, hi) -#define _Deref_in_range_(low, hi) -#define _Deref_out_range_(low, hi) -#define _Deref_inout_range_(low, hi) -#define _Pre_equal_to_(expr) -#define _Post_equal_to_(expr) -#define _Struct_size_bytes_(size) - -/* Function annotations */ -#define _Called_from_function_class_(name) -#define _Check_return_ __checkReturn -#define _Function_class_(name) -#define _Raises_SEH_exception_ -#define _Maybe_raises_SEH_exception_ -#define _Must_inspect_result_ -#define _Use_decl_annotations_ - -/* Success/failure annotations */ -#define _Always_(anno_list) -#define _On_failure_(anno_list) -#define _Return_type_success_(expr) -#define _Success_(expr) - -#define _Reserved_ -#define _Const_ - -/* Buffer properties */ -#define _Readable_bytes_(s) -#define _Readable_elements_(s) -#define _Writable_bytes_(s) -#define _Writable_elements_(s) -#define _Null_terminated_ -#define _NullNull_terminated_ -#define _Pre_readable_size_(s) -#define _Pre_writable_size_(s) -#define _Pre_readable_byte_size_(s) -#define _Pre_writable_byte_size_(s) -#define _Post_readable_size_(s) -#define _Post_writable_size_(s) -#define _Post_readable_byte_size_(s) -#define _Post_writable_byte_size_(s) - -/* Field properties */ -#define _Field_size_(s) -#define _Field_size_full_(s) -#define _Field_size_full_opt_(s) -#define _Field_size_opt_(s) -#define _Field_size_part_(s, c) -#define _Field_size_part_opt_(s, c) -#define _Field_size_bytes_(size) -#define _Field_size_bytes_full_(size) -#define _Field_size_bytes_full_opt_(s) -#define _Field_size_bytes_opt_(s) -#define _Field_size_bytes_part_(s, c) -#define _Field_size_bytes_part_opt_(s, c) -#define _Field_z_ -#define _Field_range_(min, max) - -/* Structural annotations */ -#define _At_(e, a) -#define _At_buffer_(e, i, c, a) -#define _Group_(a) -#define _When_(e, a) - -/* printf/scanf annotations */ -#define _Printf_format_string_ -#define _Scanf_format_string_ -#define _Scanf_s_format_string_ -#define _Format_string_impl_(kind,where) -#define _Printf_format_string_params_(x) -#define _Scanf_format_string_params_(x) -#define _Scanf_s_format_string_params_(x) - -/* Analysis */ -#define _Analysis_assume_(expr) -#define _Analysis_assume_nullterminated_(expr) - -#define __in -#define __out -#define __deref_out - -#define __in_bcount(size) -#define __in_bcount_opt(size) -#define __in_ecount(size) -#define __out_bcount(size) -#define __out_bcount_opt(size) -#define __out_bcount_part(size, length) -#define __out_ecount(size) -#define __out_ecount_opt(size) -#define __inout -#define __deref_out_bcount(size) -#define __deref_opt_out_bcount(size) -#define __deref_out_ecount(size) -#define __in_ecount_opt(s) - -#define _In_ -#define _In_opt_ -#define _Null_ -#define _Out_writes_bytes_opt_(s) -#define _Out_writes_bytes_(s) -#define _In_reads_bytes_(s) -#define _Inout_opt_bytecount_(s) - -#define __reserved diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 4f48db5f46..38aa996510 100644 --- a/Windows/ppsspp.rc +++ b/Windows/ppsspp.rc @@ -126,11 +126,11 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "Comments", "PPSSPP PSP emulator" - VALUE "CompanyName", "Henrik Rydgård" + VALUE "CompanyName", "Henrik Rydg\xE5rd" VALUE "FileDescription", "PPSSPP" VALUE "FileVersion", PPSSPP_WIN_VERSION_STRING VALUE "InternalName", "PPSSPPEmu" - VALUE "LegalCopyright", "Copyright (C) 2006-2021 by Henrik Rydgård" + VALUE "LegalCopyright", "Copyright \xA9 2006-2021 by Henrik Rydg\xE5rd" VALUE "LegalTrademarks", "All product names are trademarks of their respective owners." VALUE "OriginalFilename", "PPSSPP.exe" VALUE "ProductName", "PPSSPP" @@ -284,7 +284,7 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,243,140,50,14 ICON IDI_PPSSPP,IDC_STATIC,10,9,21,20 LTEXT "PPSSPP",IDC_VERSION,40,8,127,9 - LTEXT "Copyright (c) by Henrik Rydgård the PPSSPP project 2012-",IDC_STATIC,40,33,253,8 + LTEXT "Copyright \xA9 by Henrik Rydg\xE5rd the PPSSPP project 2012-",IDC_STATIC,40,33,253,8 LTEXT "All trademarks are property of their respective owners.\nThe emulator is for educational and development purposes only and it may not be used to play games you do not legally own.",IDC_STATIC,40,102,253,24 LTEXT "PSP emulator and debugger",IDC_STATIC,40,19,253,8 LTEXT "CISO decompression code by BOOSTER",IDC_STATIC,48,73,240,8 @@ -578,7 +578,7 @@ BEGIN MENUITEM "Take Screenshot", ID_DEBUG_TAKESCREENSHOT MENUITEM "Dump Next Frame to Log", ID_DEBUG_DUMPNEXTFRAME MENUITEM "Show Debug Statistics", ID_DEBUG_SHOWDEBUGSTATISTICS - MENUITEM "Restart Graphics", ID_DEBUG_RESTARTGRAPHICS, + MENUITEM "Restart Graphics", ID_DEBUG_RESTARTGRAPHICS MENUITEM "", 0, MFT_SEPARATOR MENUITEM "Disassembly", ID_DEBUG_DISASSEMBLY MENUITEM "GE Debugger...", ID_DEBUG_GEDEBUGGER @@ -848,9 +848,9 @@ BEGIN END POPUP "getaboptions" BEGIN - MENUITEM "Show in &Left Pane" ID_GEDBG_SHOWONLEFT - MENUITEM "Show in &Right Pane" ID_GEDBG_SHOWONRIGHT - MENUITEM "Show in &Top Right Pane" ID_GEDBG_SHOWONTOPRIGHT + MENUITEM "Show in &Left Pane", ID_GEDBG_SHOWONLEFT + MENUITEM "Show in &Right Pane", ID_GEDBG_SHOWONRIGHT + MENUITEM "Show in &Top Right Pane", ID_GEDBG_SHOWONTOPRIGHT END POPUP "cpuwatchlist" BEGIN diff --git a/ext/basis_universal/basisu_containers.h b/ext/basis_universal/basisu_containers.h index b08523cd84..a19cdc23b0 100644 --- a/ext/basis_universal/basisu_containers.h +++ b/ext/basis_universal/basisu_containers.h @@ -191,7 +191,7 @@ namespace basisu #define BASISU_IS_SCALAR_TYPE(T) (scalar_type::cFlag) -#if defined(__GNUC__) && __GNUC__<5 +#if defined(__GNUC__) && __GNUC__<5 && !defined(__clang__) #define BASISU_IS_TRIVIALLY_COPYABLE(...) __has_trivial_copy(__VA_ARGS__) #else #define BASISU_IS_TRIVIALLY_COPYABLE(...) std::is_trivially_copyable<__VA_ARGS__>::value diff --git a/ext/libzip/config.h b/ext/libzip/config.h index 77c373b611..d90dda598f 100644 --- a/ext/libzip/config.h +++ b/ext/libzip/config.h @@ -35,6 +35,10 @@ #define HAVE_LOCALTIME_R #define HAVE_MKSTEMP 1 #endif +#ifdef __MINGW32__ +#define HAVE_FSEEKO +#define HAVE_FTELLO +#endif #define HAVE_SNPRINTF #define HAVE_STRDUP #if !defined(__MINGW32__) && defined(_WIN32)