mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
MINGW64: Compilation fix
This commit is contained in:
parent
60dc4abc2b
commit
5f6caf33f0
9
.gitignore
vendored
9
.gitignore
vendored
@ -76,5 +76,12 @@ rpcs3-tests/x64/*
|
||||
.DS_Store
|
||||
rpcs3/Emu/SysCalls/Modules/prx_*.h
|
||||
|
||||
/CMakeFiles/
|
||||
# cmake
|
||||
Makefile
|
||||
*CMakeFiles*
|
||||
CMakeCache.txt
|
||||
*cmake_install.cmake*
|
||||
|
||||
# cotire
|
||||
rpcs3/cotire/*
|
||||
rpcs3/rpcs3_*_cotire.cmake
|
||||
|
1
.gitmodules
vendored
1
.gitmodules
vendored
@ -8,6 +8,7 @@
|
||||
[submodule "asmjit"]
|
||||
path = asmjit
|
||||
url = https://github.com/kobalicek/asmjit
|
||||
ignore = dirty
|
||||
[submodule "llvm"]
|
||||
path = llvm
|
||||
url = https://github.com/llvm-mirror/llvm
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "File.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define _WIN32_WINNT 0x0601
|
||||
#include <Windows.h>
|
||||
|
||||
#define GET_API_ERROR static_cast<u64>(GetLastError())
|
||||
|
@ -49,11 +49,3 @@ int clock_gettime(clockid_t clk_id, struct timespec *tp)
|
||||
return retval;
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
#if defined(__GNUG__)
|
||||
|
||||
void * _aligned_malloc(size_t size, size_t alignment) {
|
||||
void *buffer;
|
||||
return (posix_memalign(&buffer, alignment, size) == 0) ? buffer : 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -41,23 +41,18 @@
|
||||
|
||||
#define _fpclass(x) std::fpclassify(x)
|
||||
#define _byteswap_ushort(x) __builtin_bswap16(x)
|
||||
#define _byteswap_ulong(x) __builtin_bswap32(x)
|
||||
#define _byteswap_uint64(x) __builtin_bswap64(x)
|
||||
#define INFINITE 0xFFFFFFFF
|
||||
|
||||
inline std::uint64_t __umulh(std::uint64_t a, std::uint64_t b)
|
||||
#if !defined(__MINGW32__)
|
||||
#define _byteswap_ulong(x) __builtin_bswap32(x)
|
||||
#else
|
||||
inline std::uint32_t _byteswap_ulong(std::uint32_t value)
|
||||
{
|
||||
std::uint64_t result;
|
||||
__asm__("mulq %[b]" : "=d" (result) : [a] "a" (a), [b] "rm" (b));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline std::int64_t __mulh(std::int64_t a, std::int64_t b)
|
||||
{
|
||||
std::int64_t result;
|
||||
__asm__("imulq %[b]" : "=d" (result) : [a] "a" (a), [b] "rm" (b));
|
||||
return result;
|
||||
__asm__("bswap %0" : "+r"(value));
|
||||
return value;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
||||
|
@ -30,8 +30,11 @@ if(NOT MSVC)
|
||||
if($ENV{CI})
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O1") # fix for travis gcc OoM crash. Might be fixed with the move to containers.
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fexceptions")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fexceptions -w")
|
||||
add_compile_options(-msse -msse2 -mcx16 -mssse3)
|
||||
if(WIN32)
|
||||
add_compile_options(-municode -static -mwindows)
|
||||
endif()
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa /Zc:throwingNew /D _CRT_SECURE_NO_DEPRECATE=1 /D _CRT_NON_CONFORMING_SWPRINTFS=1 /D _SCL_SECURE_NO_WARNINGS=1")
|
||||
endif()
|
||||
@ -44,7 +47,7 @@ endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
#on some Linux distros shm_unlink and similar functions are in librt only
|
||||
set(ADDITIONAL_LIBS "rt" "X11")
|
||||
elseif(UNIX)
|
||||
elseif(UNIX OR NOT MSVC)
|
||||
#it seems like glibc includes the iconv functions we use but other libc
|
||||
#implementations like the one on OSX don't seem implement them
|
||||
set(ADDITIONAL_LIBS "iconv")
|
||||
@ -67,7 +70,7 @@ if(NOT WIN32)
|
||||
endif()
|
||||
|
||||
find_package(wxWidgets COMPONENTS core base net aui gl xml REQUIRED)
|
||||
if(NOT WIN32)
|
||||
if(NOT MSVC)
|
||||
if(APPLE)
|
||||
find_path(GLEW_INCLUDE_DIR GL/glew.h
|
||||
/usr/include/GL
|
||||
@ -130,7 +133,11 @@ if(LLVM_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
link_directories("${RPCS3_SRC_DIR}/../ffmpeg/${PLATFORM_ARCH}/lib" "${RPCS3_SRC_DIR}/../asmjit/" "${RPCS3_SRC_DIR}/../minidx12/")
|
||||
link_directories("${RPCS3_SRC_DIR}/../asmjit/" "${RPCS3_SRC_DIR}/../minidx12/")
|
||||
|
||||
if(MSVC OR NOT WIN32)
|
||||
link_directories("${RPCS3_SRC_DIR}/../ffmpeg/${PLATFORM_ARCH}/lib")
|
||||
endif()
|
||||
|
||||
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
|
||||
foreach(dir ${dirs})
|
||||
@ -152,18 +159,23 @@ RPCS3_SRC
|
||||
|
||||
add_executable(rpcs3 ${RPCS3_SRC})
|
||||
|
||||
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_CURRENT_BINARY_DIR}/../asmjit/") #hack because the asmjit cmake file force fno exceptions upd: not sure if vs2015 build is affected
|
||||
else()
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
|
||||
endif()
|
||||
if(WIN32) # I'm not sure we need all of these libs, but we link them in vs
|
||||
target_link_libraries(rpcs3 odbc32.lib odbccp32.lib comctl32.lib ws2_32.lib shlwapi.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib dxgi.lib d2d1.lib dwrite.lib d3dcompiler.lib)
|
||||
target_link_libraries(rpcs3 odbc32.lib odbccp32.lib comctl32.lib ws2_32.lib shlwapi.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib Iphlpapi.lib)
|
||||
if(LLVM_FOUND)
|
||||
target_link_libraries(rpcs3 asmjit.lib ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib ${LLVM_LIBS} ${ADDITIONAL_LIBS})
|
||||
else()
|
||||
target_link_libraries(rpcs3 asmjit.lib ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib ${ADDITIONAL_LIBS})
|
||||
target_link_libraries(rpcs3 ${LLVM_LIBS})
|
||||
endif()
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(rpcs3 ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} opengl32.lib glu32.lib)
|
||||
else()
|
||||
target_link_libraries(rpcs3 dxgi.lib d2d1.lib dwrite.lib d3dcompiler.lib)
|
||||
endif()
|
||||
target_link_libraries(rpcs3 asmjit.lib avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${ADDITIONAL_LIBS})
|
||||
else()
|
||||
if(LLVM_FOUND)
|
||||
target_link_libraries(rpcs3 asmjit.a ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
|
||||
|
@ -25,7 +25,7 @@ void AudioManager::Init()
|
||||
default:
|
||||
case audio_output_type::Null: m_audio_out = new NullAudioThread(); break;
|
||||
case audio_output_type::OpenAL: m_audio_out = new OpenALThread(); break;
|
||||
#if defined (_WIN32)
|
||||
#ifdef _MSC_VER
|
||||
case audio_output_type::XAudio2: m_audio_out = new XAudio2Thread(); break;
|
||||
#endif
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "stdafx.h"
|
||||
#ifdef _MSC_VER
|
||||
#include "Utilities/Log.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/state.h"
|
||||
|
||||
#if defined (_WIN32)
|
||||
#include "XAudio2Thread.h"
|
||||
|
||||
XAudio2Thread::~XAudio2Thread()
|
||||
|
@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#include "Emu/Audio/AudioThread.h"
|
||||
#if defined (_WIN32)
|
||||
|
||||
#define _WIN32_WINNT 0x0601 // This is to be sure that correct (2.7) header is included
|
||||
#include "minidx9/Include/XAudio2.h" // XAudio2 2.8 available only on Win8+, used XAudio2 2.7 from dxsdk
|
||||
#undef _WIN32_WINNT
|
||||
|
@ -1747,7 +1747,7 @@ void ppu_interpreter::SUBFC(PPUThread& CPU, ppu_opcode_t op)
|
||||
|
||||
void ppu_interpreter::MULHDU(PPUThread& CPU, ppu_opcode_t op)
|
||||
{
|
||||
CPU.GPR[op.rd] = __umulh(CPU.GPR[op.ra], CPU.GPR[op.rb]);
|
||||
CPU.GPR[op.rd] = UMULH64(CPU.GPR[op.ra], CPU.GPR[op.rb]);
|
||||
if (op.rc) CPU.UpdateCR0<s64>(CPU.GPR[op.rd]);
|
||||
}
|
||||
|
||||
@ -1933,7 +1933,7 @@ void ppu_interpreter::LVEWX(PPUThread& CPU, ppu_opcode_t op)
|
||||
|
||||
void ppu_interpreter::MULHD(PPUThread& CPU, ppu_opcode_t op)
|
||||
{
|
||||
CPU.GPR[op.rd] = __mulh(CPU.GPR[op.ra], CPU.GPR[op.rb]);
|
||||
CPU.GPR[op.rd] = MULH64(CPU.GPR[op.ra], CPU.GPR[op.rb]);
|
||||
if (op.rc) CPU.UpdateCR0<s64>(CPU.GPR[op.rd]);
|
||||
}
|
||||
|
||||
@ -2162,7 +2162,7 @@ void ppu_interpreter::MULLD(PPUThread& CPU, ppu_opcode_t op)
|
||||
CPU.GPR[op.rd] = (s64)(RA * RB);
|
||||
if (op.oe)
|
||||
{
|
||||
const s64 high = __mulh(RA, RB);
|
||||
const s64 high = MULH64(RA, RB);
|
||||
CPU.SetOV(high != s64(CPU.GPR[op.rd]) >> 63);
|
||||
}
|
||||
if (op.rc) CPU.UpdateCR0<s64>(CPU.GPR[op.rd]);
|
||||
|
@ -3,14 +3,32 @@
|
||||
#include "Emu/Cell/PPUOpcodes.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#else
|
||||
#include <x86intrin.h>
|
||||
#define _rotl64(x,r) (((u64)(x) << (r)) | ((u64)(x) >> (64 - (r))))
|
||||
#endif
|
||||
|
||||
#if defined(__GNUG__)
|
||||
inline std::uint64_t UMULH64(std::uint64_t a, std::uint64_t b)
|
||||
{
|
||||
std::uint64_t result;
|
||||
__asm__("mulq %[b]" : "=d" (result) : [a] "a" (a), [b] "rm" (b));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline std::int64_t MULH64(std::int64_t a, std::int64_t b)
|
||||
{
|
||||
std::int64_t result;
|
||||
__asm__("imulq %[b]" : "=d" (result) : [a] "a" (a), [b] "rm" (b));
|
||||
return result;
|
||||
}
|
||||
#else
|
||||
#define UMULH64 __umulh
|
||||
#define MULH64 __mulh
|
||||
#endif
|
||||
|
||||
#include <fenv.h>
|
||||
|
||||
extern u64 rotate_mask[64][64]; // defined in PPUThread.cpp
|
||||
@ -2453,7 +2471,7 @@ private:
|
||||
}
|
||||
void MULHDU(u32 rd, u32 ra, u32 rb, u32 rc)
|
||||
{
|
||||
CPU.GPR[rd] = __umulh(CPU.GPR[ra], CPU.GPR[rb]);
|
||||
CPU.GPR[rd] = UMULH64(CPU.GPR[ra], CPU.GPR[rb]);
|
||||
if(rc) CPU.UpdateCR0<s64>(CPU.GPR[rd]);
|
||||
}
|
||||
void ADDC(u32 rd, u32 ra, u32 rb, u32 oe, u32 rc)
|
||||
@ -2619,7 +2637,7 @@ private:
|
||||
}
|
||||
void MULHD(u32 rd, u32 ra, u32 rb, u32 rc)
|
||||
{
|
||||
CPU.GPR[rd] = __mulh(CPU.GPR[ra], CPU.GPR[rb]);
|
||||
CPU.GPR[rd] = MULH64(CPU.GPR[ra], CPU.GPR[rb]);
|
||||
if(rc) CPU.UpdateCR0<s64>(CPU.GPR[rd]);
|
||||
}
|
||||
void MULHW(u32 rd, u32 ra, u32 rb, u32 rc)
|
||||
@ -2823,7 +2841,7 @@ private:
|
||||
CPU.GPR[rd] = (s64)(RA * RB);
|
||||
if(oe)
|
||||
{
|
||||
const s64 high = __mulh(RA, RB);
|
||||
const s64 high = MULH64(RA, RB);
|
||||
CPU.SetOV(high != s64(CPU.GPR[rd]) >> 63);
|
||||
}
|
||||
if(rc) CPU.UpdateCR0<s64>(CPU.GPR[rd]);
|
||||
|
@ -1310,12 +1310,12 @@ static const double DOUBLE_NAN = (double&)DOUBLE_NAN_I;
|
||||
|
||||
inline bool issnan(double x)
|
||||
{
|
||||
return isnan(x) && ((s64&)x) << 12 > 0;
|
||||
return std::isnan(x) && ((s64&)x) << 12 > 0;
|
||||
}
|
||||
|
||||
inline bool issnan(float x)
|
||||
{
|
||||
return isnan(x) && ((s32&)x) << 9 > 0;
|
||||
return std::isnan(x) && ((s32&)x) << 9 > 0;
|
||||
}
|
||||
|
||||
inline int fexpf(float x)
|
||||
@ -1631,7 +1631,7 @@ static void DFASM(SPUThread& spu, spu_opcode_t op, DoubleOp operation)
|
||||
b = copysign(0.0, b);
|
||||
}
|
||||
double result;
|
||||
if (isnan(a) || isnan(b))
|
||||
if (std::isnan(a) || std::isnan(b))
|
||||
{
|
||||
spu.fpscr.setDoublePrecisionExceptionFlags(i, FPSCR_DNAN);
|
||||
if (issnan(a) || issnan(b))
|
||||
@ -1696,10 +1696,10 @@ static void DFMA(SPUThread& spu, spu_opcode_t op, bool neg, bool sub)
|
||||
c = copysign(0.0, c);
|
||||
}
|
||||
double result;
|
||||
if (isnan(a) || isnan(b) || isnan(c))
|
||||
if (std::isnan(a) || std::isnan(b) || std::isnan(c))
|
||||
{
|
||||
spu.fpscr.setDoublePrecisionExceptionFlags(i, FPSCR_DNAN);
|
||||
if (issnan(a) || issnan(b) || issnan(c) || (isinf(a) && b == 0.0f) || (a == 0.0f && isinf(b)))
|
||||
if (issnan(a) || issnan(b) || issnan(c) || (std::isinf(a) && b == 0.0f) || (a == 0.0f && std::isinf(b)))
|
||||
spu.fpscr.setDoublePrecisionExceptionFlags(i, FPSCR_DINV);
|
||||
result = DOUBLE_NAN;
|
||||
}
|
||||
@ -1746,7 +1746,7 @@ void spu_interpreter::precise::FESD(SPUThread& spu, spu_opcode_t op)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
const float a = spu.gpr[op.ra]._f[i * 2 + 1];
|
||||
if (isnan(a))
|
||||
if (std::isnan(a))
|
||||
{
|
||||
spu.fpscr.setDoublePrecisionExceptionFlags(i, FPSCR_DNAN);
|
||||
if (issnan(a))
|
||||
@ -1771,7 +1771,7 @@ void spu_interpreter::precise::FRDS(SPUThread& spu, spu_opcode_t op)
|
||||
{
|
||||
SetHostRoundingMode(spu.fpscr.checkSliceRounding(i));
|
||||
const double a = spu.gpr[op.ra]._d[i];
|
||||
if (isnan(a))
|
||||
if (std::isnan(a))
|
||||
{
|
||||
spu.fpscr.setDoublePrecisionExceptionFlags(i, FPSCR_DNAN);
|
||||
if (issnan(a))
|
||||
|
@ -236,6 +236,8 @@ void VFS::DeleteAll(const std::string& ps3_path) const
|
||||
DeleteAll(ps3_path + "/" + entry->name);
|
||||
}
|
||||
}
|
||||
|
||||
RemoveDir(ps3_path);
|
||||
}
|
||||
|
||||
u64 VFS::GetDirSize(const std::string& ps3_path) const
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_gui.h"
|
||||
#if defined (_WIN32)
|
||||
#ifdef _MSC_VER
|
||||
#include "Utilities/Log.h"
|
||||
#include "XInputPadHandler.h"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "Utilities/Log.h"
|
||||
|
||||
#include "D3D12GSRender.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12CommonDecompiler.h"
|
||||
|
||||
std::string getFloatTypeNameImp(size_t elementCount)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12Formats.h"
|
||||
#include "D3D12Utils.h"
|
||||
#include "Emu/RSX/GCM.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12FragmentProgramDecompiler.h"
|
||||
#include "D3D12CommonDecompiler.h"
|
||||
#include "Utilities/Log.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12GSRender.h"
|
||||
#include <wrl/client.h>
|
||||
#include <dxgi1_4.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12MemoryHelpers.h"
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12GSRender.h"
|
||||
#include <d2d1_3.h>
|
||||
#include <dwrite_3.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12PipelineState.h"
|
||||
#include "D3D12GSRender.h"
|
||||
#include "Emu/state.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12RenderTargetSets.h"
|
||||
#include "Utilities/rPlatform.h" // only for rImage
|
||||
#include "Utilities/File.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12GSRender.h"
|
||||
#include "d3dx12.h"
|
||||
#include "../Common/TextureUtils.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Contains utility shaders
|
||||
*/
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12GSRender.h"
|
||||
#include "d3dx12.h"
|
||||
#include "Utilities/Log.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "D3D12VertexProgramDecompiler.h"
|
||||
#include "D3D12CommonDecompiler.h"
|
||||
#include "Utilities/Log.h"
|
||||
|
@ -172,7 +172,7 @@ OPENGL_PROC(PFNGLDEBUGMESSAGEINSERTARBPROC, DebugMessageInsertARB);
|
||||
OPENGL_PROC(PFNGLDEBUGMESSAGECALLBACKARBPROC, DebugMessageCallbackARB);
|
||||
//...
|
||||
|
||||
#ifndef __GNUG__
|
||||
#if !defined(__GNUG__) || defined(__MINGW32__)
|
||||
OPENGL_PROC(PFNGLBLENDCOLORPROC, BlendColor);
|
||||
OPENGL_PROC(PFNGLBLENDEQUATIONPROC, BlendEquation);
|
||||
OPENGL_PROC(PFNGLCOMPRESSEDTEXIMAGE2DPROC, CompressedTexImage2D);
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "GSManager.h"
|
||||
#include "Null/NullGSRender.h"
|
||||
#include "GL/GLGSRender.h"
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "Emu/RSX/D3D12/D3D12GSRender.h"
|
||||
#endif
|
||||
|
||||
@ -37,7 +37,7 @@ void GSManager::Init()
|
||||
default:
|
||||
case rsx_renderer_type::Null : m_render = new NullGSRender(); break;
|
||||
case rsx_renderer_type::OpenGL: m_render = new GLGSRender(); break;
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
case rsx_renderer_type::DX12: m_render = new D3D12GSRender(); break;
|
||||
#endif
|
||||
}
|
||||
|
@ -2,9 +2,11 @@
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#endif
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
|
||||
|
@ -125,7 +125,7 @@ CompilerELF::CompilerELF(wxWindow* parent)
|
||||
" b exit, 0, 0\n"
|
||||
);
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
::SendMessage((HWND)hex_list->GetHWND(), WM_VSCROLL, SB_BOTTOM, 0);
|
||||
::SendMessage((HWND)asm_list->GetHWND(), WM_VSCROLL, SB_BOTTOM, 0);
|
||||
#endif
|
||||
@ -318,7 +318,7 @@ void CompilerELF::OnScroll(wxScrollWinEvent& event)
|
||||
dst = hex_list;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
if(!m_disable_scroll && src && dst && event.GetOrientation() == wxVERTICAL)
|
||||
{
|
||||
s64 kind = -1;
|
||||
|
@ -38,32 +38,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class WxDirDeleteTraverser : public wxDirTraverser
|
||||
{
|
||||
public:
|
||||
virtual wxDirTraverseResult OnFile(const wxString& filename) override
|
||||
{
|
||||
if (!wxRemoveFile(filename))
|
||||
{
|
||||
LOG_ERROR(HLE, "Couldn't delete File: %s", fmt::ToUTF8(filename).c_str());
|
||||
}
|
||||
return wxDIR_CONTINUE;
|
||||
}
|
||||
virtual wxDirTraverseResult OnDir(const wxString& dirname) override
|
||||
{
|
||||
wxDir dir(dirname);
|
||||
dir.Traverse(*this);
|
||||
if (!wxRmDir(dirname))
|
||||
{
|
||||
//this get triggered a few times while clearing folders
|
||||
//but if this gets reimplented we should probably warn
|
||||
//if directories can't be removed
|
||||
}
|
||||
return wxDIR_CONTINUE;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// GameViewer functions
|
||||
GameViewer::GameViewer(wxWindow* parent) : wxListView(parent)
|
||||
{
|
||||
@ -295,19 +269,8 @@ void GameViewer::ConfigureGame(wxCommandEvent& WXUNUSED(event))
|
||||
void GameViewer::RemoveGame(wxCommandEvent& event)
|
||||
{
|
||||
Emu.GetVFS().Init("/");
|
||||
|
||||
// get local path from VFS
|
||||
std::string local_path;
|
||||
Emu.GetVFS().GetDevice(m_path, local_path);
|
||||
std::string del_path = local_path + "/" + this->GetItemText(event.GetId(), 6).ToStdString();
|
||||
|
||||
Emu.GetVFS().DeleteAll(m_path + "/" + this->GetItemText(event.GetId(), 6).ToStdString());
|
||||
Emu.GetVFS().UnMountAll();
|
||||
|
||||
// TODO: Replace wxWidgetsSpecific filesystem stuff?
|
||||
WxDirDeleteTraverser deleter;
|
||||
wxDir localDir(del_path);
|
||||
localDir.Traverse(deleter);
|
||||
wxRmdir(del_path); // delete empty directory
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
@ -13,9 +13,11 @@
|
||||
#pragma comment(lib, "iphlpapi.lib")
|
||||
|
||||
#undef GetHwnd
|
||||
#ifdef _MSC_VER
|
||||
#include <d3d12.h>
|
||||
#include <wrl/client.h>
|
||||
#include <dxgi1_4.h>
|
||||
#endif
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
@ -231,7 +233,7 @@ SettingsDialog::SettingsDialog(wxWindow *parent, rpcs3::config_t* cfg)
|
||||
cbox_gs_render->Append("Null");
|
||||
cbox_gs_render->Append("OpenGL");
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
Microsoft::WRL::ComPtr<IDXGIFactory4> dxgiFactory;
|
||||
Microsoft::WRL::ComPtr<IDXGIAdapter> adapter;
|
||||
|
||||
@ -266,7 +268,7 @@ SettingsDialog::SettingsDialog(wxWindow *parent, rpcs3::config_t* cfg)
|
||||
|
||||
cbox_pad_handler->Append("Null");
|
||||
cbox_pad_handler->Append("Windows");
|
||||
#if defined (_WIN32)
|
||||
#ifdef _MSC_VER
|
||||
cbox_pad_handler->Append("XInput");
|
||||
#endif
|
||||
|
||||
@ -282,7 +284,7 @@ SettingsDialog::SettingsDialog(wxWindow *parent, rpcs3::config_t* cfg)
|
||||
|
||||
cbox_audio_out->Append("Null");
|
||||
cbox_audio_out->Append("OpenAL");
|
||||
#if defined (_WIN32)
|
||||
#ifdef _MSC_VER
|
||||
cbox_audio_out->Append("XAudio2");
|
||||
#endif
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "Emu/Io/Pad.h"
|
||||
#include "Emu/Io/Null/NullPadHandler.h"
|
||||
#include "Emu/Io/Windows/WindowsPadHandler.h"
|
||||
#if defined(_WIN32)
|
||||
#ifdef _MSC_VER
|
||||
#include "Emu/Io/XInput/XInputPadHandler.h"
|
||||
#endif
|
||||
|
||||
@ -107,7 +107,7 @@ bool Rpcs3App::OnInit()
|
||||
{
|
||||
case io_handler_mode::null: return std::make_unique<NullPadHandler>();
|
||||
case io_handler_mode::windows: return std::make_unique<WindowsPadHandler>();
|
||||
#if defined(_WIN32)
|
||||
#ifdef _MSC_VER
|
||||
case io_handler_mode::xinput: return std::make_unique<XInputPadHandler>();
|
||||
#endif
|
||||
default: throw EXCEPTION("Invalid Pad Handler Mode %d", +(u32)mode);
|
||||
|
@ -1,6 +1,8 @@
|
||||
#include "stdafx_d3d12.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "d2d1")
|
||||
#pragma comment(lib, "DXGI")
|
||||
#pragma comment(lib, "Dwrite")
|
||||
#pragma comment(lib, "d3dcompiler.lib")
|
||||
#endif
|
||||
|
@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#include "stdafx.h"
|
||||
#ifdef _WIN32
|
||||
|
||||
// Must be included first
|
||||
#include <d3dcompiler.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user