make compile on mingw-w64

This commit is contained in:
oltolm 2025-01-06 21:25:12 +01:00
parent b11b8b91bb
commit 9566065455
30 changed files with 102 additions and 320 deletions

View file

@ -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

View file

@ -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__

View file

@ -1,5 +1,12 @@
#include "ppsspp_config.h"
#ifdef __MINGW32__
#include <unistd.h>
#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"

View file

@ -29,13 +29,6 @@
#include "android/jni/app-android.h"
#ifdef __MINGW32__
#include <unistd.h>
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
#endif
#endif
#include <cstring>
#include <ctime>
#include <memory>

View file

@ -22,11 +22,6 @@
#include <d3d11_1.h>
#include <D3Dcompiler.h>
#ifdef __MINGW32__
#undef __uuidof
#define __uuidof(type) IID_##type
#endif
namespace Draw {
static constexpr int MAX_BOUND_TEXTURES = 8;

View file

@ -31,6 +31,7 @@
#include "Common/Log/LogManager.h"
#if PPSSPP_PLATFORM(WINDOWS)
#include <io.h>
#include "Common/Log/ConsoleListener.h"
#endif

View file

@ -1,5 +1,6 @@
#pragma once
#include <cstdint>
#include <string>
#ifdef _WIN32

View file

@ -4,10 +4,6 @@
#include "Common/CommonWindows.h"
#ifdef __MINGW32__
#include <excpt.h>
#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
}

View file

@ -18,6 +18,7 @@
#pragma once
#include "Common/CommonTypes.h"
#include <cstddef>
struct MemMap;

View file

@ -6,6 +6,9 @@
#include "Core/HLE/NetInetConstants.h"
#include "Core/HLE/sceKernel.h"
#include "Core/HLE/HLE.h"
#ifdef __MINGW32__
#include <mswsock.h>
#endif
int convertMsgFlagPSP2Host(int flag) {
switch (flag) {

View file

@ -1052,7 +1052,10 @@ static bool decodePmpVideo(PSPPointer<SceMpegRingBuffer> 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

View file

@ -22,6 +22,9 @@
#include "Core/MemMapHelpers.h"
#include "Core/Util/PortManager.h"
#include "Core/Instance.h"
#ifdef __MINGW32__
#include <mswsock.h>
#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);
}

View file

@ -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

View file

@ -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 <unistd.h>
#endif
#include <ctime>
#include "Common/System/System.h"

View file

@ -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

View file

@ -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
}

View file

@ -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;

View file

@ -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;

View file

@ -76,4 +76,4 @@ private:
FramebufferManagerDX9 *framebufferManagerDX9_;
};
D3DFORMAT getClutDestFormat(GEPaletteFormat format);
static D3DFORMAT getClutDestFormat(GEPaletteFormat format);

View file

@ -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;

View file

@ -82,4 +82,4 @@ private:
enum { INVALID_TEX = -1 };
};
Draw::DataFormat getClutDestFormat(GEPaletteFormat format);
static Draw::DataFormat getClutDestFormat(GEPaletteFormat format);

View file

@ -2,13 +2,7 @@
#include <MMReg.h>
#include <process.h>
#ifdef __MINGW32__
#define __null
#endif
#include <dsound.h>
#ifdef __MINGW32__
#undef __null
#endif
#include "Common/Thread/ThreadUtil.h"
#include "Common/Log.h"

View file

@ -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;
}

View file

@ -1,5 +1,6 @@
#include "stdafx.h"
#include <initguid.h>
#include "WindowsAudio.h"
#include "WASAPIStream.h"
#include "Common/Log.h"
@ -18,14 +19,16 @@
#include <AudioPolicy.h>
#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.

View file

@ -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
{

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -191,7 +191,7 @@ namespace basisu
#define BASISU_IS_SCALAR_TYPE(T) (scalar_type<T>::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

View file

@ -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)