mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-11 07:03:33 +02:00
Merge pull request #10767 from aliaspider/temp
fix cmake build for mingw and msvc.
This commit is contained in:
+52
-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()
|
||||
@@ -273,13 +278,16 @@ if(NOT MSVC)
|
||||
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 +427,15 @@ 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)
|
||||
else()
|
||||
target_link_libraries(Common dxguid)
|
||||
endif()
|
||||
target_link_libraries(Common winmm d3d9 dsound)
|
||||
endif()
|
||||
|
||||
if(TARGET SDL2::SDL2)
|
||||
@@ -772,24 +788,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 +796,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 +1048,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 +1097,7 @@ include_directories(ext/xxhash)
|
||||
set(CoreExtra)
|
||||
set(CoreExtraLibs)
|
||||
|
||||
if(WINDOWS OR ANDROID)
|
||||
if(WIN32 OR ANDROID)
|
||||
set(CoreExtraLibs ${CoreExtraLibs} armips)
|
||||
endif()
|
||||
|
||||
@@ -1689,6 +1706,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 +1721,7 @@ if(FFmpeg_FOUND)
|
||||
FFmpeg::avutil
|
||||
FFmpeg::swresample
|
||||
FFmpeg::swscale
|
||||
${ZLIB_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1765,7 +1787,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 +1834,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 +1913,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
|
||||
|
||||
@@ -176,6 +176,7 @@ void LogManager::ChangeFileLog(const char *filename) {
|
||||
if (fileLog_) {
|
||||
RemoveListener(fileLog_);
|
||||
delete fileLog_;
|
||||
fileLog_ = nullptr;
|
||||
}
|
||||
|
||||
if (filename) {
|
||||
@@ -245,16 +246,20 @@ void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const
|
||||
}
|
||||
|
||||
char msgBuf[1024];
|
||||
va_list args_copy;
|
||||
|
||||
va_copy(args_copy, args);
|
||||
size_t neededBytes = vsnprintf(msgBuf, sizeof(msgBuf), format, args);
|
||||
if (neededBytes > sizeof(msgBuf)) {
|
||||
// Needed more space? Re-run vsnprintf.
|
||||
message.msg.resize(neededBytes + 1);
|
||||
vsnprintf(&message.msg[0], neededBytes + 1, format, args);
|
||||
vsnprintf(&message.msg[0], neededBytes + 1, format, args_copy);
|
||||
} else {
|
||||
message.msg.resize(neededBytes + 1);
|
||||
memcpy(&message.msg[0], msgBuf, neededBytes);
|
||||
}
|
||||
message.msg[message.msg.size() - 1] = '\n';
|
||||
va_end(args_copy);
|
||||
|
||||
std::lock_guard<std::mutex> listeners_lock(listeners_lock_);
|
||||
for (auto &iter : listeners_) {
|
||||
|
||||
+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
|
||||
|
||||
@@ -1151,6 +1151,10 @@ void VulkanDeleteList::Take(VulkanDeleteList &del) {
|
||||
}
|
||||
|
||||
void VulkanDeleteList::PerformDeletes(VkDevice device) {
|
||||
for (auto &callback : callbacks_) {
|
||||
callback.func(callback.userdata);
|
||||
}
|
||||
callbacks_.clear();
|
||||
for (auto &cmdPool : cmdPools_) {
|
||||
vkDestroyCommandPool(device, cmdPool, nullptr);
|
||||
}
|
||||
@@ -1211,8 +1215,4 @@ void VulkanDeleteList::PerformDeletes(VkDevice device) {
|
||||
vkDestroyDescriptorSetLayout(device, descSetLayout, nullptr);
|
||||
}
|
||||
descSetLayouts_.clear();
|
||||
for (auto &callback : callbacks_) {
|
||||
callback.func(callback.userdata);
|
||||
}
|
||||
callbacks_.clear();
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+3
-3
@@ -20,16 +20,16 @@
|
||||
#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
|
||||
#define _WIN32_WINNT 0x601
|
||||
#endif
|
||||
|
||||
#endif // #ifndef _WIN32_WINNT
|
||||
|
||||
#undef WINVER
|
||||
#define WINVER 0x0600
|
||||
#define WINVER _WIN32_WINNT
|
||||
#ifndef _WIN32_IE
|
||||
#define _WIN32_IE 0x0600 // Default value is 0x0400
|
||||
#endif
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -387,8 +387,8 @@ protected:
|
||||
bool gameUsesSequentialCopies_ = false;
|
||||
|
||||
// Sampled in BeginFrame for safety.
|
||||
float renderWidth_;
|
||||
float renderHeight_;
|
||||
float renderWidth_ = 0.0f;
|
||||
float renderHeight_ = 0.0f;
|
||||
int pixelWidth_;
|
||||
int pixelHeight_;
|
||||
int bloomHack_ = 0;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cfloat>
|
||||
#include <vector>
|
||||
#include <d3d11.h>
|
||||
#include <D3Dcompiler.h>
|
||||
@@ -151,4 +152,4 @@ void StockObjectsD3D11::Destroy() {
|
||||
samplerLinear2DClamp->Release();
|
||||
}
|
||||
|
||||
StockObjectsD3D11 stockD3D11;
|
||||
StockObjectsD3D11 stockD3D11;
|
||||
|
||||
+2
-2
@@ -332,8 +332,8 @@ protected:
|
||||
bool debugRecording_;
|
||||
bool interruptsEnabled_;
|
||||
bool resized_;
|
||||
DrawType lastDraw_;
|
||||
GEPrimitiveType lastPrim_;
|
||||
DrawType lastDraw_ = DRAW_UNKNOWN;
|
||||
GEPrimitiveType lastPrim_ = GE_PRIM_INVALID;
|
||||
|
||||
int vertexCost_ = 0;
|
||||
|
||||
|
||||
@@ -182,7 +182,9 @@ void TextureCacheVulkan::DeviceLost() {
|
||||
}
|
||||
|
||||
samplerCache_.DeviceLost();
|
||||
vulkan_->Delete().QueueDeleteSampler(samplerNearest_);
|
||||
|
||||
if (samplerNearest_)
|
||||
vulkan_->Delete().QueueDeleteSampler(samplerNearest_);
|
||||
|
||||
nextTexture_ = nullptr;
|
||||
}
|
||||
|
||||
+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 //////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <limits.h>
|
||||
#include <algorithm>
|
||||
#include <mmsystem.h>
|
||||
|
||||
#include "Core/HLE/sceCtrl.h"
|
||||
#include "DinputDevice.h"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "Common/CommonWindows.h"
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
// NOTE: Apologies for the quality of this code, this is really from pre-opensource Dolphin - that is, 2003.
|
||||
// It's improving slowly, though. :)
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Common/CommonWindows.h"
|
||||
#include "Common/KeyMap.h"
|
||||
#include "Common/OSVersion.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define NOMINMAX
|
||||
#include "stdafx.h"
|
||||
#include <Windows.h>
|
||||
#include "Windows/TouchInputHandler.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "base/display.h"
|
||||
#include "Common/CommonWindows.h"
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/Log.h"
|
||||
#include "base/NativeApp.h"
|
||||
#include "Windows/MainWindow.h"
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace W32Util
|
||||
|
||||
void NiceSizeFormat(size_t size, char *out)
|
||||
{
|
||||
char *sizes[] = {"B","KB","MB","GB","TB","PB","EB"};
|
||||
const char *sizes[] = {"B","KB","MB","GB","TB","PB","EB"};
|
||||
int s = 0;
|
||||
int frac = 0;
|
||||
while (size>=1024)
|
||||
@@ -172,7 +172,7 @@ GenericListControl::GenericListControl(HWND hwnd, const GenericListViewDef& def)
|
||||
int totalListSize = rect.right-rect.left;
|
||||
for (int i = 0; i < columnCount; i++) {
|
||||
lvc.cx = columns[i].size * totalListSize;
|
||||
lvc.pszText = columns[i].name;
|
||||
lvc.pszText = (LPTSTR)columns[i].name;
|
||||
|
||||
if (columns[i].flags & GLVC_CENTERED)
|
||||
lvc.fmt = LVCFMT_CENTER;
|
||||
@@ -385,4 +385,4 @@ void GenericListControl::SelectAll()
|
||||
int GenericListControl::GetSelectedIndex()
|
||||
{
|
||||
return ListView_GetNextItem(handle, -1, LVNI_SELECTED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "Common/CommonWindows.h"
|
||||
|
||||
namespace W32Util
|
||||
@@ -15,7 +16,7 @@ namespace W32Util
|
||||
|
||||
struct GenericListViewColumn
|
||||
{
|
||||
wchar_t *name;
|
||||
const wchar_t *name;
|
||||
float size;
|
||||
int flags;
|
||||
};
|
||||
@@ -71,4 +72,4 @@ private:
|
||||
// Used for hacky workaround to fix a rare hang (see issue #5184)
|
||||
volatile bool inResizeColumns;
|
||||
volatile bool updating;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ TabControl::TabControl(HWND handle, bool noDisplayArea)
|
||||
hasButtons = (GetWindowLong(handle,GWL_STYLE) & TCS_BUTTONS) != 0;
|
||||
}
|
||||
|
||||
HWND TabControl::AddTabWindow(wchar_t* className, wchar_t* title, DWORD style)
|
||||
HWND TabControl::AddTabWindow(const wchar_t* className, const wchar_t *title, DWORD style)
|
||||
{
|
||||
TabInfo info;
|
||||
info.hasBorder = (style & WS_BORDER) != 0;
|
||||
@@ -50,13 +50,13 @@ HWND TabControl::AddTabWindow(wchar_t* className, wchar_t* title, DWORD style)
|
||||
return tabHandle;
|
||||
}
|
||||
|
||||
void TabControl::AddTabDialog(Dialog* dialog, wchar_t* title)
|
||||
void TabControl::AddTabDialog(Dialog* dialog, const wchar_t* title)
|
||||
{
|
||||
HWND handle = dialog->GetDlgHandle();
|
||||
AddTab(handle,title);
|
||||
}
|
||||
|
||||
void TabControl::AddTab(HWND handle, wchar_t* title)
|
||||
void TabControl::AddTab(HWND handle, const wchar_t* title)
|
||||
{
|
||||
if (showTabTitles)
|
||||
AppendPageToControl(title);
|
||||
@@ -93,13 +93,13 @@ void TabControl::AddTab(HWND handle, wchar_t* title)
|
||||
ShowTab(index);
|
||||
}
|
||||
|
||||
int TabControl::AppendPageToControl(wchar_t* title)
|
||||
int TabControl::AppendPageToControl(const wchar_t *title)
|
||||
{
|
||||
TCITEM tcItem;
|
||||
ZeroMemory (&tcItem,sizeof (tcItem));
|
||||
tcItem.mask = TCIF_TEXT;
|
||||
tcItem.dwState = 0;
|
||||
tcItem.pszText = title;
|
||||
tcItem.pszText = (LPTSTR)title;
|
||||
tcItem.cchTextMax = (int)wcslen(tcItem.pszText)+1;
|
||||
tcItem.iImage = 0;
|
||||
|
||||
@@ -304,4 +304,4 @@ LRESULT CALLBACK TabControl::wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
|
||||
}
|
||||
|
||||
return (LRESULT)CallWindowProc((WNDPROC)tabControl->oldProc,hwnd,msg,wParam,lParam);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,9 +11,9 @@ class TabControl
|
||||
public:
|
||||
TabControl(HWND handle, bool noDisplayArea = false);
|
||||
void HandleNotify(LPARAM lParam);
|
||||
HWND AddTabWindow(wchar_t* className, wchar_t* title, DWORD style = 0);
|
||||
void AddTabDialog(Dialog* dialog, wchar_t* title);
|
||||
void AddTab(HWND hwnd, wchar_t* title);
|
||||
HWND AddTabWindow(const wchar_t* className, const wchar_t* title, DWORD style = 0);
|
||||
void AddTabDialog(Dialog* dialog, const wchar_t* title);
|
||||
void AddTab(HWND hwnd, const wchar_t* title);
|
||||
void ShowTab(int index, bool setControlIndex = true);
|
||||
void ShowTab(HWND pageHandle);
|
||||
void NextTab(bool cycle);
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
private:
|
||||
static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
void OnResize();
|
||||
int AppendPageToControl(wchar_t* title);
|
||||
int AppendPageToControl(const wchar_t* title);
|
||||
|
||||
struct TabInfo
|
||||
{
|
||||
@@ -52,4 +52,4 @@ private:
|
||||
int currentTab;
|
||||
bool hasButtons;
|
||||
bool noDisplayArea_;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -247,7 +247,7 @@ void WindowsHost::BootDone() {
|
||||
Core_EnableStepping(!g_Config.bAutoRun);
|
||||
}
|
||||
|
||||
static std::string SymbolMapFilename(const char *currentFilename, char* ext) {
|
||||
static std::string SymbolMapFilename(const char *currentFilename, const char* ext) {
|
||||
FileInfo info;
|
||||
|
||||
std::string result = currentFilename;
|
||||
@@ -256,9 +256,9 @@ static std::string SymbolMapFilename(const char *currentFilename, char* ext) {
|
||||
getFileInfo(currentFilename, &info);
|
||||
if (info.isDirectory) {
|
||||
#ifdef _WIN32
|
||||
char* slash = "\\";
|
||||
const char* slash = "\\";
|
||||
#else
|
||||
char* slash = "/";
|
||||
const char* slash = "/";
|
||||
#endif
|
||||
if (!endsWith(result,slash))
|
||||
result += slash;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "../Core/Host.h"
|
||||
#include "InputDevice.h"
|
||||
#include "KeyboardDevice.h"
|
||||
#include "Common/CommonWindows.h"
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "base/NativeApp.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Common/CommonWindows.h"
|
||||
#include "Common/KeyMap.h"
|
||||
#include "Common/Log.h"
|
||||
#include "input/input_state.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+13
-6
@@ -19,19 +19,16 @@
|
||||
|
||||
#pragma warning(disable:4996)
|
||||
|
||||
// WinSock2 MUST be included before <windows.h> !!!
|
||||
#include <WinSock2.h>
|
||||
|
||||
#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
|
||||
#define _WIN32_WINNT 0x601 // Compile for Win7 on Visual Studio 2012 and above
|
||||
#endif
|
||||
|
||||
#undef WINVER
|
||||
#define WINVER 0x0600
|
||||
#define WINVER _WIN32_WINNT
|
||||
#ifndef _WIN32_IE
|
||||
#define _WIN32_IE 0x0600 // Default value is 0x0400
|
||||
#endif
|
||||
@@ -47,6 +44,16 @@
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
#endif
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
// WinSock2 MUST be included before <windows.h> !!!
|
||||
#include <WinSock2.h>
|
||||
|
||||
#include "Common/CommonWindows.h"
|
||||
|
||||
#include <windowsx.h>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "thin3d/d3dx9_loader.h"
|
||||
@@ -184,4 +185,4 @@ HRESULT dyn_D3DXCompileShader(LPCSTR pSrcData, UINT srcDataLen, CONST D3DXMACRO*
|
||||
return m_TFunc_D3DXCompileShader(pSrcData, srcDataLen, pDefines,
|
||||
pInclude, pFunctionName, pProfile,
|
||||
Flags, ppShader, ppErrorMsgs, ppConstantTable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,11 +13,17 @@
|
||||
#include "Common/ColorConv.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cfloat>
|
||||
#include <D3DCommon.h>
|
||||
#include <d3d11.h>
|
||||
#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
|
||||
@@ -717,13 +723,14 @@ public:
|
||||
};
|
||||
|
||||
Texture *D3D11DrawContext::CreateTexture(const TextureDesc &desc) {
|
||||
D3D11Texture *tex = new D3D11Texture(desc);
|
||||
|
||||
if (!(GetDataFormatSupport(desc.format) & FMT_TEXTURE)) {
|
||||
// D3D11 does not support this format as a texture format.
|
||||
return false;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
D3D11Texture *tex = new D3D11Texture(desc);
|
||||
|
||||
bool generateMips = desc.generateMips;
|
||||
if (desc.generateMips && !(GetDataFormatSupport(desc.format) & FMT_AUTOGEN_MIPS)) {
|
||||
// D3D11 does not support autogenerating mipmaps for this format.
|
||||
|
||||
@@ -648,7 +648,8 @@ Pipeline *D3D9Context::CreateGraphicsPipeline(const PipelineDesc &desc) {
|
||||
for (auto iter : desc.shaders) {
|
||||
if (!iter) {
|
||||
ELOG("NULL shader passed to CreateGraphicsPipeline");
|
||||
return false;
|
||||
delete pipeline;
|
||||
return NULL;
|
||||
}
|
||||
if (iter->GetStage() == ShaderStage::FRAGMENT) {
|
||||
pipeline->pshader = static_cast<D3D9ShaderModule *>(iter);
|
||||
|
||||
Reference in New Issue
Block a user