mirror of
https://github.com/libretro/RetroArch.git
synced 2024-10-07 06:13:22 +00:00
(msvc) CXX_BUILD + griffin fixes.
This commit is contained in:
parent
6982dd838f
commit
5549b136c2
@ -5,6 +5,7 @@ OS = Win32
|
|||||||
ARCH = amd64
|
ARCH = amd64
|
||||||
#TARGET_ARCH = x86
|
#TARGET_ARCH = x86
|
||||||
BUILD_DIR = objs/msvc
|
BUILD_DIR = objs/msvc
|
||||||
|
CXX_BUILD = 0
|
||||||
|
|
||||||
|
|
||||||
WindowsSdkDir = C:\Program Files (x86)\Windows Kits\10\$(NOTHING)
|
WindowsSdkDir = C:\Program Files (x86)\Windows Kits\10\$(NOTHING)
|
||||||
@ -59,7 +60,6 @@ include Makefile.common
|
|||||||
INCLUDE_DIRS := $(patsubst -isystem%,-I%,$(INCLUDE_DIRS))
|
INCLUDE_DIRS := $(patsubst -isystem%,-I%,$(INCLUDE_DIRS))
|
||||||
CFLAGS := $(filter-out -Wno-unknown-pragmas,$(CFLAGS))
|
CFLAGS := $(filter-out -Wno-unknown-pragmas,$(CFLAGS))
|
||||||
CXXFLAGS := $(filter-out -fpermissive -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses,$(CXXFLAGS))
|
CXXFLAGS := $(filter-out -fpermissive -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses,$(CXXFLAGS))
|
||||||
CXXFLAGS += $(CFLAGS)
|
|
||||||
LIBS := $(filter-out -lstdc++,$(LIBS))
|
LIBS := $(filter-out -lstdc++,$(LIBS))
|
||||||
|
|
||||||
ifeq ($(ARCH),x64)
|
ifeq ($(ARCH),x64)
|
||||||
@ -124,11 +124,16 @@ FLAGS += -Gm- -Zc:inline -fp:precise -Zc:forScope -GR- -Gd -Oi -volatile:iso
|
|||||||
#FLAGS += -utf-8
|
#FLAGS += -utf-8
|
||||||
#FLAGS += -source-charset:utf-8
|
#FLAGS += -source-charset:utf-8
|
||||||
|
|
||||||
|
CXXFLAGS += $(CFLAGS) -TP -EHsc
|
||||||
|
ifeq ($(CXX_BUILD),1)
|
||||||
|
CFLAGS := $(CXXFLAGS)
|
||||||
|
DEFINES += -DCXX_BUILD
|
||||||
|
else
|
||||||
|
CFLAGS += -TC
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += -TC
|
|
||||||
CXXFLAGS += -TP -EHsc
|
|
||||||
WARNINGS += -WX -W3
|
WARNINGS += -WX -W3
|
||||||
WARNINGS += -wd4101 -wd4996 -wd4244 -wd4267 -wd4090 -wd4305 -wd4146 -wd4334 -wd4018 -wd4800
|
WARNINGS += -wd4101 -wd4996 -wd4244 -wd4267 -wd4090 -wd4305 -wd4146 -wd4334 -wd4018 -wd4800 -wd4838
|
||||||
|
|
||||||
CC = cl.exe
|
CC = cl.exe
|
||||||
CXX = cl.exe
|
CXX = cl.exe
|
||||||
|
@ -59,13 +59,13 @@ typedef struct
|
|||||||
size_t bufsize;
|
size_t bufsize;
|
||||||
} xa_t;
|
} xa_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
struct xaudio2 : public IXAudio2VoiceCallback
|
struct xaudio2 : public IXAudio2VoiceCallback
|
||||||
#else
|
#else
|
||||||
struct xaudio2
|
struct xaudio2
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
xaudio2() :
|
xaudio2() :
|
||||||
buf(0), pXAudio2(0), pMasterVoice(0),
|
buf(0), pXAudio2(0), pMasterVoice(0),
|
||||||
pSourceVoice(0), hEvent(0), buffers(0), bufsize(0),
|
pSourceVoice(0), hEvent(0), buffers(0), bufsize(0),
|
||||||
@ -101,8 +101,8 @@ struct xaudio2
|
|||||||
unsigned write_buffer;
|
unsigned write_buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||||
static void WINAPI voice_on_buffer_end(void *handle_, void *data)
|
static void WINAPI voice_on_buffer_end(IXAudio2VoiceCallback *handle_, void *data)
|
||||||
{
|
{
|
||||||
xaudio2_t *handle = (xaudio2_t*)handle_;
|
xaudio2_t *handle = (xaudio2_t*)handle_;
|
||||||
(void)data;
|
(void)data;
|
||||||
@ -110,10 +110,10 @@ static void WINAPI voice_on_buffer_end(void *handle_, void *data)
|
|||||||
SetEvent(handle->hEvent);
|
SetEvent(handle->hEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WINAPI dummy_voidp(void *handle, void *data) { (void)handle; (void)data; }
|
static void WINAPI dummy_voidp(IXAudio2VoiceCallback *handle, void *data) { (void)handle; (void)data; }
|
||||||
static void WINAPI dummy_nil(void *handle) { (void)handle; }
|
static void WINAPI dummy_nil(IXAudio2VoiceCallback *handle) { (void)handle; }
|
||||||
static void WINAPI dummy_uint32(void *handle, UINT32 dummy) { (void)handle; (void)dummy; }
|
static void WINAPI dummy_uint32(IXAudio2VoiceCallback *handle, UINT32 dummy) { (void)handle; (void)dummy; }
|
||||||
static void WINAPI dummy_voidp_hresult(void *handle, void *data, HRESULT dummy) { (void)handle; (void)data; (void)dummy; }
|
static void WINAPI dummy_voidp_hresult(IXAudio2VoiceCallback *handle, void *data, HRESULT dummy) { (void)handle; (void)data; (void)dummy; }
|
||||||
|
|
||||||
const struct IXAudio2VoiceCallbackVtbl voice_vtable = {
|
const struct IXAudio2VoiceCallbackVtbl voice_vtable = {
|
||||||
dummy_uint32,
|
dummy_uint32,
|
||||||
@ -189,7 +189,7 @@ static void xaudio2_free(xaudio2_t *handle)
|
|||||||
|
|
||||||
free(handle->buf);
|
free(handle->buf);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
delete handle;
|
delete handle;
|
||||||
#else
|
#else
|
||||||
free(handle);
|
free(handle);
|
||||||
@ -206,7 +206,7 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
|||||||
CoInitializeEx(0, COINIT_MULTITHREADED);
|
CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
handle = new xaudio2;
|
handle = new xaudio2;
|
||||||
#else
|
#else
|
||||||
handle = (xaudio2_t*)calloc(1, sizeof(*handle));
|
handle = (xaudio2_t*)calloc(1, sizeof(*handle));
|
||||||
@ -215,7 +215,7 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
|||||||
if (!handle)
|
if (!handle)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||||
handle->lpVtbl = &voice_vtable;
|
handle->lpVtbl = &voice_vtable;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
/* All structures defined in this file use tight field packing */
|
/* All structures defined in this file use tight field packing */
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
#define X2DEFAULT(x) = (x)
|
#define X2DEFAULT(x) = (x)
|
||||||
#else
|
#else
|
||||||
#define X2DEFAULT(x)
|
#define X2DEFAULT(x)
|
||||||
@ -183,6 +183,9 @@ typedef struct XAUDIO2_BUFFER
|
|||||||
void *pContext;
|
void *pContext;
|
||||||
} XAUDIO2_BUFFER;
|
} XAUDIO2_BUFFER;
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IXAudio2VoiceCallback
|
||||||
|
|
||||||
DECLARE_INTERFACE(IXAudio2VoiceCallback)
|
DECLARE_INTERFACE(IXAudio2VoiceCallback)
|
||||||
{
|
{
|
||||||
STDMETHOD_(void, OnVoiceProcessingPassStart) (THIS_ UINT32 BytesRequired) PURE;
|
STDMETHOD_(void, OnVoiceProcessingPassStart) (THIS_ UINT32 BytesRequired) PURE;
|
||||||
@ -194,6 +197,9 @@ DECLARE_INTERFACE(IXAudio2VoiceCallback)
|
|||||||
STDMETHOD_(void, OnVoiceError) (THIS_ void *pBufferContext, HRESULT Error) PURE;
|
STDMETHOD_(void, OnVoiceError) (THIS_ void *pBufferContext, HRESULT Error) PURE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IXAudio2Voice
|
||||||
|
|
||||||
DECLARE_INTERFACE(IXAudio2Voice)
|
DECLARE_INTERFACE(IXAudio2Voice)
|
||||||
{
|
{
|
||||||
#define Declare_IXAudio2Voice_Methods() \
|
#define Declare_IXAudio2Voice_Methods() \
|
||||||
@ -235,11 +241,17 @@ DECLARE_INTERFACE(IXAudio2Voice)
|
|||||||
Declare_IXAudio2Voice_Methods();
|
Declare_IXAudio2Voice_Methods();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IXAudio2MasteringVoice
|
||||||
|
|
||||||
DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice)
|
DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice)
|
||||||
{
|
{
|
||||||
Declare_IXAudio2Voice_Methods();
|
Declare_IXAudio2Voice_Methods();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IXAudio2SourceVoice
|
||||||
|
|
||||||
DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice)
|
DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice)
|
||||||
{
|
{
|
||||||
Declare_IXAudio2Voice_Methods();
|
Declare_IXAudio2Voice_Methods();
|
||||||
@ -255,6 +267,8 @@ DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice)
|
|||||||
STDMETHOD_(void, GetFrequencyRatio) (THIS_ float* pRatio) PURE;
|
STDMETHOD_(void, GetFrequencyRatio) (THIS_ float* pRatio) PURE;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#undef INTERFACE
|
||||||
|
#define INTERFACE IXAudio2
|
||||||
|
|
||||||
DECLARE_INTERFACE_(IXAudio2, IUnknown)
|
DECLARE_INTERFACE_(IXAudio2, IUnknown)
|
||||||
{
|
{
|
||||||
@ -292,7 +306,7 @@ DECLARE_INTERFACE_(IXAudio2, IUnknown)
|
|||||||
void *pReserved X2DEFAULT(NULL)) PURE;
|
void *pReserved X2DEFAULT(NULL)) PURE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
/* C++ hooks */
|
/* C++ hooks */
|
||||||
#define IXAudio2_Initialize(handle,a,b) handle->Initialize(a, b)
|
#define IXAudio2_Initialize(handle,a,b) handle->Initialize(a, b)
|
||||||
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, a, b) handle->SubmitSourceBuffer(a, b)
|
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, a, b) handle->SubmitSourceBuffer(a, b)
|
||||||
@ -305,17 +319,17 @@ DECLARE_INTERFACE_(IXAudio2, IUnknown)
|
|||||||
#define IXAudio2SourceVoice_Start(handle, a, b) handle->Start(a, b)
|
#define IXAudio2SourceVoice_Start(handle, a, b) handle->Start(a, b)
|
||||||
#else
|
#else
|
||||||
/* C hooks */
|
/* C hooks */
|
||||||
#define IXAudio2_Initialize(THIS,a,b) (THIS)->lpVtbl->Initialize(THIS, a, b)
|
#define IXAudio2_Initialize(handle,a,b) (handle)->lpVtbl->Initialize(handle, a, b)
|
||||||
#define IXAudio2_Release(THIS) (THIS)->lpVtbl->Release(THIS)
|
#define IXAudio2_Release(handle) (handle)->lpVtbl->Release(handle)
|
||||||
#define IXAudio2_CreateSourceVoice(THIS,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (THIS)->lpVtbl->CreateSourceVoice(THIS, ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
|
#define IXAudio2_CreateSourceVoice(handle,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (handle)->lpVtbl->CreateSourceVoice(handle, ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
|
||||||
#define IXAudio2_CreateMasteringVoice(THIS,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (THIS)->lpVtbl->CreateMasteringVoice(THIS, ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
|
#define IXAudio2_CreateMasteringVoice(handle,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (handle)->lpVtbl->CreateMasteringVoice(handle, ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
|
||||||
#define IXAudio2_GetDeviceCount(THIS, puCount) (THIS)->lpVtbl->GetDeviceCount(THIS, puCount)
|
#define IXAudio2_GetDeviceCount(handle, puCount) (handle)->lpVtbl->GetDeviceCount(handle, puCount)
|
||||||
#define IXAudio2_GetDeviceDetails(THIS, Index,pDeviceDetails) (THIS)->lpVtbl->GetDeviceDetails(THIS, Index, pDeviceDetails)
|
#define IXAudio2_GetDeviceDetails(handle, Index,pDeviceDetails) (handle)->lpVtbl->GetDeviceDetails(handle, Index, pDeviceDetails)
|
||||||
#define IXAudio2SourceVoice_Start(THIS, Flags, OperationSet) (THIS)->lpVtbl->Start(THIS, Flags, OperationSet)
|
#define IXAudio2SourceVoice_Start(handle, Flags, OperationSet) (handle)->lpVtbl->Start(handle, Flags, OperationSet)
|
||||||
#define IXAudio2SourceVoice_Stop(THIS, Flags, OperationSet) (THIS)->lpVtbl->Stop(THIS, Flags, OperationSet)
|
#define IXAudio2SourceVoice_Stop(handle, Flags, OperationSet) (handle)->lpVtbl->Stop(handle, Flags, OperationSet)
|
||||||
#define IXAudio2SourceVoice_SubmitSourceBuffer(THIS, pBuffer, pBufferWMA) (THIS)->lpVtbl->SubmitSourceBuffer(THIS, pBuffer, pBufferWMA)
|
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, pBuffer, pBufferWMA) (handle)->lpVtbl->SubmitSourceBuffer(handle, pBuffer, pBufferWMA)
|
||||||
#define IXAudio2SourceVoice_DestroyVoice(THIS) (THIS)->lpVtbl->DestroyVoice(THIS)
|
#define IXAudio2SourceVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
|
||||||
#define IXAudio2MasteringVoice_DestroyVoice(THIS) (THIS)->lpVtbl->DestroyVoice(THIS)
|
#define IXAudio2MasteringVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
|
1
deps/libz/adler32.c
vendored
1
deps/libz/adler32.c
vendored
@ -8,6 +8,7 @@
|
|||||||
#define ZLIB_INTERNAL
|
#define ZLIB_INTERNAL
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <compat/zutil.h>
|
||||||
|
|
||||||
#define BASE 65521UL /* largest prime smaller than 65536 */
|
#define BASE 65521UL /* largest prime smaller than 65536 */
|
||||||
#define NMAX 5552
|
#define NMAX 5552
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "../../defaults.h"
|
#include "../../defaults.h"
|
||||||
#include "../../retroarch.h"
|
#include "../../retroarch.h"
|
||||||
#include "../../verbosity.h"
|
#include "../../verbosity.h"
|
||||||
|
#include "../../ui/drivers/ui_win32.h"
|
||||||
|
|
||||||
/* We only load this library once, so we let it be
|
/* We only load this library once, so we let it be
|
||||||
* unloaded at application shutdown, since unloading
|
* unloaded at application shutdown, since unloading
|
||||||
|
@ -268,19 +268,12 @@ static void d3d12_init_sampler(
|
|||||||
D3D12_TEXTURE_ADDRESS_MODE address_mode,
|
D3D12_TEXTURE_ADDRESS_MODE address_mode,
|
||||||
D3D12_GPU_DESCRIPTOR_HANDLE* dst)
|
D3D12_GPU_DESCRIPTOR_HANDLE* dst)
|
||||||
{
|
{
|
||||||
D3D12_SAMPLER_DESC sampler_desc = {
|
D3D12_SAMPLER_DESC sampler_desc = { filter, address_mode, address_mode, address_mode };
|
||||||
.Filter = filter,
|
D3D12_CPU_DESCRIPTOR_HANDLE handle = { heap->cpu.ptr + heap_index * heap->stride };
|
||||||
.AddressU = address_mode,
|
|
||||||
.AddressV = address_mode,
|
sampler_desc.ComparisonFunc = D3D12_COMPARISON_FUNC_NEVER;
|
||||||
.AddressW = address_mode,
|
sampler_desc.MaxLOD = D3D12_FLOAT32_MAX;
|
||||||
.MipLODBias = 0,
|
|
||||||
.MaxAnisotropy = 0,
|
|
||||||
.ComparisonFunc = D3D12_COMPARISON_FUNC_NEVER,
|
|
||||||
.BorderColor = { 0.0f },
|
|
||||||
.MinLOD = 0.0f,
|
|
||||||
.MaxLOD = D3D12_FLOAT32_MAX,
|
|
||||||
};
|
|
||||||
D3D12_CPU_DESCRIPTOR_HANDLE handle = { heap->cpu.ptr + heap_index * heap->stride };
|
|
||||||
D3D12CreateSampler(device, &sampler_desc, handle);
|
D3D12CreateSampler(device, &sampler_desc, handle);
|
||||||
dst->ptr = heap->gpu.ptr + heap_index * heap->stride;
|
dst->ptr = heap->gpu.ptr + heap_index * heap->stride;
|
||||||
}
|
}
|
||||||
@ -290,23 +283,20 @@ bool d3d12_init_descriptors(d3d12_video_t* d3d12)
|
|||||||
D3D12_ROOT_SIGNATURE_DESC desc;
|
D3D12_ROOT_SIGNATURE_DESC desc;
|
||||||
static const D3D12_DESCRIPTOR_RANGE srv_table[] = {
|
static const D3D12_DESCRIPTOR_RANGE srv_table[] = {
|
||||||
{
|
{
|
||||||
.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV,
|
D3D12_DESCRIPTOR_RANGE_TYPE_SRV,
|
||||||
.NumDescriptors = 1,
|
1,
|
||||||
.BaseShaderRegister = 0,
|
0,
|
||||||
.RegisterSpace = 0,
|
0,
|
||||||
#if 0
|
D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND,
|
||||||
.Flags = D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC, /* version 1_1 only */
|
|
||||||
#endif
|
|
||||||
.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
static const D3D12_DESCRIPTOR_RANGE sampler_table[] = {
|
static const D3D12_DESCRIPTOR_RANGE sampler_table[] = {
|
||||||
{
|
{
|
||||||
.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER,
|
D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER,
|
||||||
.NumDescriptors = 1,
|
1,
|
||||||
.BaseShaderRegister = 0,
|
0,
|
||||||
.RegisterSpace = 0,
|
0,
|
||||||
.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND,
|
D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -397,20 +387,6 @@ bool d3d12_init_pipeline(d3d12_video_t* d3d12)
|
|||||||
D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
|
D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const D3D12_RASTERIZER_DESC rasterizerDesc = {
|
|
||||||
.FillMode = D3D12_FILL_MODE_SOLID,
|
|
||||||
.CullMode = D3D12_CULL_MODE_BACK,
|
|
||||||
.FrontCounterClockwise = FALSE,
|
|
||||||
.DepthBias = D3D12_DEFAULT_DEPTH_BIAS,
|
|
||||||
.DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP,
|
|
||||||
.SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS,
|
|
||||||
.DepthClipEnable = TRUE,
|
|
||||||
.MultisampleEnable = FALSE,
|
|
||||||
.AntialiasedLineEnable = FALSE,
|
|
||||||
.ForcedSampleCount = 0,
|
|
||||||
.ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!d3d_compile(stock, sizeof(stock), NULL, "VSMain", "vs_5_0", &vs_code))
|
if (!d3d_compile(stock, sizeof(stock), NULL, "VSMain", "vs_5_0", &vs_code))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -1363,7 +1363,7 @@ typedef struct
|
|||||||
#endif
|
#endif
|
||||||
} d3d12_video_t;
|
} d3d12_video_t;
|
||||||
|
|
||||||
enum
|
typedef enum
|
||||||
{
|
{
|
||||||
ROOT_ID_TEXTURE_T = 0,
|
ROOT_ID_TEXTURE_T = 0,
|
||||||
ROOT_ID_SAMPLER_T,
|
ROOT_ID_SAMPLER_T,
|
||||||
|
@ -2872,7 +2872,7 @@ void d3dxbuffer_release(void *data)
|
|||||||
if (!p)
|
if (!p)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
p->Release();
|
p->Release();
|
||||||
#else
|
#else
|
||||||
p->lpVtbl->Release(p);
|
p->lpVtbl->Release(p);
|
||||||
@ -3053,7 +3053,7 @@ const void *d3dx_get_buffer_ptr(void *data)
|
|||||||
ID3DXBuffer *listing = (ID3DXBuffer*)data;
|
ID3DXBuffer *listing = (ID3DXBuffer*)data;
|
||||||
if (!listing)
|
if (!listing)
|
||||||
return NULL;
|
return NULL;
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
return listing->GetBufferPointer();
|
return listing->GetBufferPointer();
|
||||||
#else
|
#else
|
||||||
return listing->lpVtbl->GetBufferPointer(listing);
|
return listing->lpVtbl->GetBufferPointer(listing);
|
||||||
@ -3073,7 +3073,7 @@ const bool d3dx_constant_table_set_float(void *p,
|
|||||||
LPD3DXCONSTANTTABLE consttbl = (LPD3DXCONSTANTTABLE)p;
|
LPD3DXCONSTANTTABLE consttbl = (LPD3DXCONSTANTTABLE)p;
|
||||||
if (!consttbl || !dev || !handle)
|
if (!consttbl || !dev || !handle)
|
||||||
return false;
|
return false;
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
if (consttbl->SetFloat(dev, handle, val) == D3D_OK)
|
if (consttbl->SetFloat(dev, handle, val) == D3D_OK)
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
|
@ -561,8 +561,6 @@ static LRESULT CALLBACK WndProcCommon(bool *quit, HWND hwnd, UINT message,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern VOID (WINAPI *DragAcceptFiles_func)(HWND, BOOL);
|
|
||||||
|
|
||||||
static void win32_set_droppable(ui_window_win32_t *window, bool droppable)
|
static void win32_set_droppable(ui_window_win32_t *window, bool droppable)
|
||||||
{
|
{
|
||||||
if (DragAcceptFiles_func != NULL)
|
if (DragAcceptFiles_func != NULL)
|
||||||
|
@ -194,7 +194,7 @@ DECLARE_INTERFACE_(ID3DXFont, IUnknown)
|
|||||||
STDMETHOD(OnLostDevice)(THIS) PURE;
|
STDMETHOD(OnLostDevice)(THIS) PURE;
|
||||||
STDMETHOD(OnResetDevice)(THIS) PURE;
|
STDMETHOD(OnResetDevice)(THIS) PURE;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
HRESULT GetDesc(D3DXFONT_DESCW *pDesc) { return GetDescW(pDesc); }
|
HRESULT GetDesc(D3DXFONT_DESCW *pDesc) { return GetDescW(pDesc); }
|
||||||
HRESULT PreloadText(LPCWSTR pString, INT Count) { return PreloadTextW(pString, Count); }
|
HRESULT PreloadText(LPCWSTR pString, INT Count) { return PreloadTextW(pString, Count); }
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define CINTERFACE
|
||||||
#define HAVE_IBXM 1
|
#define HAVE_IBXM 1
|
||||||
|
|
||||||
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
|
#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
|
||||||
|
@ -398,9 +398,9 @@ struct http_t *net_http_new(struct http_connection_t *conn)
|
|||||||
|
|
||||||
post_len = strlen(conn->postdatacopy);
|
post_len = strlen(conn->postdatacopy);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
len = snprintf(NULL, 0, "%"PRIuPTR, post_len);
|
len = snprintf(NULL, 0, "%" PRIuPTR, post_len);
|
||||||
len_str = (char*)malloc(len + 1);
|
len_str = (char*)malloc(len + 1);
|
||||||
snprintf(len_str, len + 1, "%"PRIuPTR, post_len);
|
snprintf(len_str, len + 1, "%" PRIuPTR, post_len);
|
||||||
#else
|
#else
|
||||||
len = snprintf(NULL, 0, "%llu", (long long unsigned)post_len);
|
len = snprintf(NULL, 0, "%llu", (long long unsigned)post_len);
|
||||||
len_str = (char*)malloc(len + 1);
|
len_str = (char*)malloc(len + 1);
|
||||||
|
@ -152,7 +152,7 @@ netplay_input_state_t netplay_input_state_for(netplay_input_state_t *list,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Couldn't find a slot, allocate a fresh one */
|
/* Couldn't find a slot, allocate a fresh one */
|
||||||
ret = calloc(1, sizeof(struct netplay_input_state) + (size-1) * sizeof(uint32_t));
|
ret = (netplay_input_state_t)calloc(1, sizeof(struct netplay_input_state) + (size-1) * sizeof(uint32_t));
|
||||||
if (!ret)
|
if (!ret)
|
||||||
return NULL;
|
return NULL;
|
||||||
*list = ret;
|
*list = ret;
|
||||||
|
@ -42,6 +42,8 @@ typedef struct ui_window_win32
|
|||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
} ui_window_win32_t;
|
} ui_window_win32_t;
|
||||||
|
|
||||||
|
extern VOID (WINAPI *DragAcceptFiles_func)(HWND, BOOL);
|
||||||
|
|
||||||
RETRO_END_DECLS
|
RETRO_END_DECLS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -75,11 +75,6 @@ static void ui_window_win32_set_title(void *data, char *buf)
|
|||||||
SetWindowText(window->hwnd, buf);
|
SetWindowText(window->hwnd, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
VOID (WINAPI *DragAcceptFiles_func)(HWND, BOOL);
|
|
||||||
|
|
||||||
void ui_window_win32_set_droppable(void *data, bool droppable)
|
void ui_window_win32_set_droppable(void *data, bool droppable)
|
||||||
{
|
{
|
||||||
/* Minimum supported client: Windows XP, minimum supported server: Windows 2000 Server */
|
/* Minimum supported client: Windows XP, minimum supported server: Windows 2000 Server */
|
||||||
|
Loading…
Reference in New Issue
Block a user