mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
fix mingw and msvc cmake builds.
This commit is contained in:
+57
-27
@@ -50,6 +50,11 @@ include(ccache)
|
||||
# Remove soon?
|
||||
set(USE_FFMPEG ON)
|
||||
|
||||
# the libraries in the ffmpeg/ directory are not compatible with mingw
|
||||
if(MINGW AND NOT DEFINED USE_SYSTEM_FFMPEG)
|
||||
set(USE_SYSTEM_FFMPEG ON)
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID AND NOT IOS)
|
||||
if(ARM OR SIMULATOR)
|
||||
set(USING_EGL ON)
|
||||
@@ -243,7 +248,7 @@ if(NOT MSVC)
|
||||
add_definitions(-Wno-deprecated-register)
|
||||
|
||||
# Don't compile with strict aliasing, we're not 100% aliasing-safe
|
||||
add_definitions(-fno-strict-aliasing)
|
||||
add_compile_options(-fno-strict-aliasing)
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "Intel")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -parallel -fopenmp")
|
||||
endif()
|
||||
@@ -270,16 +275,23 @@ if(NOT MSVC)
|
||||
elseif(ANDROID)
|
||||
add_definitions(-fsigned-char)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(-Wno-write-strings)
|
||||
endif()
|
||||
else()
|
||||
# Disable warnings about MS-specific _s variants of libc functions
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions(-D_UNICODE -DUNICODE)
|
||||
add_definitions(-DUSING_WIN_UI)
|
||||
add_definitions(-MP)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_NDEBUG")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(-D_UNICODE -DUNICODE)
|
||||
add_definitions(-DUSING_WIN_UI)
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
@@ -419,7 +431,16 @@ target_link_libraries(Common Ext::Snappy)
|
||||
|
||||
if(WIN32)
|
||||
include_directories(dx9sdk/Include)
|
||||
target_link_libraries(Common winmm d3d9 dxguid dsound)
|
||||
include_directories(dx9sdk/Include/DX11)
|
||||
if(MINGW)
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <INCLUDES> <SOURCE> <OBJECT>")
|
||||
# required when using the dx9sdk include paths
|
||||
add_definitions(-include ${CMAKE_CURRENT_SOURCE_DIR}/Windows/mingw_defines.h)
|
||||
add_definitions(-D_WIN32_WINNT=0x0601)
|
||||
else()
|
||||
target_link_libraries(Common dxguid)
|
||||
endif()
|
||||
target_link_libraries(Common winmm d3d9 dsound)
|
||||
endif()
|
||||
|
||||
if(TARGET SDL2::SDL2)
|
||||
@@ -772,24 +793,6 @@ elseif(USING_QT_UI)
|
||||
set(nativeExtraLibs ${nativeExtraLibs} Qt5::Multimedia)
|
||||
endif()
|
||||
|
||||
elseif(TARGET SDL2::SDL2)
|
||||
set(TargetBin PPSSPPSDL)
|
||||
# Require SDL
|
||||
add_definitions(-DSDL)
|
||||
set(nativeExtra ${nativeExtra}
|
||||
SDL/SDLJoystick.h
|
||||
SDL/SDLJoystick.cpp
|
||||
SDL/SDLMain.cpp
|
||||
SDL/SDLGLGraphicsContext.cpp
|
||||
SDL/SDLVulkanGraphicsContext.cpp)
|
||||
set(nativeExtraLibs ${nativeExtraLibs} SDL2::SDL2)
|
||||
if(APPLE)
|
||||
set(nativeExtra ${nativeExtra} SDL/SDLMain.h SDL/SDLMain.mm)
|
||||
set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY})
|
||||
elseif(USING_EGL)
|
||||
set(nativeExtraLibs ${nativeExtraLibs} pthread)
|
||||
endif()
|
||||
set(TargetBin PPSSPPSDL)
|
||||
elseif(WIN32)
|
||||
# Don't care about SDL.
|
||||
set(TargetBin PPSSPPWindows)
|
||||
@@ -798,6 +801,25 @@ elseif(WIN32)
|
||||
else()
|
||||
link_directories(dx9sdk/Lib/x86)
|
||||
endif()
|
||||
set(nativeExtra ${nativeExtra} ext/native/base/logging.cpp)
|
||||
elseif(TARGET SDL2::SDL2)
|
||||
set(TargetBin PPSSPPSDL)
|
||||
# Require SDL
|
||||
add_definitions(-DSDL)
|
||||
set(nativeExtra ${nativeExtra}
|
||||
SDL/SDLJoystick.h
|
||||
SDL/SDLJoystick.cpp
|
||||
SDL/SDLMain.cpp
|
||||
SDL/SDLGLGraphicsContext.cpp
|
||||
SDL/SDLVulkanGraphicsContext.cpp)
|
||||
set(nativeExtraLibs ${nativeExtraLibs} SDL2::SDL2)
|
||||
if(APPLE)
|
||||
set(nativeExtra ${nativeExtra} SDL/SDLMain.h SDL/SDLMain.mm)
|
||||
set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY})
|
||||
elseif(USING_EGL)
|
||||
set(nativeExtraLibs ${nativeExtraLibs} pthread)
|
||||
endif()
|
||||
set(TargetBin PPSSPPSDL)
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find SDL2. Failing.")
|
||||
endif()
|
||||
@@ -1031,7 +1053,7 @@ if(ANDROID)
|
||||
SET(ATOMIC_LIB atomic)
|
||||
endif()
|
||||
|
||||
target_link_libraries(native ${LIBZIP_LIBRARY} ${ZLIB_LIBRARY} ${PNG_LIBRARY} rg_etc1 vjson udis86 ${RT_LIB} ${nativeExtraLibs} ${ATOMIC_LIB})
|
||||
target_link_libraries(native ${LIBZIP_LIBRARY} ${PNG_LIBRARY} ${ZLIB_LIBRARY} rg_etc1 vjson udis86 ${RT_LIB} ${nativeExtraLibs} ${ATOMIC_LIB})
|
||||
if(TARGET Ext::GLEW)
|
||||
target_link_libraries(native Ext::GLEW)
|
||||
endif()
|
||||
@@ -1080,7 +1102,7 @@ include_directories(ext/xxhash)
|
||||
set(CoreExtra)
|
||||
set(CoreExtraLibs)
|
||||
|
||||
if(WINDOWS OR ANDROID)
|
||||
if(WIN32 OR ANDROID)
|
||||
set(CoreExtraLibs ${CoreExtraLibs} armips)
|
||||
endif()
|
||||
|
||||
@@ -1689,6 +1711,10 @@ set(CoreExtraLibs ${CoreExtraLibs} armips)
|
||||
|
||||
set(GlslangLibs glslang OGLCompiler OSDependent SPIRV SPVRemapper spirv-cross-glsl)
|
||||
|
||||
if(WIN32)
|
||||
set(GlslangLibs ${GlslangLibs} spirv-cross-hlsl)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${CoreLibName} Common native kirk cityhash sfmt19937 xbrz xxhash ${GlslangLibs}
|
||||
${CoreExtraLibs} ${OPENGL_LIBRARIES} ${X11_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
|
||||
@@ -1700,6 +1726,7 @@ if(FFmpeg_FOUND)
|
||||
FFmpeg::avutil
|
||||
FFmpeg::swresample
|
||||
FFmpeg::swscale
|
||||
${ZLIB_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1765,7 +1792,6 @@ set(WindowsFiles
|
||||
Windows/EmuThread.cpp
|
||||
Windows/EmuThread.h
|
||||
Windows/GeDebugger/GeDebugger.cpp
|
||||
Windows/Globals.cpp
|
||||
Windows/GPU/D3D9Context.cpp
|
||||
Windows/GPU/D3D9Context.h
|
||||
Windows/GPU/D3D11Context.cpp
|
||||
@@ -1813,7 +1839,7 @@ set(WindowsFiles
|
||||
list(APPEND LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND LinkCommon kernel32 user32 gdi32 shell32 comctl32 dsound xinput)
|
||||
list(APPEND LinkCommon kernel32 user32 gdi32 shell32 comctl32 dsound xinput d3d9 winmm dinput8 ole32 winspool ksuser)
|
||||
#setup_target_project(${TargetBin} Windows)
|
||||
list(APPEND NativeAppSource ${WindowsFiles})
|
||||
endif()
|
||||
@@ -1892,7 +1918,11 @@ if (TargetBin)
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
add_executable(${TargetBin} WIN32 ${NativeAppSource})
|
||||
set_target_properties(${TargetBin} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
|
||||
if(MSVC)
|
||||
set_target_properties(${TargetBin} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
|
||||
else()
|
||||
set_target_properties(${TargetBin} PROPERTIES LINK_FLAGS "-Wl,-subsystem,windows")
|
||||
endif()
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${TargetBin})
|
||||
else()
|
||||
add_executable(${TargetBin} ${NativeAppSource})
|
||||
|
||||
@@ -61,8 +61,10 @@ inline u64 __rotr64(u64 x, unsigned int shift){
|
||||
#else // WIN32
|
||||
|
||||
// Function Cross-Compatibility
|
||||
#ifndef __MINGW32__
|
||||
#define strcasecmp _stricmp
|
||||
#define strncasecmp _strnicmp
|
||||
#endif
|
||||
#define unlink _unlink
|
||||
#define __rotl _rotl
|
||||
#define __rotl64 _rotl64
|
||||
|
||||
+2
-2
@@ -43,13 +43,13 @@ const char *GetLastErrorMsg()
|
||||
const char *GetStringErrorMsg(int errCode) {
|
||||
static const size_t buff_size = 1023;
|
||||
#ifdef _WIN32
|
||||
static __declspec(thread) wchar_t err_strw[buff_size] = {};
|
||||
static __THREAD wchar_t err_strw[buff_size] = {};
|
||||
|
||||
FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errCode,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
err_strw, buff_size, NULL);
|
||||
|
||||
static __declspec(thread) char err_str[buff_size] = {};
|
||||
static __THREAD char err_str[buff_size] = {};
|
||||
snprintf(err_str, buff_size, "%s", ConvertWStringToUTF8(err_strw).c_str());
|
||||
#else
|
||||
static __thread char err_str[buff_size] = {};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <cstdint>
|
||||
#include "OSVersion.h"
|
||||
@@ -93,4 +93,4 @@ std::string GetWindowsSystemArchitecture() {
|
||||
return "(Unknown)";
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -2,11 +2,11 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32
|
||||
|
||||
bool IsVistaOrHigher();
|
||||
bool DoesVersionMatchWindows(uint32_t major, uint32_t minor, uint32_t spMajor, uint32_t spMinor, bool acceptGreater);
|
||||
std::string GetWindowsVersion();
|
||||
std::string GetWindowsSystemArchitecture();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -22,8 +22,10 @@
|
||||
#elif defined(_WIN32)
|
||||
#define VK_USE_PLATFORM_WIN32_KHR
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define VK_NO_PROTOTYPES
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
#ifdef _WIN32
|
||||
#ifndef _WIN32_WINNT
|
||||
|
||||
#if _MSC_VER < 1700
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||
#error You need a newer version of Visual Studio.
|
||||
#else
|
||||
#define _WIN32_WINNT 0x600
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
|
||||
#endif
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include "i18n/i18n.h"
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#include "SDL/SDL.h"
|
||||
#include "SDL/SDL_thread.h"
|
||||
#else
|
||||
|
||||
@@ -712,7 +712,11 @@ void GameSettingsScreen::CreateViews() {
|
||||
SavePathInMyDocumentChoice->SetEnabled(false);
|
||||
} else {
|
||||
if (installed_ && (result == S_OK)) {
|
||||
#ifdef _MSC_VER
|
||||
std::ifstream inputFile(ConvertUTF8ToWString(installedFile));
|
||||
#else
|
||||
std::ifstream inputFile(installedFile);
|
||||
#endif
|
||||
if (!inputFile.fail() && inputFile.is_open()) {
|
||||
std::string tempString;
|
||||
std::getline(inputFile, tempString);
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
#include "Common/CommonWindows.h"
|
||||
#include <mmreg.h>
|
||||
#include <dsound.h>
|
||||
#include <process.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#define __null
|
||||
#endif
|
||||
#include <dsound.h>
|
||||
#ifdef __MINGW32__
|
||||
#undef __null
|
||||
#endif
|
||||
|
||||
#include "thread/threadutil.h"
|
||||
#include "Common/OSVersion.h"
|
||||
#include "Core/Reporting.h"
|
||||
@@ -317,8 +324,16 @@ int WASAPIAudioBackend::RunThread() {
|
||||
REFERENCE_TIME hnsBufferDuration, hnsActualDuration;
|
||||
UINT32 pNumBufferFrames;
|
||||
UINT32 pNumPaddingFrames, pNumAvFrames;
|
||||
short *shortBuf = nullptr;
|
||||
int numSamples;
|
||||
hnsBufferDuration = REFTIMES_PER_SEC;
|
||||
|
||||
enum {
|
||||
UNKNOWN_FORMAT = 0,
|
||||
IEEE_FLOAT = 1,
|
||||
PCM16 = 2,
|
||||
} format = UNKNOWN_FORMAT;
|
||||
|
||||
HRESULT hresult;
|
||||
hresult = CoCreateInstance(CLSID_MMDeviceEnumerator,
|
||||
NULL, /*Object is not created as the part of the aggregate */
|
||||
@@ -357,12 +372,6 @@ int WASAPIAudioBackend::RunThread() {
|
||||
|
||||
sampleRate_ = pDeviceFormat->Format.nSamplesPerSec;
|
||||
|
||||
enum {
|
||||
UNKNOWN_FORMAT = 0,
|
||||
IEEE_FLOAT = 1,
|
||||
PCM16 = 2,
|
||||
} format = UNKNOWN_FORMAT;
|
||||
|
||||
// Don't know if PCM16 ever shows up here, the documentation only talks about float... but let's blindly
|
||||
// try to support it :P
|
||||
|
||||
@@ -383,11 +392,10 @@ int WASAPIAudioBackend::RunThread() {
|
||||
}
|
||||
}
|
||||
|
||||
short *shortBuf = nullptr;
|
||||
|
||||
BYTE *pData;
|
||||
hresult = pAudioRenderClient->GetBuffer(pNumBufferFrames, &pData);
|
||||
int numSamples = pNumBufferFrames * pDeviceFormat->Format.nChannels;
|
||||
numSamples = pNumBufferFrames * pDeviceFormat->Format.nChannels;
|
||||
if (format == IEEE_FLOAT) {
|
||||
memset(pData, 0, sizeof(float) * numSamples);
|
||||
shortBuf = new short[pNumBufferFrames * pDeviceFormat->Format.nChannels];
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "../../Globals.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// I M P L E M E N T A T I O N //////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -45,7 +45,6 @@ extern std::vector<std::wstring> GetWideCmdLine();
|
||||
class GraphicsContext;
|
||||
static GraphicsContext *g_graphicsContext;
|
||||
|
||||
void EmuThreadFunc(GraphicsContext *graphicsContext);
|
||||
void MainThreadFunc();
|
||||
|
||||
// On most other platforms, we let the "main" thread become the render thread and
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
#include "thin3d/thin3d_create.h"
|
||||
#include "thin3d/d3d11_loader.h"
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#undef __uuidof
|
||||
#define __uuidof(type) IID_##type
|
||||
#endif
|
||||
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
#error This file should not be compiled for UWP.
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "KeyMap.h"
|
||||
#include "KeyboardDevice.h"
|
||||
#include "../Common/CommonTypes.h"
|
||||
#include "WinUser.h"
|
||||
#include "../Common/CommonWindows.h"
|
||||
|
||||
|
||||
// TODO: More keys need to be added, but this is more than
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
|
||||
/* 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
|
||||
+68
-9
@@ -111,8 +111,48 @@ END
|
||||
// Version
|
||||
//
|
||||
|
||||
#include "version.rc"
|
||||
// no utf-16 support when using mingw's resource compiler
|
||||
#ifdef __MINGW32__
|
||||
// win-version.h is generated by git-version-gen.cmd.
|
||||
#include "win-version.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION PPSSPP_WIN_VERSION_COMMA
|
||||
PRODUCTVERSION PPSSPP_WIN_VERSION_COMMA
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x0L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "PPSSPP PSP emulator"
|
||||
VALUE "CompanyName", "Henrik Rydgård"
|
||||
VALUE "FileDescription", "PPSSPP"
|
||||
VALUE "FileVersion", PPSSPP_WIN_VERSION_STRING
|
||||
VALUE "InternalName", "PPSSPPEmu"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2006-2015 by Henrik Rydgård"
|
||||
VALUE "LegalTrademarks", "All product names are trademarks of their respective owners."
|
||||
VALUE "OriginalFilename", "PPSSPP.exe"
|
||||
VALUE "ProductName", "PPSSPP"
|
||||
VALUE "ProductVersion", PPSSPP_WIN_VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
#else
|
||||
#include "version.rc"
|
||||
#endif
|
||||
|
||||
#endif // Neutral (Default) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -228,8 +268,27 @@ BEGIN
|
||||
CONTROL "",IDC_GEDBG_MATRICES,"SysListView32",LVS_ALIGNLEFT | LVS_SHOWSELALWAYS | LVS_REPORT | WS_BORDER | WS_TABSTOP,7,7,217,86
|
||||
END
|
||||
|
||||
|
||||
// no utf-16 support when using mingw's resource compiler
|
||||
#ifdef __MINGW32__
|
||||
IDD_ABOUTBOX DIALOGEX 0, 0, 301, 163
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||
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 "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
|
||||
LTEXT "PSPSDK by #pspdev (freenode)",IDC_STATIC,48,62,240,8
|
||||
LTEXT "zlib by Jean-loup Gailly (compression) and Mark Adler (decompression)",IDC_STATIC,48,85,240,8
|
||||
LTEXT "Additional credits:",IDC_STATIC,40,49,253,8
|
||||
END
|
||||
#else
|
||||
#include "aboutbox.rc"
|
||||
#endif
|
||||
|
||||
IDD_MEMORY DIALOGEX 0, 0, 566, 287
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
@@ -466,7 +525,7 @@ BEGIN
|
||||
MENUITEM "Ignore Windows Key", ID_OPTIONS_IGNOREWINKEY
|
||||
MENUITEM "Language...", ID_OPTIONS_LANGUAGE
|
||||
MENUITEM "Control Mapping...", ID_OPTIONS_CONTROLS
|
||||
MENUITEM "Display Layout Editor" ID_OPTIONS_DISPLAY_LAYOUT
|
||||
MENUITEM "Display Layout Editor", ID_OPTIONS_DISPLAY_LAYOUT
|
||||
MENUITEM "More Settings...", ID_OPTIONS_MORE_SETTINGS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Fullscreen", ID_OPTIONS_FULLSCREEN
|
||||
@@ -502,10 +561,10 @@ BEGIN
|
||||
|
||||
POPUP "Backend"
|
||||
BEGIN
|
||||
MENUITEM "Direct3D9" ID_OPTIONS_DIRECT3D9
|
||||
MENUITEM "Direct3D11" ID_OPTIONS_DIRECT3D11
|
||||
MENUITEM "OpenGL" ID_OPTIONS_OPENGL
|
||||
MENUITEM "Vulkan" ID_OPTIONS_VULKAN
|
||||
MENUITEM "Direct3D9", ID_OPTIONS_DIRECT3D9
|
||||
MENUITEM "Direct3D11", ID_OPTIONS_DIRECT3D11
|
||||
MENUITEM "OpenGL", ID_OPTIONS_OPENGL
|
||||
MENUITEM "Vulkan", ID_OPTIONS_VULKAN
|
||||
END
|
||||
|
||||
POPUP "Rendering Mode"
|
||||
@@ -640,7 +699,7 @@ BEGIN
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Run to Cursor", ID_DISASM_RUNTOHERE
|
||||
MENUITEM "Jump to Cursor", ID_DISASM_SETPCTOHERE
|
||||
MENUITEM "Set Stall" ID_GEDBG_SETSTALLADDR
|
||||
MENUITEM "Set Stall", ID_GEDBG_SETSTALLADDR
|
||||
MENUITEM "Toggle Breakpoint", ID_DISASM_TOGGLEBREAKPOINT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Go to Displaylist PC", ID_GEDBG_GOTOPC
|
||||
@@ -661,7 +720,7 @@ BEGIN
|
||||
POPUP "gepreviewoptions"
|
||||
BEGIN
|
||||
MENUITEM "Export Image...", ID_GEDBG_EXPORT_IMAGE
|
||||
MENUITEM "Show Prim Preview" ID_GEDBG_ENABLE_PREVIEW
|
||||
MENUITEM "Show Prim Preview", ID_GEDBG_ENABLE_PREVIEW
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
|
||||
#undef _WIN32_WINNT
|
||||
|
||||
#if _MSC_VER < 1700
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1700
|
||||
#error You need a newer version of Visual Studio
|
||||
#else
|
||||
#define _WIN32_WINNT 0x600 // Compile for Vista on Visual Studio 2012 and above
|
||||
|
||||
@@ -54,7 +54,7 @@ inline uint32_t swap32(const uint8_t* _pData) {return swap32(*(const uint32_t*)_
|
||||
inline uint64_t swap64(const uint8_t* _pData) {return swap64(*(const uint64_t*)_pData);}
|
||||
|
||||
// Thread local storage
|
||||
#ifdef _WIN32
|
||||
#ifdef _MSC_VER
|
||||
#define __THREAD __declspec( thread )
|
||||
#else
|
||||
#define __THREAD __thread
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32
|
||||
|
||||
#include "d3d9_shader.h"
|
||||
#include "thin3d/d3dx9_loader.h"
|
||||
@@ -88,4 +88,4 @@ bool CompileVertexShader(LPDIRECT3DDEVICE9 device, const char *code, LPDIRECT3DV
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common/CommonWindows.h"
|
||||
|
||||
#include <initguid.h>
|
||||
#include <string>
|
||||
#include <d3d9.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _WIN32
|
||||
|
||||
#include "d3d9_state.h"
|
||||
#include <assert.h>
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
#include <d3d11_1.h>
|
||||
#include <d3dcompiler.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#undef __uuidof
|
||||
#define __uuidof(type) IID_##type
|
||||
#endif
|
||||
|
||||
namespace Draw {
|
||||
|
||||
// A problem is that we can't get the D3Dcompiler.dll without using a later SDK than 7.1, which was the last that
|
||||
|
||||
Reference in New Issue
Block a user