Small changes to make Common and Core build under my preliminary UWP setup.

This commit is contained in:
Henrik Rydgard 2017-02-24 18:59:41 +01:00
parent 89ac1a5c4a
commit fcbc20f240
27 changed files with 178 additions and 45 deletions

View file

@ -15,6 +15,10 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#include "ppsspp_config.h"
#if PPSSPP_ARCH(ARM)
#include "ArmEmitter.h"
#include "ArmABI.h"
@ -108,15 +112,17 @@ void ARMXEmitter::UpdateAPSR(bool NZCVQ, u8 Flags, bool GE, u8 GEval)
ARMABI_MOVI2R(R14, Imm);
_MSR(true, true, R14);
}
else
if(NZCVQ)
else {
if (NZCVQ)
{
Operand2 value(Flags << 1, 3);
_MSR(true, false, value);
}
else if(GE)
} else if (GE)
{
Operand2 value(GEval << 2, 9);
_MSR(false, true, value);
}
}
}
#endif

View file

@ -19,6 +19,7 @@
#include <snappy-c.h>
#include "ChunkFile.h"
#include "StringUtils.h"
PointerWrapSection PointerWrap::Section(const char *title, int ver) {
return Section(title, ver, ver);
@ -28,9 +29,8 @@ PointerWrapSection PointerWrap::Section(const char *title, int minVer, int ver)
char marker[16] = {0};
int foundVersion = ver;
strncpy(marker, title, sizeof(marker));
if (!ExpectVoid(marker, sizeof(marker)))
{
truncate_cpy(marker, title);
if (!ExpectVoid(marker, sizeof(marker))) {
// Might be before we added name markers for safety.
if (foundVersion == 1 && ExpectVoid(&foundVersion, sizeof(foundVersion)))
DoMarker(title);
@ -283,13 +283,11 @@ CChunkFileReader::Error CChunkFileReader::SaveFile(const std::string &filename,
header.Revision = REVISION_CURRENT;
header.ExpectedSize = (u32)sz;
header.UncompressedSize = (u32)sz;
strncpy(header.GitVersion, gitVersion, 32);
header.GitVersion[31] = '\0';
truncate_cpy(header.GitVersion, gitVersion);
// Setup the fixed-length title.
char titleFixed[128];
strncpy(titleFixed, title.c_str(), sizeof(titleFixed));
titleFixed[sizeof(titleFixed) - 1] = '\0';
truncate_cpy(titleFixed, title.c_str());
// Write to file
if (compress) {

View file

@ -27,6 +27,7 @@
#include <stdarg.h>
#endif
#include "ppsspp_config.h"
#include "thread/threadutil.h"
#include "util/text/utf8.h"
#include "Common.h"
@ -64,6 +65,8 @@ ConsoleListener::ConsoleListener() : bHidden(true)
bUseColor = false;
#elif defined(IOS)
bUseColor = false;
#elif PPSSPP_PLATFORM(UWP)
bUseColor = false;
#else
bUseColor = isatty(fileno(stdout));
#endif

View file

@ -22,6 +22,8 @@
#endif
#endif
#include "ppsspp_config.h"
#include "FileUtil.h"
#include "StringUtils.h"
@ -121,6 +123,9 @@ bool Exists(const std::string &filename) {
StripTailDirSlashes(fn);
#if defined(_WIN32)
#if PPSSPP_PLATFORM(UWP)
return false;
#else
std::wstring copy = ConvertUTF8ToWString(fn);
// Make sure Windows will no longer handle critical errors, which means no annoying "No disk" dialog
@ -128,6 +133,7 @@ bool Exists(const std::string &filename) {
bool success = GetFileAttributes(copy.c_str()) != INVALID_FILE_ATTRIBUTES;
SetErrorMode(OldMode);
return success;
#endif
#else
struct stat64 file_info;
return stat64(fn.c_str(), &file_info) == 0;
@ -142,11 +148,12 @@ bool IsDirectory(const std::string &filename)
#if defined(_WIN32)
std::wstring copy = ConvertUTF8ToWString(fn);
DWORD result = GetFileAttributes(copy.c_str());
if (result == INVALID_FILE_ATTRIBUTES) {
WIN32_FILE_ATTRIBUTE_DATA data{};
if (!GetFileAttributesEx(copy.c_str(), GetFileExInfoStandard, &data)) {
WARN_LOG(COMMON, "GetFileAttributes failed on %s: %08x", fn.c_str(), GetLastError());
return false;
}
DWORD result = data.dwFileAttributes;
return (result & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY;
#else
std::string copy(fn);
@ -328,9 +335,14 @@ bool Copy(const std::string &srcFilename, const std::string &destFilename)
INFO_LOG(COMMON, "Copy: %s --> %s",
srcFilename.c_str(), destFilename.c_str());
#ifdef _WIN32
#if PPSSPP_PLATFORM(UWP)
if (CopyFile2(ConvertUTF8ToWString(srcFilename).c_str(), ConvertUTF8ToWString(destFilename).c_str(), nullptr))
return true;
return false;
#else
if (CopyFile(ConvertUTF8ToWString(srcFilename).c_str(), ConvertUTF8ToWString(destFilename).c_str(), FALSE))
return true;
#endif
ERROR_LOG(COMMON, "Copy: failed %s --> %s: %s",
srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg());
return false;
@ -544,11 +556,15 @@ bool CreateEmptyFile(const std::string &filename)
return true;
}
#if !PPSSPP_PLATFORM(UWP)
// Deletes the given directory and anything under it. Returns true on success.
bool DeleteDirRecursively(const std::string &directory)
{
INFO_LOG(COMMON, "DeleteDirRecursively: %s", directory.c_str());
#ifdef _WIN32
// Find the first file in the directory.
WIN32_FIND_DATA ffd;
HANDLE hFind = FindFirstFile(ConvertUTF8ToWString(directory + "\\*").c_str(), &ffd);
@ -617,6 +633,8 @@ bool DeleteDirRecursively(const std::string &directory)
return true;
}
#endif
// Create directory and copy contents (does not overwrite existing files)
void CopyDir(const std::string &source_path, const std::string &dest_path)
{
@ -653,12 +671,17 @@ void CopyDir(const std::string &source_path, const std::string &dest_path)
else if (!File::Exists(dest)) File::Copy(source, dest);
}
closedir(dirp);
#else
ERROR_LOG(COMMON, "CopyDir not supported on this platform");
#endif
}
void openIniFile(const std::string fileName) {
std::string iniFile;
#if defined(_WIN32)
#if PPSSPP_PLATFORM(UWP)
// Not supported
#else
iniFile = fileName;
// Can't rely on a .txt file extension to auto-open in the right editor,
// so let's find notepad
@ -690,6 +713,7 @@ void openIniFile(const std::string fileName) {
}
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
#endif
#elif !defined(MOBILE_DEVICE)
#if defined(__APPLE__)
iniFile = "open ";

View file

@ -40,12 +40,20 @@ void MemArena::ReleaseSpace() {
void *MemArena::CreateView(s64 offset, size_t size, void *base) {
size = roundup(size);
#if PPSSPP_PLATFORM(UWP)
// TODO
void *ptr = nullptr;
#else
void *ptr = MapViewOfFileEx(hMemoryMapping, FILE_MAP_ALL_ACCESS, 0, (DWORD)((u64)offset), size, base);
#endif
return ptr;
}
void MemArena::ReleaseView(void* view, size_t size) {
#if PPSSPP_PLATFORM(UWP)
#else
UnmapViewOfFile(view);
#endif
}
bool MemArena::NeedsProbing() {

View file

@ -1,3 +1,4 @@
#include "ppsspp_config.h"
#ifdef _MSC_VER
@ -6,6 +7,12 @@
#include "Common/CommonWindows.h"
bool DoesVersionMatchWindows(uint32_t major, uint32_t minor, uint32_t spMajor, uint32_t spMinor, bool greater) {
#if PPSSPP_PLATFORM(UWP)
if (greater)
return true;
else
return major >= 7;
#else
uint64_t conditionMask = 0;
OSVERSIONINFOEX osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
@ -25,6 +32,7 @@ bool DoesVersionMatchWindows(uint32_t major, uint32_t minor, uint32_t spMajor, u
const uint32_t typeMask = VER_MAJORVERSION | VER_MINORVERSION | VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR;
return VerifyVersionInfo(&osvi, typeMask, conditionMask) != FALSE;
#endif
}
std::string GetWindowsVersion() {

View file

@ -23,6 +23,10 @@
void truncate_cpy(char *dest, size_t destSize, const char *src);
template<size_t Count>
inline void truncate_cpy(char(&out)[Count], const char *src) {
truncate_cpy(out, Count, src);
}
long parseHexLong(std::string s);
long parseLong(std::string s);

View file

@ -17,6 +17,8 @@
#include <time.h>
#include "ppsspp_config.h"
#ifdef _WIN32
#include "CommonWindows.h"
#include <mmsystem.h>
@ -34,7 +36,11 @@ namespace Common
u32 Timer::GetTimeMs()
{
#if defined(_WIN32)
#if PPSSPP_PLATFORM(UWP)
return 0; // TODO UWP
#else
return timeGetTime();
#endif
#else
// REALTIME is probably not a good idea for measuring updates.
struct timeval t;

View file

@ -451,7 +451,9 @@ static ConfigSetting graphicsSettings[] = {
ConfigSetting("FrameRate", &g_Config.iFpsLimit, 0, true, true),
#ifdef _WIN32
ConfigSetting("FrameSkipUnthrottle", &g_Config.bFrameSkipUnthrottle, false, true, true),
#if defined(USING_WIN_UI)
ConfigSetting("RestartRequired", &g_Config.bRestartRequired, false, false),
#endif
#else
ConfigSetting("FrameSkipUnthrottle", &g_Config.bFrameSkipUnthrottle, true),
#endif

View file

@ -15,6 +15,8 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#include <set>
#include "base/NativeApp.h"
@ -30,11 +32,9 @@
#include "Core/SaveState.h"
#include "Core/System.h"
#include "Core/MIPS/MIPS.h"
#include "Common/GraphicsContext.h"
#ifdef _WIN32
#include "Windows/GPU/WindowsGLContext.h"
#include "Windows/GPU/D3D9Context.h"
#include "Windows/GPU/WindowsVulkanContext.h"
#include "Windows/InputDevice.h"
#endif
@ -131,6 +131,11 @@ bool Core_GetPowerSaving() {
}
#ifdef _WIN32
#if PPSSPP_PLATFORM(UWP)
static int ScreenDPI() {
return 96; // TODO UWP
}
#else
static int ScreenDPI() {
HDC screenDC = GetDC(nullptr);
int dotsPerInch = GetDeviceCaps(screenDC, LOGPIXELSY);
@ -138,6 +143,7 @@ static int ScreenDPI() {
return dotsPerInch;
}
#endif
#endif
static bool IsWindowSmall(int pixelWidth, int pixelHeight) {
// Can't take this from config as it will not be set if windows is maximized.

View file

@ -16,6 +16,7 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <algorithm>
#include "base/stringutil.h"
#include "Common/Common.h"
#include "Core/FileLoaders/HTTPFileLoader.h"

View file

@ -15,6 +15,8 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#include <limits>
#include "file/free.h"
#include "file/zip_read.h"
@ -215,8 +217,13 @@ bool DirectoryFileHandle::Open(std::string &basePath, std::string &fileName, Fil
} else {
openmode = OPEN_EXISTING;
}
//Let's do it!
// Let's do it!
#if PPSSPP_PLATFORM(UWP)
hFile = CreateFile2(ConvertUTF8ToWString(fullName).c_str(), desired, sharemode, openmode, nullptr);
#else
hFile = CreateFile(ConvertUTF8ToWString(fullName).c_str(), desired, sharemode, 0, openmode, 0, 0);
#endif
bool success = hFile != INVALID_HANDLE_VALUE;
if (!success) {
DWORD w32err = GetLastError();
@ -224,7 +231,11 @@ bool DirectoryFileHandle::Open(std::string &basePath, std::string &fileName, Fil
if (w32err == ERROR_SHARING_VIOLATION) {
// Sometimes, the file is locked for write, let's try again.
sharemode |= FILE_SHARE_WRITE;
#if PPSSPP_PLATFORM(UWP)
hFile = CreateFile2(ConvertUTF8ToWString(fullName).c_str(), desired, sharemode, openmode, nullptr);
#else
hFile = CreateFile(ConvertUTF8ToWString(fullName).c_str(), desired, sharemode, 0, openmode, 0, 0);
#endif
success = hFile != INVALID_HANDLE_VALUE;
if (!success) {
w32err = GetLastError();
@ -380,8 +391,12 @@ size_t DirectoryFileHandle::Seek(s32 position, FileMove type)
case FILEMOVE_CURRENT: moveMethod = FILE_CURRENT; break;
case FILEMOVE_END: moveMethod = FILE_END; break;
}
DWORD newPos = SetFilePointer(hFile, (LONG)position, 0, moveMethod);
return newPos;
LARGE_INTEGER distance;
distance.QuadPart = position;
LARGE_INTEGER cursor;
DWORD newPos = SetFilePointerEx(hFile, distance, &cursor, moveMethod);
return cursor.QuadPart;
#else
int moveMethod = 0;
switch (type) {
@ -512,7 +527,7 @@ int DirectoryFileSystem::RenameFile(const std::string &from, const std::string &
const char * fullToC = fullTo.c_str();
#ifdef _WIN32
bool retValue = (MoveFile(ConvertUTF8ToWString(fullFrom).c_str(), ConvertUTF8ToWString(fullToC).c_str()) == TRUE);
bool retValue = (MoveFileEx(ConvertUTF8ToWString(fullFrom).c_str(), ConvertUTF8ToWString(fullToC).c_str(), 0) == TRUE);
#else
bool retValue = (0 == rename(fullFrom.c_str(), fullToC));
#endif
@ -742,7 +757,7 @@ std::vector<PSPFileInfo> DirectoryFileSystem::GetDirListing(std::string path) {
std::string w32path = GetLocalPath(path) + "\\*.*";
hFind = FindFirstFile(ConvertUTF8ToWString(w32path).c_str(), &findData);
hFind = FindFirstFileEx(ConvertUTF8ToWString(w32path).c_str(), FindExInfoStandard, &findData, FindExSearchNameMatch, NULL, 0);
if (hFind == INVALID_HANDLE_VALUE) {
return myVector; //the empty list

View file

@ -15,6 +15,8 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#include "Common/FileUtil.h"
#include "Common/StringUtils.h"
#include "Common/ChunkFile.h"
@ -668,7 +670,7 @@ std::vector<PSPFileInfo> VirtualDiscFileSystem::GetDirListing(std::string path)
std::string w32path = GetLocalPath(path) + "\\*.*";
hFind = FindFirstFile(ConvertUTF8ToWString(w32path).c_str(), &findData);
hFind = FindFirstFileEx(ConvertUTF8ToWString(w32path).c_str(), FindExInfoStandard, &findData, FindExSearchNameMatch, NULL, 0);
if (hFind == INVALID_HANDLE_VALUE) {
return myVector; //the empty list
@ -806,6 +808,8 @@ void VirtualDiscFileSystem::HandlerLogger(void *arg, HandlerHandle handle, LogTy
}
}
#if !PPSSPP_PLATFORM(UWP)
VirtualDiscFileSystem::Handler::Handler(const char *filename, VirtualDiscFileSystem *const sys) {
#ifdef _WIN32
#define dlopen(name, ignore) (void *)LoadLibrary(ConvertUTF8ToWString(name).c_str())
@ -852,3 +856,5 @@ VirtualDiscFileSystem::Handler::~Handler() {
#endif
}
}
#endif

View file

@ -901,6 +901,8 @@ static H264Frames *pmpframes;
// decode pmp video to RGBA format
static bool decodePmpVideo(PSPPointer<SceMpegRingBuffer> ringbuffer, u32 pmpctxAddr){
#ifdef USE_FFMPEG
// the current video is pmp iff pmp_videoSource is a valid addresse
MpegContext* ctx = getMpegCtx(pmpctxAddr);
if (Memory::IsValidAddress(pmp_videoSource)){
@ -1014,6 +1016,9 @@ static bool decodePmpVideo(PSPPointer<SceMpegRingBuffer> ringbuffer, u32 pmpctxA
}
// not a pmp video, return false
return false;
#else
return false;
#endif
}
@ -1098,6 +1103,7 @@ static u32 sceMpegAvcDecode(u32 mpeg, u32 auAddr, u32 frameWidth, u32 bufferAddr
ctx->mediaengine->setVideoStream(avcAu.esBuffer);
if (ispmp){
#ifdef USE_FFMPEG
while (pmp_queue.size() != 0){
// playing all pmp_queue frames
ctx->mediaengine->m_pFrameRGB = pmp_queue.front();
@ -1110,6 +1116,7 @@ static u32 sceMpegAvcDecode(u32 mpeg, u32 auAddr, u32 frameWidth, u32 bufferAddr
hleDelayResult(0, "pmp video decode", 30);
pmp_queue.pop_front();
}
#endif
}
else if(ctx->mediaengine->stepVideo(ctx->videoPixelMode)) {
int bufferSize = ctx->mediaengine->writeVideoImage(buffer, frameWidth, ctx->videoPixelMode);

View file

@ -134,6 +134,7 @@ void SimpleAudio::SetChannels(int channels) {
// Do nothing, already set.
return;
}
#ifdef USE_FFMPEG
if (codecOpen_) {
ERROR_LOG(ME, "Codec already open, cannot change channels");
@ -142,6 +143,7 @@ void SimpleAudio::SetChannels(int channels) {
codecCtx_->channels = channels_;
codecCtx_->channel_layout = channels_ == 2 ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
}
#endif
}
SimpleAudio::~SimpleAudio() {

View file

@ -16,6 +16,7 @@
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "file/file_util.h"
#include "util/text/utf8.h"
#include "Common/StringUtils.h"
@ -249,15 +250,17 @@ bool Load_PSP_ISO(FileLoader *fileLoader, std::string *error_string) {
static std::string NormalizePath(const std::string &path) {
#ifdef _WIN32
char buf[512] = {0};
if (GetFullPathNameA(path.c_str(), sizeof(buf) - 1, buf, NULL) == 0)
wchar_t buf[512] = {0};
std::wstring wpath = ConvertUTF8ToWString(path);
if (GetFullPathName(wpath.c_str(), sizeof(buf) - 1, buf, NULL) == 0)
return "";
return ConvertWStringToUTF8(buf);
#else
char buf[PATH_MAX + 1];
if (realpath(path.c_str(), buf) == NULL)
return "";
#endif
return buf;
#endif
}
bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {

View file

@ -32,7 +32,6 @@
#include "Core/ELF/ParamSFO.h"
#include "GPU/GPUInterface.h"
#include "GPU/GPUState.h"
#include "GPU/GLES/FramebufferManagerGLES.h"
#include "net/http_client.h"
#include "net/resolve.h"
#include "net/url.h"
@ -452,7 +451,7 @@ namespace Reporting
bool IsSupported()
{
// Disabled when using certain hacks, because they make for poor reports.
if (g_Config.iRenderingMode >= FBO_READFBOMEMORY_MIN)
if (g_Config.iRenderingMode >= 2) // FBO_READFBOMEMORY_MIN
return false;
if (g_Config.bTimerHack)
return false;

View file

@ -15,6 +15,9 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#include <algorithm>
#ifdef USING_QT_UI
#include <QtGui/QImage>
#else
@ -26,11 +29,8 @@
#include "Common/FileUtil.h"
#include "Core/Config.h"
#include "Core/Screenshot.h"
#include "Core/Core.h"
#include "GPU/Common/GPUDebugInterface.h"
#ifdef _WIN32
#include "GPU/Directx9/GPU_DX9.h"
#endif
#include "GPU/GLES/GPU_GLES.h"
#include "GPU/GPUInterface.h"
#include "GPU/GPUState.h"

View file

@ -15,6 +15,8 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#ifdef _WIN32
#pragma warning(disable:4091)
#include "Common/CommonWindows.h"
@ -616,10 +618,14 @@ void InitSysDirectories() {
g_Config.flash0Directory = path + "flash0/";
// Detect the "My Documents"(XP) or "Documents"(on Vista/7/8) folder.
#if PPSSPP_PLATFORM(UWP)
const std::string myDocsPath = ""; // TODO UWP
const HRESULT result = E_FAIL;
#else
wchar_t myDocumentsPath[MAX_PATH];
const HRESULT result = SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, myDocumentsPath);
const std::string myDocsPath = ConvertWStringToUTF8(myDocumentsPath) + "/PPSSPP/";
#endif
const std::string installedFile = path + "installed.txt";
const bool installed = File::Exists(installedFile);

View file

@ -19,6 +19,7 @@
#include "Common/Log.h"
#include "Common/ChunkFile.h"
#include "Common/StringUtils.h"
#include "Core/Util/BlockAllocator.h"
#include "Core/Reporting.h"
@ -480,16 +481,15 @@ void BlockAllocator::DoState(PointerWrap &p)
BlockAllocator::Block::Block(u32 _start, u32 _size, bool _taken, Block *_prev, Block *_next)
: start(_start), size(_size), taken(_taken), prev(_prev), next(_next)
{
strcpy(tag, "(untitled)");
truncate_cpy(tag, "(untitled)");
}
void BlockAllocator::Block::SetTag(const char *_tag)
{
if (_tag)
strncpy(tag, _tag, 32);
truncate_cpy(tag, _tag);
else
strncpy(tag, "---", 32);
tag[31] = 0;
truncate_cpy(tag, "---");
}
void BlockAllocator::Block::DoState(PointerWrap &p)

View file

@ -15,12 +15,19 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#include "Common/GraphicsContext.h"
#include "Core/Core.h"
#include "GPU/GPU.h"
#include "GPU/GPUInterface.h"
#include "GPU/GLES/GPU_GLES.h"
#if PPSSPP_PLATFORM(UWP)
#include "GPU/D3D11/GPU_D3D11.h"
#else
#ifndef NO_VULKAN
#include "GPU/Vulkan/GPU_Vulkan.h"
#endif
@ -32,6 +39,8 @@
#include "GPU/D3D11/GPU_D3D11.h"
#endif
#endif
GPUStatistics gpuStats;
GPUInterface *gpu;
GPUDebugInterface *gpuDebug;
@ -47,6 +56,10 @@ static void SetGPU(T *obj) {
#endif
bool GPU_Init(GraphicsContext *ctx, Draw::DrawContext *draw) {
#if PPSSPP_PLATFORM(UWP)
SetGPU(new GPU_D3D11(ctx, draw));
return true;
#else
switch (PSP_CoreParameter().gpuCore) {
case GPUCORE_NULL:
SetGPU(new NullGPU());
@ -83,6 +96,7 @@ bool GPU_Init(GraphicsContext *ctx, Draw::DrawContext *draw) {
}
return gpu != NULL;
#endif
}
#ifdef USE_CRT_DBG
#define new DBG_NEW

View file

@ -15,6 +15,8 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include "ppsspp_config.h"
#include <algorithm>
// For shell links
@ -47,10 +49,15 @@
#include "Windows/DSoundStream.h"
#include "Windows/WindowsHost.h"
#include "Windows/MainWindow.h"
#if PPSSPP_PLATFORM(UWP)
#include "Windows/GPU/D3D11Context.h"
#else
#include "Windows/GPU/WindowsGLContext.h"
#include "Windows/GPU/WindowsVulkanContext.h"
#include "Windows/GPU/D3D9Context.h"
#include "Windows/GPU/D3D11Context.h"
#endif
#include "Windows/Debugger/DebuggerShared.h"
#include "Windows/Debugger/Debugger_Disasm.h"

View file

@ -9,7 +9,9 @@
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <limits.h>
#include <intrin.h>

View file

@ -1,5 +1,4 @@
#ifndef _NET_HTTP_HTTP_CLIENT
#define _NET_HTTP_HTTP_CLIENT
#pragma once
#include <functional>
#include <memory>
@ -9,7 +8,9 @@
#include "thread/thread.h"
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <winsock2.h>
#else
#include <netinet/in.h>
@ -165,8 +166,4 @@ private:
std::vector<std::shared_ptr<Download>> downloads_;
};
} // http
#endif // _NET_HTTP_HTTP_CLIENT
} // http

View file

@ -16,8 +16,9 @@
class Matrix4x4;
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

View file

@ -29,7 +29,9 @@
// WIN32
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <Windows.h>
#if defined(_MSC_VER) && defined(_MT)

View file

@ -76,6 +76,12 @@
#if defined(_WIN32)
// Covers both 32 and 64bit Windows
#define PPSSPP_PLATFORM_WINDOWS 1
// UWP trickery
#ifdef WINAPI_FAMILY
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
#define PPSSPP_PLATFORM_UWP 1
#endif
#endif
#elif defined(__APPLE__)
#include <TargetConditionals.h>
#if TARGET_IPHONE_SIMULATOR