diff --git a/Common/Arm64Emitter.cpp b/Common/Arm64Emitter.cpp index b2ae011b56..5dd3b4d07e 100644 --- a/Common/Arm64Emitter.cpp +++ b/Common/Arm64Emitter.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include "ppsspp_config.h" + #include #include #include @@ -12,13 +14,15 @@ #include #include "base/basictypes.h" -#include "ppsspp_config.h" #include "Arm64Emitter.h" #include "MathUtil.h" #include "CommonTypes.h" +#include "CommonWindows.h" #include "CPUDetect.h" +#include "CommonWindows.h" + #ifdef IOS #include #endif @@ -322,7 +326,11 @@ void ARM64XEmitter::FlushIcacheSection(u8* start, u8* end) #if defined(IOS) // Header file says this is equivalent to: sys_icache_invalidate(start, end - start); sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start); -#elif PPSSPP_ARCH(ARM64) +#elif PPSSPP_PLATFORM(WINDOWS) +#if !PPSSPP_PLATFORM(UWP) // Not available on UWP, which is very bad! + FlushInstructionCache(GetCurrentProcess(), start, end - start); +#endif +#elif PPSSPP_ARCH(ARM64) // Code from Dolphin, contributed by the Mono project. // Don't rely on GCC's __clear_cache implementation, as it caches diff --git a/Common/ArmEmitter.cpp b/Common/ArmEmitter.cpp index 906468d635..8f11037260 100644 --- a/Common/ArmEmitter.cpp +++ b/Common/ArmEmitter.cpp @@ -15,6 +15,8 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ +#include "ppsspp_config.h" + #include "base/logging.h" #include @@ -33,6 +35,10 @@ #include "ArmEmitter.h" #include "CPUDetect.h" +#ifdef _WIN32 +#include "CommonWindows.h" +#endif + // Want it in release builds too #ifdef __ANDROID__ #undef _dbg_assert_msg_ @@ -626,14 +632,18 @@ void ARMXEmitter::FlushIcacheSection(u8 *start, u8 *end) #if defined(IOS) // Header file says this is equivalent to: sys_icache_invalidate(start, end - start); sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start); -#elif !defined(_WIN32) -#if defined(ARM) +#elif PPSSPP_PLATFORM(WINDOWS) +#if !PPSSPP_PLATFORM(UWP) // Not available on UWP, which is very bad! + FlushInstructionCache(GetCurrentProcess(), start, end - start); +#endif +#elif PPSSPP_ARCH(ARM) + #if defined(__clang__) || defined(__ANDROID__) __clear_cache(start, end); #else __builtin___clear_cache(start, end); #endif -#endif + #endif } diff --git a/Common/CPUDetect.cpp b/Common/CPUDetect.cpp index 42c12a716d..4f4304320b 100644 --- a/Common/CPUDetect.cpp +++ b/Common/CPUDetect.cpp @@ -108,14 +108,13 @@ void CPUInfo::Detect() { #endif num_cores = 1; -#ifdef _WIN32 -#ifdef _M_IX86 +#if PPSSPP_PLATFORM(UWP) + OS64bit = Mode64bit; // TODO: Not always accurate! +#elif defined(_WIN32) && defined(_M_IX86) BOOL f64 = false; IsWow64Process(GetCurrentProcess(), &f64); OS64bit = (f64 == TRUE) ? true : false; #endif -#endif - // Set obvious defaults, for extra safety if (Mode64bit) { bSSE = true; diff --git a/Common/FileUtil.cpp b/Common/FileUtil.cpp index eac8240a93..3aceaa607c 100644 --- a/Common/FileUtil.cpp +++ b/Common/FileUtil.cpp @@ -123,17 +123,20 @@ 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 +#if !PPSSPP_PLATFORM(UWP) int OldMode = SetErrorMode(SEM_FAILCRITICALERRORS); - bool success = GetFileAttributes(copy.c_str()) != INVALID_FILE_ATTRIBUTES; - SetErrorMode(OldMode); - return success; #endif + WIN32_FILE_ATTRIBUTE_DATA data{}; + if (!GetFileAttributesEx(copy.c_str(), GetFileExInfoStandard, &data) || data.dwFileAttributes == INVALID_FILE_ATTRIBUTES) { + return false; + } +#if !PPSSPP_PLATFORM(UWP) + SetErrorMode(OldMode); +#endif + return true; #else struct stat64 file_info; return stat64(fn.c_str(), &file_info) == 0; @@ -149,7 +152,7 @@ bool IsDirectory(const std::string &filename) #if defined(_WIN32) std::wstring copy = ConvertUTF8ToWString(fn); WIN32_FILE_ATTRIBUTE_DATA data{}; - if (!GetFileAttributesEx(copy.c_str(), GetFileExInfoStandard, &data)) { + if (!GetFileAttributesEx(copy.c_str(), GetFileExInfoStandard, &data) || data.dwFileAttributes == INVALID_FILE_ATTRIBUTES) { WARN_LOG(COMMON, "GetFileAttributes failed on %s: %08x", fn.c_str(), GetLastError()); return false; } @@ -170,28 +173,24 @@ bool IsDirectory(const std::string &filename) // Deletes a given filename, return true on success // Doesn't supports deleting a directory -bool Delete(const std::string &filename) -{ +bool Delete(const std::string &filename) { INFO_LOG(COMMON, "Delete: file %s", filename.c_str()); // Return true because we care about the file no // being there, not the actual delete. - if (!Exists(filename)) - { + if (!Exists(filename)) { WARN_LOG(COMMON, "Delete: %s does not exists", filename.c_str()); return true; } // We can't delete a directory - if (IsDirectory(filename)) - { + if (IsDirectory(filename)) { WARN_LOG(COMMON, "Delete failed: %s is a directory", filename.c_str()); return false; } #ifdef _WIN32 - if (!DeleteFile(ConvertUTF8ToWString(filename).c_str())) - { + if (!DeleteFile(ConvertUTF8ToWString(filename).c_str())) { WARN_LOG(COMMON, "Delete: DeleteFile failed on %s: %s", filename.c_str(), GetLastErrorMsg()); return false; @@ -680,7 +679,7 @@ void openIniFile(const std::string fileName) { std::string iniFile; #if defined(_WIN32) #if PPSSPP_PLATFORM(UWP) - // Not supported + // Do nothing. #else iniFile = fileName; // Can't rely on a .txt file extension to auto-open in the right editor, diff --git a/Common/LogManager.cpp b/Common/LogManager.cpp index f237de1ca3..2b191c1bf3 100644 --- a/Common/LogManager.cpp +++ b/Common/LogManager.cpp @@ -15,6 +15,8 @@ // Official SVN repository and contact information can be found at // http://code.google.com/p/dolphin-emu/ +#include "ppsspp_config.h" + #include #include "base/logging.h" @@ -31,9 +33,11 @@ const char *hleCurrentThreadName = nullptr; static const char level_to_char[8] = "-NEWIDV"; -// Unfortunately this is quite slow. +#if PPSSPP_PLATFORM(UWP) && defined(_DEBUG) +#define LOG_MSC_OUTPUTDEBUG true +#else #define LOG_MSC_OUTPUTDEBUG false -// #define LOG_MSC_OUTPUTDEBUG true +#endif void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char *file, int line, const char* fmt, ...) { if (!g_Config.bEnableLogging) @@ -106,23 +110,27 @@ LogManager::LogManager() { #endif } - // Remove file logging on small devices + // Remove file logging on small devices in Release mode. +#if PPSSPP_PLATFORM(UWP) + if (IsDebuggerPresent()) + debuggerLog_ = new OutputDebugStringLogListener(); +#else #if !defined(MOBILE_DEVICE) || defined(_DEBUG) fileLog_ = new FileLogListener(""); consoleLog_ = new ConsoleListener(); - debuggerLog_ = new DebuggerLogListener(); -#else - fileLog_ = nullptr; - consoleLog_ = nullptr; - debuggerLog_ = nullptr; +#ifdef _WIN32 + if (IsDebuggerPresent()) + debuggerLog_ = new OutputDebugStringLogListener(); +#endif #endif ringLog_ = new RingbufferLogListener(); +#endif #if !defined(MOBILE_DEVICE) || defined(_DEBUG) AddListener(fileLog_); AddListener(consoleLog_); -#if defined(_MSC_VER) && defined(USING_WIN_UI) - if (IsDebuggerPresent() && debuggerLog_ != NULL && LOG_MSC_OUTPUTDEBUG) +#if defined(_MSC_VER) && (defined(USING_WIN_UI) || PPSSPP_PLATFORM(UWP)) + if (IsDebuggerPresent() && debuggerLog_ && LOG_MSC_OUTPUTDEBUG) AddListener(debuggerLog_); #endif AddListener(ringLog_); @@ -288,7 +296,7 @@ void FileLogListener::Log(const LogMessage &message) { m_logfile << message.header << " " << message.msg << std::flush; } -void DebuggerLogListener::Log(const LogMessage &message) { +void OutputDebugStringLogListener::Log(const LogMessage &message) { #if _MSC_VER OutputDebugStringUTF8(message.msg.c_str()); #endif diff --git a/Common/LogManager.h b/Common/LogManager.h index d9d37166f1..f5fbd3c9d5 100644 --- a/Common/LogManager.h +++ b/Common/LogManager.h @@ -17,6 +17,8 @@ #pragma once +#include "ppsspp_config.h" + #include #include @@ -64,7 +66,7 @@ private: bool m_enable; }; -class DebuggerLogListener : public LogListener { +class OutputDebugStringLogListener : public LogListener { public: void Log(const LogMessage &msg); }; @@ -102,6 +104,20 @@ struct LogChannel { class ConsoleListener; class LogManager : NonCopyable { +private: + LogManager(); + ~LogManager(); + + LogChannel log_[LogTypes::NUMBER_OF_LOGS]; + FileLogListener *fileLog_ = nullptr; + ConsoleListener *consoleLog_ = nullptr; + OutputDebugStringLogListener *debuggerLog_ = nullptr; + RingbufferLogListener *ringLog_ = nullptr; + static LogManager *logManager_; // Singleton. Ugh. + + std::mutex log_lock_; + std::mutex listeners_lock_; + std::vector listeners_; public: void AddListener(LogListener *listener); void RemoveListener(LogListener *listener); @@ -139,7 +155,7 @@ public: return consoleLog_; } - DebuggerLogListener *GetDebuggerListener() const { + OutputDebugStringLogListener *GetDebuggerListener() const { return debuggerLog_; } @@ -160,21 +176,6 @@ public: void ChangeFileLog(const char *filename); - void SaveConfig(IniFile::Section *section); - void LoadConfig(IniFile::Section *section, bool debugDefaults); - -private: - LogChannel log_[LogTypes::NUMBER_OF_LOGS]; - FileLogListener *fileLog_; - ConsoleListener *consoleLog_; - DebuggerLogListener *debuggerLog_; - RingbufferLogListener *ringLog_; - static LogManager *logManager_; // Singleton. Ugh. - std::mutex log_lock_; - - std::mutex listeners_lock_; - std::vector listeners_; - - LogManager(); - ~LogManager(); + void SaveConfig(IniFile::Section *section); + void LoadConfig(IniFile::Section *section, bool debugDefaults); }; diff --git a/Common/MemArenaWin32.cpp b/Common/MemArenaWin32.cpp index 3a22197127..437bfd33d9 100644 --- a/Common/MemArenaWin32.cpp +++ b/Common/MemArenaWin32.cpp @@ -29,8 +29,12 @@ size_t MemArena::roundup(size_t x) { } void MemArena::GrabLowMemSpace(size_t size) { +#if !PPSSPP_PLATFORM(UWP) hMemoryMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, (DWORD)(size), NULL); GetSystemInfo(&sysInfo); +#else + hMemoryMapping = 0; +#endif } void MemArena::ReleaseSpace() { @@ -38,13 +42,13 @@ void MemArena::ReleaseSpace() { hMemoryMapping = 0; } -void *MemArena::CreateView(s64 offset, size_t size, void *base) { +void *MemArena::CreateView(s64 offset, size_t size, void *viewbase) { size = roundup(size); #if PPSSPP_PLATFORM(UWP) - // TODO - void *ptr = nullptr; + // We just grabbed some RAM before using RESERVE. This commits it. + void *ptr = VirtualAllocFromApp(viewbase, size, MEM_COMMIT, PAGE_READWRITE); #else - void *ptr = MapViewOfFileEx(hMemoryMapping, FILE_MAP_ALL_ACCESS, 0, (DWORD)((u64)offset), size, base); + void *ptr = MapViewOfFileEx(hMemoryMapping, FILE_MAP_ALL_ACCESS, 0, (DWORD)((u64)offset), size, viewbase); #endif return ptr; } diff --git a/Common/MemoryUtil.cpp b/Common/MemoryUtil.cpp index d424dd59bd..d1c41c85cd 100644 --- a/Common/MemoryUtil.cpp +++ b/Common/MemoryUtil.cpp @@ -16,6 +16,7 @@ // http://code.google.com/p/dolphin-emu/ #include "ppsspp_config.h" + #include "Common.h" #include "MemoryUtil.h" #include "StringUtils.h" @@ -280,7 +281,7 @@ void FreeAlignedMemory(void* ptr) { bool PlatformIsWXExclusive() { // Only iOS really needs this mode currently. Even without block linking, still should be much faster than IR JIT. // This might also come in useful for UWP (Universal Windows Platform) if I'm understanding things correctly. -#ifdef IOS +#if defined(IOS) || PPSSPP_PLATFORM(UWP) return true; #else // Returning true here lets you test the W^X path on Windows and other non-W^X platforms. @@ -302,11 +303,20 @@ bool ProtectMemoryPages(const void* ptr, size_t size, uint32_t memProtFlags) { // mprotect does not seem to, at least not on Android unless I made a mistake somewhere, so we manually round. #ifdef _WIN32 uint32_t protect = ConvertProtFlagsWin32(memProtFlags); + +#if PPSSPP_PLATFORM(UWP) + DWORD oldValue; + if (!VirtualProtectFromApp((void *)ptr, size, protect, &oldValue)) { + PanicAlert("WriteProtectMemory failed!\n%s", GetLastErrorMsg()); + return false; + } +#else DWORD oldValue; if (!VirtualProtect((void *)ptr, size, protect, &oldValue)) { PanicAlert("WriteProtectMemory failed!\n%s", GetLastErrorMsg()); return false; } +#endif return true; #else uint32_t protect = ConvertProtFlagsUnix(memProtFlags); diff --git a/Common/ThreadPools.cpp b/Common/ThreadPools.cpp index b5f04d975e..53bfe12dfa 100644 --- a/Common/ThreadPools.cpp +++ b/Common/ThreadPools.cpp @@ -16,4 +16,3 @@ void GlobalThreadPool::Inititialize() { initialized = true; } } - diff --git a/Common/stdafx.h b/Common/stdafx.h index 463ad8211d..037c0bd0a5 100644 --- a/Common/stdafx.h +++ b/Common/stdafx.h @@ -21,15 +21,17 @@ #ifndef _WIN32_WINNT #if _MSC_VER < 1700 -#define _WIN32_WINNT 0x501 // Compile for XP on Visual Studio 2010 and below +#error You need a newer version of Visual Studio. #else -#define _WIN32_WINNT 0x600 // Compile for Vista on Visual Studio 2012 and above -#endif // #if _MSC_VER < 1700 +#define _WIN32_WINNT 0x600 +#endif #endif // #ifndef _WIN32_WINNT +#undef WINVER +#define WINVER 0x0600 #ifndef _WIN32_IE -#define _WIN32_IE 0x0500 // Default value is 0x0400 +#define _WIN32_IE 0x0600 // Default value is 0x0400 #endif #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers diff --git a/Core/CwCheat.cpp b/Core/CwCheat.cpp index f137b65067..7b17019560 100644 --- a/Core/CwCheat.cpp +++ b/Core/CwCheat.cpp @@ -155,7 +155,6 @@ void CWCheatEngine::CreateCheatFile() { I18NCategory *err = GetI18NCategory("Error"); host->NotifyUserMessage(err->T("Unable to create cheat file, disk may be full")); } - } } diff --git a/Core/FileSystems/BlockDevices.cpp b/Core/FileSystems/BlockDevices.cpp index 38dbc9dd10..34b5dca5f4 100644 --- a/Core/FileSystems/BlockDevices.cpp +++ b/Core/FileSystems/BlockDevices.cpp @@ -36,12 +36,12 @@ BlockDevice *constructBlockDevice(FileLoader *fileLoader) { // Check for CISO if (!fileLoader->Exists()) return nullptr; - char buffer[4]; + char buffer[4]{}; size_t size = fileLoader->ReadAt(0, 1, 4, buffer); fileLoader->Seek(0); - if (!memcmp(buffer, "CISO", 4) && size == 4) + if (size == 4 && !memcmp(buffer, "CISO", 4)) return new CISOFileBlockDevice(fileLoader); - else if (!memcmp(buffer, "\x00PBP", 4) && size == 4) + else if (size == 4 && !memcmp(buffer, "\x00PBP", 4)) return new NPDRMDemoBlockDevice(fileLoader); else return new FileBlockDevice(fileLoader); diff --git a/Core/FileSystems/ISOFileSystem.cpp b/Core/FileSystems/ISOFileSystem.cpp index f341f48c1a..8b7ace7a0f 100644 --- a/Core/FileSystems/ISOFileSystem.cpp +++ b/Core/FileSystems/ISOFileSystem.cpp @@ -187,7 +187,7 @@ ISOFileSystem::ISOFileSystem(IHandleAllocator *_hAlloc, BlockDevice *_blockDevic treeroot->valid = false; if (memcmp(desc.cd001, "CD001", 5)) { - ERROR_LOG(FILESYS, "ISO looks bogus? Giving up..."); + ERROR_LOG(FILESYS, "ISO looks bogus, expected CD001 signature not present? Giving up..."); return; } diff --git a/Core/FileSystems/VirtualDiscFileSystem.cpp b/Core/FileSystems/VirtualDiscFileSystem.cpp index 9992cf7179..5d555e4adc 100644 --- a/Core/FileSystems/VirtualDiscFileSystem.cpp +++ b/Core/FileSystems/VirtualDiscFileSystem.cpp @@ -809,11 +809,16 @@ void VirtualDiscFileSystem::HandlerLogger(void *arg, HandlerHandle handle, LogTy } VirtualDiscFileSystem::Handler::Handler(const char *filename, VirtualDiscFileSystem *const sys) { -#if !PPSSPP_PLATFORM(UWP) #ifdef _WIN32 +#if PPSSPP_PLATFORM(UWP) +#define dlopen(name, ignore) (void *)LoadPackagedLibrary(ConvertUTF8ToWString(name).c_str(), 0) +#define dlsym(mod, name) GetProcAddress((HMODULE)mod, name) +#define dlclose(mod) FreeLibrary((HMODULE)mod) +#else #define dlopen(name, ignore) (void *)LoadLibrary(ConvertUTF8ToWString(name).c_str()) #define dlsym(mod, name) GetProcAddress((HMODULE)mod, name) #define dlclose(mod) FreeLibrary((HMODULE)mod) +#endif #endif library = dlopen(filename, RTLD_LOCAL | RTLD_NOW); @@ -842,7 +847,6 @@ VirtualDiscFileSystem::Handler::Handler(const char *filename, VirtualDiscFileSys #undef dlsym #undef dlclose #endif -#endif } VirtualDiscFileSystem::Handler::~Handler() { diff --git a/Core/HLE/__sceAudio.cpp b/Core/HLE/__sceAudio.cpp index f0c7051d78..1254fb221e 100644 --- a/Core/HLE/__sceAudio.cpp +++ b/Core/HLE/__sceAudio.cpp @@ -407,7 +407,7 @@ void __AudioUpdate() { // numFrames is number of stereo frames. // This is called from *outside* the emulator thread. int __AudioMix(short *outstereo, int numFrames, int sampleRate) { - return resampler.Mix(outstereo, numFrames, false, sampleRate); + return resampler.Mix(outstereo, numFrames, false, sampleRate); } const AudioDebugStats *__AudioGetDebugStats() { diff --git a/Core/HLE/sceAtrac.cpp b/Core/HLE/sceAtrac.cpp index bb4151c669..bef952a7e8 100644 --- a/Core/HLE/sceAtrac.cpp +++ b/Core/HLE/sceAtrac.cpp @@ -434,11 +434,11 @@ struct Atrac { PSPPointer context_; #ifdef USE_FFMPEG - AVCodecContext *codecCtx_; - SwrContext *swrCtx_; - AVFrame *frame_; + AVCodecContext *codecCtx_ = nullptr; + SwrContext *swrCtx_ = nullptr; + AVFrame *frame_ = nullptr; + AVPacket *packet_ = nullptr; #endif // USE_FFMPEG - AVPacket *packet_; #ifdef USE_FFMPEG void ReleaseFFMPEGContext() { @@ -470,10 +470,10 @@ struct Atrac { void ForceSeekToSample(int sample) { #ifdef USE_FFMPEG avcodec_flush_buffers(codecCtx_); -#endif // Discard any pending packet data. packet_->size = 0; +#endif currentSample_ = sample; } @@ -483,6 +483,7 @@ struct Atrac { } void SeekToSample(int sample) { +#ifdef USE_FFMPEG // Discard any pending packet data. packet_->size = 0; @@ -491,7 +492,6 @@ struct Atrac { const u32 unalignedSamples = (offsetSamples + sample) % SamplesPerFrame(); int seekFrame = sample + offsetSamples - unalignedSamples; -#ifdef USE_FFMPEG if ((sample != currentSample_ || sample == 0) && codecCtx_ != nullptr) { // Prefill the decode buffer with packets before the first sample offset. avcodec_flush_buffers(codecCtx_); @@ -524,10 +524,10 @@ struct Atrac { if (off < first_.size) { #ifdef USE_FFMPEG av_init_packet(packet_); -#endif // USE_FFMPEG packet_->data = BufferStart() + off; packet_->size = std::min((u32)bytesPerFrame_, first_.size - off); packet_->pos = off; +#endif // USE_FFMPEG return true; } else { @@ -540,11 +540,11 @@ struct Atrac { bool FillLowLevelPacket(u8 *ptr) { #ifdef USE_FFMPEG av_init_packet(packet_); -#endif // USE_FFMPEG packet_->data = ptr; packet_->size = bytesPerFrame_; packet_->pos = 0; +#endif // USE_FFMPEG return true; } diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 5f06011f0d..290c2f5950 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -291,13 +291,11 @@ void __DisplayDoState(PointerWrap &p) { // Maybe a bit tricky to move at this point, though... gstate_c.DoState(p); -#ifndef _XBOX if (s < 2) { // This shouldn't have been savestated anyway, but it was. // It's unlikely to overlap with the first value in gpuStats. p.ExpectVoid(&gl_extensions.gpuVendor, sizeof(gl_extensions.gpuVendor)); } -#endif if (s < 6) { GPUStatistics_v0 oldStats; p.Do(oldStats); diff --git a/Core/Loaders.cpp b/Core/Loaders.cpp index b406d421b6..20b7c5e346 100644 --- a/Core/Loaders.cpp +++ b/Core/Loaders.cpp @@ -35,9 +35,21 @@ #include "Core/ELF/PBPReader.h" #include "Core/ELF/ParamSFO.h" +static std::map> factories; + +void RegisterFileLoaderFactory(std::string prefix, std::unique_ptr factory) { + factories[prefix] = std::move(factory); +} + FileLoader *ConstructFileLoader(const std::string &filename) { if (filename.find("http://") == 0 || filename.find("https://") == 0) return new CachingFileLoader(new DiskCachingFileLoader(new RetryingFileLoader(new HTTPFileLoader(filename)))); + + for (auto &iter : factories) { + if (startsWith(iter.first, filename)) { + return iter.second->ConstructFileLoader(filename); + } + } return new LocalFileLoader(filename); } diff --git a/Core/Loaders.h b/Core/Loaders.h index 9cc45ca1f9..e6678c0bd0 100644 --- a/Core/Loaders.h +++ b/Core/Loaders.h @@ -18,6 +18,9 @@ #pragma once #include +#include + +#include "Common/CommonTypes.h" enum class IdentifiedFileType { ERROR_IDENTIFYING, @@ -46,7 +49,7 @@ enum class IdentifiedFileType { PSP_SAVEDATA_DIRECTORY, PPSSPP_SAVESTATE, - UNKNOWN + UNKNOWN, }; class FileLoader { @@ -100,5 +103,11 @@ std::string ResolvePBPFile(const std::string &filename); IdentifiedFileType Identify_File(FileLoader *fileLoader); +class FileLoaderFactory { +public: + virtual FileLoader *ConstructFileLoader(const std::string &filename) = 0; +}; +void RegisterFileLoaderFactory(std::string name, std::unique_ptr factory); + // Can modify the string filename, as it calls IdentifyFile above. bool LoadFile(FileLoader **fileLoaderPtr, std::string *error_string); diff --git a/Core/MIPS/ARM/ArmAsm.cpp b/Core/MIPS/ARM/ArmAsm.cpp index e657bad925..b32d39ef78 100644 --- a/Core/MIPS/ARM/ArmAsm.cpp +++ b/Core/MIPS/ARM/ArmAsm.cpp @@ -57,6 +57,7 @@ extern volatile CoreState coreState; void ShowPC(u32 sp) { ERROR_LOG(JIT, "ShowPC : %08x ArmSP : %08x", currentMIPS->pc, sp); + // Sleep(1); } void DisassembleArm(const u8 *data, int size); diff --git a/Core/MIPS/ARM/ArmCompVFPU.cpp b/Core/MIPS/ARM/ArmCompVFPU.cpp index 853c14305c..a56982a0fb 100644 --- a/Core/MIPS/ARM/ArmCompVFPU.cpp +++ b/Core/MIPS/ARM/ArmCompVFPU.cpp @@ -2171,6 +2171,10 @@ namespace MIPSComp DISABLE; } +#if PPSSPP_ARCH(ARM_HARDFP) + DISABLE; +#endif + int vd = _VD; int vs = _VS; diff --git a/Core/MIPS/ARM/ArmJit.cpp b/Core/MIPS/ARM/ArmJit.cpp index fe07231f48..cdd19dbc70 100644 --- a/Core/MIPS/ARM/ArmJit.cpp +++ b/Core/MIPS/ARM/ArmJit.cpp @@ -83,7 +83,7 @@ ArmJit::ArmJit(MIPSState *mips) : blocks(mips, this), gpr(mips, &js, &jo), fpr(m AllocCodeSpace(1024 * 1024 * 16); // 32MB is the absolute max because that's what an ARM branch instruction can reach, backwards and forwards. GenerateFixedCode(); - INFO_LOG(JIT, "ARM JIT initialized: %d MB of code space", GetSpaceLeft() / 1024 * 1024); + INFO_LOG(JIT, "ARM JIT initialized: %d MB of code space", GetSpaceLeft() / (1024 * 1024)); js.startDefaultPrefix = mips_->HasDefaultPrefix(); } @@ -197,6 +197,18 @@ void ArmJit::CompileDelaySlot(int flags) void ArmJit::Compile(u32 em_address) { PROFILE_THIS_SCOPE("jitc"); + +#if PPSSPP_PLATFORM(UWP) + // INFO_LOG(JIT, "Compiling at %08x", em_address); + // Unfortunately Microsoft forgot to expose FlushInstructionCache to UWP applications... even though they expose + // the ability to generate code :( This works great on x86 but on ARM we're out of luck. + // This seems to be enough to flush the instruction cache: + // If this OutputDebugStringUTF8 is not called, we crash. + // But it only helps if the debugger is attached :( If not, we still crash. + // So really, the JIT is broken on Windows UWP ARM. + OutputDebugStringUTF8("JITHACK"); +#endif + if (GetSpaceLeft() < 0x10000 || blocks.IsFull()) { ClearCache(); } diff --git a/Core/MIPS/x86/Asm.cpp b/Core/MIPS/x86/Asm.cpp index e0134518b3..abf5ff452a 100644 --- a/Core/MIPS/x86/Asm.cpp +++ b/Core/MIPS/x86/Asm.cpp @@ -170,8 +170,11 @@ void Jit::GenerateFixedCode(JitOptions &jo) { MOV(32, R(EAX), M(&mips_->pc)); dispatcherInEAXNoCheck = GetCodePtr(); -#ifdef _M_IX86 +#ifdef MASKED_PSP_MEMORY AND(32, R(EAX), Imm32(Memory::MEMVIEW32_MASK)); +#endif + +#ifdef _M_IX86 _assert_msg_(CPU, Memory::base != 0, "Memory base bogus"); MOV(32, R(EAX), MDisp(EAX, (u32)Memory::base)); #elif _M_X64 diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index 50a9a01c2a..8085a0f445 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -314,7 +314,7 @@ void Jit::Comp_SVQ(MIPSOpcode op) GetVectorRegs(vregs, V_Quad, vt); MOV(32, R(EAX), gpr.R(rs)); ADD(32, R(EAX), Imm32(imm)); -#ifdef _M_IX86 +#ifdef MASKED_PSP_MEMORY AND(32, R(EAX), Imm32(Memory::MEMVIEW32_MASK)); #endif MOV(32, R(ECX), R(EAX)); diff --git a/Core/MIPS/x86/JitSafeMem.cpp b/Core/MIPS/x86/JitSafeMem.cpp index 95f74ad358..fb3aeaa5d4 100644 --- a/Core/MIPS/x86/JitSafeMem.cpp +++ b/Core/MIPS/x86/JitSafeMem.cpp @@ -16,6 +16,7 @@ // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. #include "ppsspp_config.h" + #if PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64) #include "Core/Config.h" @@ -84,11 +85,15 @@ bool JitSafeMem::PrepareWrite(OpArg &dest, int size) if (ImmValid()) { MemCheckImm(MEM_WRITE); + u32 addr = (iaddr_ & alignMask_); +#ifdef MASKED_PSP_MEMORY + addr &= Memory::MEMVIEW32_MASK; +#endif -#ifdef _M_IX86 - dest = M(Memory::base + (iaddr_ & Memory::MEMVIEW32_MASK & alignMask_)); +#if PPSSPP_ARCH(32BIT) + dest = M(Memory::base + addr); #else - dest = MDisp(MEMBASEREG, iaddr_ & alignMask_); + dest = MDisp(MEMBASEREG, addr); #endif return true; } @@ -109,11 +114,15 @@ bool JitSafeMem::PrepareRead(OpArg &src, int size) if (ImmValid()) { MemCheckImm(MEM_READ); + u32 addr = (iaddr_ & alignMask_); +#ifdef MASKED_PSP_MEMORY + addr &= Memory::MEMVIEW32_MASK; +#endif -#ifdef _M_IX86 - src = M(Memory::base + (iaddr_ & Memory::MEMVIEW32_MASK & alignMask_)); +#if PPSSPP_ARCH(32BIT) + src = M(Memory::base + addr); #else - src = MDisp(MEMBASEREG, iaddr_ & alignMask_); + src = MDisp(MEMBASEREG, addr); #endif return true; } @@ -130,9 +139,12 @@ OpArg JitSafeMem::NextFastAddress(int suboffset) if (iaddr_ != (u32) -1) { u32 addr = (iaddr_ + suboffset) & alignMask_; +#ifdef MASKED_PSP_MEMORY + addr &= Memory::MEMVIEW32_MASK; +#endif -#ifdef _M_IX86 - return M(Memory::base + (addr & Memory::MEMVIEW32_MASK)); +#if PPSSPP_ARCH(32BIT) + return M(Memory::base + addr); #else return MDisp(MEMBASEREG, addr); #endif @@ -140,7 +152,7 @@ OpArg JitSafeMem::NextFastAddress(int suboffset) _dbg_assert_msg_(JIT, (suboffset & alignMask_) == suboffset, "suboffset must be aligned"); -#ifdef _M_IX86 +#if PPSSPP_ARCH(32BIT) return MDisp(xaddr_, (u32) Memory::base + offset_ + suboffset); #else return MComplex(MEMBASEREG, xaddr_, SCALE_1, offset_ + suboffset); @@ -152,7 +164,7 @@ OpArg JitSafeMem::PrepareMemoryOpArg(MemoryOpType type) // We may not even need to move into EAX as a temporary. bool needTemp = alignMask_ != 0xFFFFFFFF; -#ifdef _M_IX86 +#ifdef MASKED_PSP_MEMORY bool needMask = true; // raddr_ != MIPS_REG_SP; // Commented out this speedhack due to low impact // We always mask on 32 bit in fast memory mode. needTemp = needTemp || (fast_ && needMask); @@ -184,7 +196,7 @@ OpArg JitSafeMem::PrepareMemoryOpArg(MemoryOpType type) } else { -#ifdef _M_IX86 +#ifdef MASKED_PSP_MEMORY if (needMask) { jit_->AND(32, R(EAX), Imm32(Memory::MEMVIEW32_MASK)); } @@ -200,7 +212,7 @@ OpArg JitSafeMem::PrepareMemoryOpArg(MemoryOpType type) jit_->SUB(32, R(xaddr_), Imm32(offset_)); } -#ifdef _M_IX86 +#if PPSSPP_ARCH(32BIT) return MDisp(xaddr_, (u32) Memory::base + offset_); #else return MComplex(MEMBASEREG, xaddr_, SCALE_1, offset_); @@ -249,7 +261,7 @@ void JitSafeMem::DoSlowWrite(const void *safeFunc, const OpArg& src, int suboffs jit_->AND(32, R(EAX), Imm32(alignMask_)); } -#ifdef _M_IX86 +#if PPSSPP_ARCH(32BIT) jit_->PUSH(EDX); #endif if (!src.IsSimpleReg(EDX)) { @@ -260,7 +272,7 @@ void JitSafeMem::DoSlowWrite(const void *safeFunc, const OpArg& src, int suboffs } // This is a special jit-ABI'd function. jit_->CALL(safeFunc); -#ifdef _M_IX86 +#if PPSSPP_ARCH(32BIT) jit_->POP(EDX); #endif needsCheck_ = true; @@ -449,7 +461,7 @@ void JitSafeMemFuncs::CreateReadFunc(int bits, const void *fallbackFunc) { CheckDirectEAX(); // Since we were CALLed, we need to align the stack before calling C++. -#ifdef _M_IX86 +#if PPSSPP_ARCH(32BIT) SUB(32, R(ESP), Imm8(16 - 4)); ABI_CallFunctionA(thunks_->ProtectFunction(fallbackFunc, 1), R(EAX)); ADD(32, R(ESP), Imm8(16 - 4)); @@ -463,7 +475,7 @@ void JitSafeMemFuncs::CreateReadFunc(int bits, const void *fallbackFunc) { StartDirectAccess(); -#ifdef _M_IX86 +#if PPSSPP_ARCH(32BIT) MOVZX(32, bits, EAX, MDisp(EAX, (u32)Memory::base)); #else MOVZX(32, bits, EAX, MRegSum(MEMBASEREG, EAX)); @@ -476,7 +488,7 @@ void JitSafeMemFuncs::CreateWriteFunc(int bits, const void *fallbackFunc) { CheckDirectEAX(); // Since we were CALLed, we need to align the stack before calling C++. -#ifdef _M_IX86 +#if PPSSPP_ARCH(32BIT) // 4 for return, 4 for saved reg on stack. SUB(32, R(ESP), Imm8(16 - 4 - 4)); ABI_CallFunctionAA(thunks_->ProtectFunction(fallbackFunc, 2), R(EDX), R(EAX)); @@ -491,7 +503,7 @@ void JitSafeMemFuncs::CreateWriteFunc(int bits, const void *fallbackFunc) { StartDirectAccess(); -#ifdef _M_IX86 +#if PPSSPP_ARCH(32BIT) MOV(bits, MDisp(EAX, (u32)Memory::base), R(EDX)); #else MOV(bits, MRegSum(MEMBASEREG, EAX), R(EDX)); diff --git a/Core/MemMap.cpp b/Core/MemMap.cpp index 923fcfedc0..6f324e6e3c 100644 --- a/Core/MemMap.cpp +++ b/Core/MemMap.cpp @@ -17,6 +17,10 @@ #include "ppsspp_config.h" +#if PPSSPP_PLATFORM(UWP) +#include "Common/CommonWindows.h" +#endif + #include #include @@ -152,7 +156,7 @@ static bool Memory_TryBase(u32 flags) { if (view.flags & MV_MIRROR_PREVIOUS) { position = last_position; } -#if PPSSPP_ARCH(64BIT) +#ifndef MASKED_PSP_MEMORY *view.out_ptr = (u8*)g_arena.CreateView( position, view.size, base + view.virtual_address); if (!*view.out_ptr) { @@ -177,7 +181,6 @@ static bool Memory_TryBase(u32 flags) { } return true; - bail: // Argh! ERROR! Free what we grabbed so far so we can try again. for (int j = 0; j <= i; j++) { @@ -195,6 +198,11 @@ bail: } bool MemoryMap_Setup(u32 flags) { +#if PPSSPP_PLATFORM(UWP) + // We reserve the memory, then simply commit in TryBase. + base = (u8*)VirtualAllocFromApp(0, 0x10000000, MEM_RESERVE, PAGE_READWRITE); +#else + // Figure out how much memory we need to allocate in total. size_t total_mem = 0; for (int i = 0; i < num_views; i++) { @@ -207,6 +215,7 @@ bool MemoryMap_Setup(u32 flags) { // Grab some pagefile backed memory out of the void ... g_arena.GrabLowMemSpace(total_mem); +#endif #if !PPSSPP_PLATFORM(ANDROID) if (g_arena.NeedsProbing()) { @@ -237,7 +246,9 @@ bool MemoryMap_Setup(u32 flags) { else #endif { +#if !PPSSPP_PLATFORM(UWP) base = g_arena.Find4GBBase(); +#endif } // Should return true... @@ -254,6 +265,10 @@ void MemoryMap_Shutdown(u32 flags) { *views[i].out_ptr = nullptr; } g_arena.ReleaseSpace(); + +#if PPSSPP_PLATFORM(UWP) + VirtualFree(base, 0, MEM_RELEASE); +#endif } void Init() { diff --git a/Core/MemMap.h b/Core/MemMap.h index 1e66e51d97..da7a52ea26 100644 --- a/Core/MemMap.h +++ b/Core/MemMap.h @@ -81,6 +81,12 @@ extern u8 *m_pUncachedRAM; extern u32 g_MemorySize; extern u32 g_PSPModel; +// UWP has such limited memory management that we need to mask +// even in 64-bit mode. +#if PPSSPP_ARCH(32BIT) || PPSSPP_PLATFORM(UWP) +#define MASKED_PSP_MEMORY +#endif + enum { // This may be adjusted by remaster games. @@ -92,7 +98,7 @@ enum SCRATCHPAD_SIZE = 0x00004000, -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY // This wraparound should work for PSP too. MEMVIEW32_MASK = 0x3FFFFFFF, #endif @@ -126,8 +132,7 @@ void Clear(); // False when shutdown has already been called. bool IsActive(); -class MemoryInitedLock -{ +class MemoryInitedLock { public: MemoryInitedLock(); ~MemoryInitedLock(); @@ -156,7 +161,7 @@ u64 Read_U64(const u32 _Address); #endif inline u8* GetPointerUnchecked(const u32 address) { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY return (u8 *)(base + (address & MEMVIEW32_MASK)); #else return (u8 *)(base + address); @@ -174,7 +179,7 @@ void WriteUnchecked_U32(const u32 _Data, const u32 _Address); #else inline u32 ReadUnchecked_U32(const u32 address) { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY return *(u32_le *)(base + (address & MEMVIEW32_MASK)); #else return *(u32_le *)(base + address); @@ -182,7 +187,7 @@ inline u32 ReadUnchecked_U32(const u32 address) { } inline float ReadUnchecked_Float(const u32 address) { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY return *(float *)(base + (address & MEMVIEW32_MASK)); #else return *(float *)(base + address); @@ -190,7 +195,7 @@ inline float ReadUnchecked_Float(const u32 address) { } inline u16 ReadUnchecked_U16(const u32 address) { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY return *(u16_le *)(base + (address & MEMVIEW32_MASK)); #else return *(u16_le *)(base + address); @@ -198,15 +203,15 @@ inline u16 ReadUnchecked_U16(const u32 address) { } inline u8 ReadUnchecked_U8(const u32 address) { -#if PPSSPP_ARCH(32BIT) - return (*(u8 *)(base + (address & MEMVIEW32_MASK))); +#ifdef MASKED_PSP_MEMORY + return (*(u8 *)(base + (address & MEMVIEW32_MASK))); #else return (*(u8 *)(base + address)); #endif } inline void WriteUnchecked_U32(u32 data, u32 address) { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY *(u32_le *)(base + (address & MEMVIEW32_MASK)) = data; #else *(u32_le *)(base + address) = data; @@ -214,7 +219,7 @@ inline void WriteUnchecked_U32(u32 data, u32 address) { } inline void WriteUnchecked_Float(float data, u32 address) { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY *(float *)(base + (address & MEMVIEW32_MASK)) = data; #else *(float *)(base + address) = data; @@ -222,7 +227,7 @@ inline void WriteUnchecked_Float(float data, u32 address) { } inline void WriteUnchecked_U16(u16 data, u32 address) { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY *(u16_le *)(base + (address & MEMVIEW32_MASK)) = data; #else *(u16_le *)(base + address) = data; @@ -230,7 +235,7 @@ inline void WriteUnchecked_U16(u16 data, u32 address) { } inline void WriteUnchecked_U8(u8 data, u32 address) { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY (*(u8 *)(base + (address & MEMVIEW32_MASK))) = data; #else (*(u8 *)(base + address)) = data; @@ -337,7 +342,7 @@ struct PSPPointer inline T &operator*() const { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY return *(T *)(Memory::base + (ptr & Memory::MEMVIEW32_MASK)); #else return *(T *)(Memory::base + ptr); @@ -346,7 +351,7 @@ struct PSPPointer inline T &operator[](int i) const { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY return *((T *)(Memory::base + (ptr & Memory::MEMVIEW32_MASK)) + i); #else return *((T *)(Memory::base + ptr) + i); @@ -355,7 +360,7 @@ struct PSPPointer inline T *operator->() const { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY return (T *)(Memory::base + (ptr & Memory::MEMVIEW32_MASK)); #else return (T *)(Memory::base + ptr); @@ -424,7 +429,7 @@ struct PSPPointer inline operator T*() { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY return (T *)(Memory::base + (ptr & Memory::MEMVIEW32_MASK)); #else return (T *)(Memory::base + ptr); @@ -433,7 +438,7 @@ struct PSPPointer inline operator const T*() const { -#if PPSSPP_ARCH(32BIT) +#ifdef MASKED_PSP_MEMORY return (const T *)(Memory::base + (ptr & Memory::MEMVIEW32_MASK)); #else return (const T *)(Memory::base + ptr); diff --git a/Core/System.cpp b/Core/System.cpp index 8211a675ff..878aa20d2c 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -629,14 +629,12 @@ void InitSysDirectories() { // 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; + // We set g_Config.memStickDirectory outside. #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); @@ -686,6 +684,7 @@ void InitSysDirectories() { // Clean up our mess. if (File::Exists(testFile)) File::Delete(testFile); +#endif // Create the default directories that a real PSP creates. Good for homebrew so they can // expect a standard environment. Skipping THEME though, that's pointless. diff --git a/GPU/Common/ShaderTranslation.cpp b/GPU/Common/ShaderTranslation.cpp index fa153c3b14..40c90fabd1 100644 --- a/GPU/Common/ShaderTranslation.cpp +++ b/GPU/Common/ShaderTranslation.cpp @@ -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" + #if !defined(ANDROID) #include @@ -55,10 +57,15 @@ static EShLanguage GetLanguage(const Draw::ShaderStage stage) { } void ShaderTranslationInit() { + // TODO: We have TLS issues on UWP +#if !PPSSPP_PLATFORM(UWP) glslang::InitializeProcess(); +#endif } void ShaderTranslationShutdown() { +#if !PPSSPP_PLATFORM(UWP) glslang::FinalizeProcess(); +#endif } std::string Preprocess(std::string code, ShaderLanguage lang, Draw::ShaderStage stage) { @@ -167,6 +174,10 @@ bool TranslateShader(std::string *dest, ShaderLanguage destLang, TranslatedShade if (srcLang != GLSL_300 && srcLang != GLSL_140) return false; +#if PPSSPP_PLATFORM(UWP) + return false; +#endif + glslang::TProgram program; const char *shaderStrings[1]; diff --git a/UI/CwCheatScreen.cpp b/UI/CwCheatScreen.cpp index 41fc61819b..891e64cf78 100644 --- a/UI/CwCheatScreen.cpp +++ b/UI/CwCheatScreen.cpp @@ -177,7 +177,11 @@ UI::EventReturn CwCheatScreen::OnEditCheatFile(UI::EventParams ¶ms) { MIPSComp::jit->ClearCache(); } TriggerFinish(DR_OK); +#if PPSSPP_PLATFORM(UWP) + LaunchBrowser(activeCheatFile.c_str()); +#else File::openIniFile(activeCheatFile); +#endif return UI::EVENT_DONE; } diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 19d9c98a01..03f0b01391 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -391,6 +391,12 @@ void SystemInfoScreen::CreateViews() { deviceSpecs->Add(new InfoItem("Memory Page Size", StringFromFormat("%d bytes", GetMemoryProtectPageSize()))); deviceSpecs->Add(new InfoItem("RW/RX exclusive: ", PlatformIsWXExclusive() ? "Yes" : "No")); + const char *build = "Release"; +#ifdef _DEBUG + build = "Debug"; +#endif + deviceSpecs->Add(new InfoItem("PPSSPP build: ", build)); + #ifdef __ANDROID__ deviceSpecs->Add(new ItemHeader("Audio Information")); deviceSpecs->Add(new InfoItem("Sample rate", StringFromFormat("%d Hz", System_GetPropertyInt(SYSPROP_AUDIO_SAMPLE_RATE)))); diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 6ba78a0b47..faa67c5c9c 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -77,6 +77,9 @@ #if !PPSSPP_PLATFORM(UWP) #include "gfx/gl_common.h" #endif +#if !PPSSPP_PLATFORM(UWP) +#include "gfx/gl_common.h" +#endif #ifndef MOBILE_DEVICE AVIDump avi; diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 22f8765395..2e973fe152 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -222,13 +222,15 @@ bool GameInfo::LoadFromPath(const std::string &gamePath) { if (filePath_ != gamePath) { delete fileLoader; fileLoader = ConstructFileLoader(gamePath); + if (!fileLoader) + return false; filePath_ = gamePath; // This is a fallback title, while we're loading / if unable to load. title = File::GetFilename(filePath_); } - return GetFileLoader()->Exists(); + return fileLoader ? fileLoader->Exists() : true; } FileLoader *GameInfo::GetFileLoader() { @@ -413,7 +415,6 @@ public: pbp.GetSubFileAsString(PBP_ICON0_PNG, &info_->iconTextureData); } else { // Read standard icon - DEBUG_LOG(LOADER, "Loading unknown.png because a PBP was missing an icon"); ReadVFSToString("unknown.png", &info_->iconTextureData, &info_->lock); } info_->iconDataLoaded = true; @@ -531,6 +532,9 @@ handleELF: // Let's assume it's an ISO. // TODO: This will currently read in the whole directory tree. Not really necessary for just a // few files. + FileLoader *fl = info_->GetFileLoader(); + if (!fl) + return; // Happens with UWP currently, TODO... BlockDevice *bd = constructBlockDevice(info_->GetFileLoader()); if (!bd) return; // nothing to do here.. diff --git a/UI/GamepadEmu.cpp b/UI/GamepadEmu.cpp index 577185e26f..62dddc9788 100644 --- a/UI/GamepadEmu.cpp +++ b/UI/GamepadEmu.cpp @@ -620,11 +620,6 @@ UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause) { const int roundImage = g_Config.iTouchButtonStyle ? I_ROUND_LINE : I_ROUND; - // These platforms always need the pause menu button to be shown. -#if defined(IOS) - root->Add(new BoolButton(pause, roundImage, I_ARROW, 1.0f, new AnchorLayoutParams(halfW, 20, NONE, NONE, true)))->SetAngle(90); -#endif - if (g_Config.bShowTouchControls) { const int rectImage = g_Config.iTouchButtonStyle ? I_RECT_LINE : I_RECT; const int shoulderImage = g_Config.iTouchButtonStyle ? I_SHOULDER_LINE : I_SHOULDER; @@ -633,10 +628,10 @@ UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause) { const int stickBg = g_Config.iTouchButtonStyle ? I_STICK_BG_LINE : I_STICK_BG; static const int comboKeyImages[5] = { I_1, I_2, I_3, I_4, I_5 }; -#if !defined(IOS) - if (g_Config.bShowTouchPause) + if (!System_GetPropertyInt(SYSPROP_HAS_BACK_BUTTON)) { root->Add(new BoolButton(pause, roundImage, I_ARROW, 1.0f, new AnchorLayoutParams(halfW, 20, NONE, NONE, true)))->SetAngle(90); -#endif + } + if (g_Config.bShowTouchCircle) root->Add(new PSPButton(CTRL_CIRCLE, roundImage, I_CIRCLE, Action_button_scale, new AnchorLayoutParams(Action_circle_button_X, Action_circle_button_Y, NONE, NONE, true))); @@ -685,6 +680,12 @@ UI::ViewGroup *CreatePadLayout(float xres, float yres, bool *pause) { if (g_Config.bShowComboKey4) root->Add(new ComboKey(g_Config.iCombokey4, roundImage, comboKeyImages[4], combo4_key_scale, new AnchorLayoutParams(combo4_key_X, combo4_key_Y, NONE, NONE, true))); } + else { + // If there's no hardware back button (or ESC key), add a soft button. + if (!System_GetPropertyInt(SYSPROP_HAS_BACK_BUTTON)) { + root->Add(new BoolButton(pause, roundImage, I_ARROW, 1.0f, new AnchorLayoutParams(halfW, 20, NONE, NONE, true)))->SetAngle(90); + } + } return root; } diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 338429431f..23411e9108 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -18,6 +18,7 @@ #include #include +#include "ppsspp_config.h" #include "base/colorutil.h" #include "base/display.h" #include "base/timeutil.h" @@ -857,8 +858,12 @@ void MainScreen::CreateViews() { gold->OnClick.Handle(this, &MainScreen::OnSupport); gold->SetIcon(I_ICONGOLD); #endif + +#if !PPSSPP_PLATFORM(UWP) + // Having an exit button is against UWP guidelines. rightColumnItems->Add(new Spacer(25.0)); rightColumnItems->Add(new Choice(mm->T("Exit")))->OnClick.Handle(this, &MainScreen::OnExit); +#endif if (vertical) { root_ = new LinearLayout(ORIENT_VERTICAL); @@ -972,6 +977,8 @@ UI::EventReturn MainScreen::OnLoadFile(UI::EventParams &e) { g_Config.Save(); screenManager()->switchScreen(new EmuScreen(fileName.toStdString())); } +#elif PPSSPP_PLATFORM(UWP) + System_SendMessage("browse_file", ""); #elif defined(USING_WIN_UI) MainWindow::BrowseAndBoot(""); #endif diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index e42f4a7f2a..94df7cbd94 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -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 #include @@ -482,7 +484,8 @@ void LogoScreen::render() { dc.DrawTextShadow(boot_filename.c_str(), bounds.centerX(), bounds.centerY() + 180, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER); } -#ifdef _WIN32 +#if defined(_WIN32) && !PPSSPP_PLATFORM(UWP) + // Draw the graphics API, except on UWP where it's always D3D11 dc.DrawText(screenManager()->getDrawContext()->GetInfoString(InfoField::APINAME).c_str(), bounds.centerX(), bounds.y2() - 100, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER); #endif diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 1d205a9fdd..3f8059380a 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -636,7 +636,7 @@ void NativeInitGraphics(GraphicsContext *graphicsContext) { #ifdef _WIN32 winAudioBackend = CreateAudioBackend((AudioBackendType)g_Config.iAudioBackend); #if PPSSPP_PLATFORM(UWP) - // TODO UWP + winAudioBackend->Init(0, &Win32Mix, 44100); #else winAudioBackend->Init(MainWindow::GetHWND(), &Win32Mix, 44100); #endif diff --git a/UWP/.gitignore b/UWP/.gitignore new file mode 100644 index 0000000000..a20501d06d --- /dev/null +++ b/UWP/.gitignore @@ -0,0 +1,6 @@ +# We copy other files on top of these at build time, depending on configuration (Normal/Gold) + +Package.appxmanifest +Assets +x64 +*.VC.db diff --git a/UWP/App.cpp b/UWP/App.cpp new file mode 100644 index 0000000000..5950a5ada2 --- /dev/null +++ b/UWP/App.cpp @@ -0,0 +1,265 @@ +#include "ppsspp_config.h" + +#include "pch.h" +#include "App.h" + +#include + +#include "input/input_state.h" + +#include + +using namespace UWP; + +using namespace concurrency; +using namespace Windows::ApplicationModel; +using namespace Windows::ApplicationModel::Core; +using namespace Windows::ApplicationModel::Activation; +using namespace Windows::UI::Core; +using namespace Windows::UI::Input; +using namespace Windows::System; +using namespace Windows::Foundation; +using namespace Windows::Graphics::Display; + +// The main function is only used to initialize our IFrameworkView class. +[Platform::MTAThread] +int main(Platform::Array^) { + auto direct3DApplicationSource = ref new Direct3DApplicationSource(); + CoreApplication::Run(direct3DApplicationSource); + return 0; +} + +IFrameworkView^ Direct3DApplicationSource::CreateView() { + return ref new App(); +} + +App::App() : + m_windowClosed(false), + m_windowVisible(true) +{ +} + +// The first method called when the IFrameworkView is being created. +void App::Initialize(CoreApplicationView^ applicationView) { + // Register event handlers for app lifecycle. This example includes Activated, so that we + // can make the CoreWindow active and start rendering on the window. + applicationView->Activated += + ref new TypedEventHandler(this, &App::OnActivated); + + CoreApplication::Suspending += + ref new EventHandler(this, &App::OnSuspending); + + CoreApplication::Resuming += + ref new EventHandler(this, &App::OnResuming); + + // At this point we have access to the device. + // We can create the device-dependent resources. + m_deviceResources = std::make_shared(); +} + +// Called when the CoreWindow object is created (or re-created). +void App::SetWindow(CoreWindow^ window) { + window->SizeChanged += + ref new TypedEventHandler(this, &App::OnWindowSizeChanged); + + window->VisibilityChanged += + ref new TypedEventHandler(this, &App::OnVisibilityChanged); + + window->Closed += + ref new TypedEventHandler(this, &App::OnWindowClosed); + + DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); + + currentDisplayInformation->DpiChanged += + ref new TypedEventHandler(this, &App::OnDpiChanged); + + currentDisplayInformation->OrientationChanged += + ref new TypedEventHandler(this, &App::OnOrientationChanged); + + DisplayInformation::DisplayContentsInvalidated += + ref new TypedEventHandler(this, &App::OnDisplayContentsInvalidated); + + window->KeyDown += ref new TypedEventHandler(this, &App::OnKeyDown); + window->KeyUp += ref new TypedEventHandler(this, &App::OnKeyUp); + + window->PointerMoved += ref new TypedEventHandler(this, &App::OnPointerMoved); + window->PointerEntered += ref new TypedEventHandler(this, &App::OnPointerEntered); + window->PointerExited += ref new TypedEventHandler(this, &App::OnPointerExited); + window->PointerPressed += ref new TypedEventHandler(this, &App::OnPointerPressed); + window->PointerReleased += ref new TypedEventHandler(this, &App::OnPointerReleased); + window->PointerCaptureLost += ref new TypedEventHandler(this, &App::OnPointerCaptureLost); + window->PointerWheelChanged += ref new TypedEventHandler(this, &App::OnPointerWheelChanged); + + if (Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) { + m_hardwareButtons.insert(HardwareButton::BACK); + } + + Windows::UI::Core::SystemNavigationManager::GetForCurrentView()-> + BackRequested += ref new Windows::Foundation::EventHandler< + Windows::UI::Core::BackRequestedEventArgs^>( + this, &App::App_BackRequested); + + m_deviceResources->SetWindow(window); +} + +bool App::HasBackButton() { + return m_hardwareButtons.find(HardwareButton::BACK) != m_hardwareButtons.end(); +} + +void App::App_BackRequested(Platform::Object^ sender, Windows::UI::Core::BackRequestedEventArgs^ e) { + e->Handled = m_main->OnHardwareButton(HardwareButton::BACK); +} + +void App::OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args) { + m_main->OnKeyDown(args->KeyStatus.ScanCode, args->VirtualKey, args->KeyStatus.RepeatCount); +} + +void App::OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args) { + m_main->OnKeyUp(args->KeyStatus.ScanCode, args->VirtualKey); +} + +void App::OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { + int pointerId = touchMap_.TouchId(args->CurrentPoint->PointerId); + if (pointerId < 0) + return; + float X = args->CurrentPoint->Position.X; + float Y = args->CurrentPoint->Position.Y; + int64_t timestamp = args->CurrentPoint->Timestamp; + m_main->OnTouchEvent(TOUCH_MOVE, pointerId, X, Y, timestamp); +} + +void App::OnPointerEntered(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { +} + +void App::OnPointerExited(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { +} + +void App::OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { + int pointerId = touchMap_.TouchId(args->CurrentPoint->PointerId); + if (pointerId < 0) + pointerId = touchMap_.AddNewTouch(args->CurrentPoint->PointerId); + + float X = args->CurrentPoint->Position.X; + float Y = args->CurrentPoint->Position.Y; + int64_t timestamp = args->CurrentPoint->Timestamp; + m_main->OnTouchEvent(TOUCH_DOWN|TOUCH_MOVE, pointerId, X, Y, timestamp); +#if !PPSSPP_ARCH(ARM) + sender->SetPointerCapture(); +#endif +} + +void App::OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { + int pointerId = touchMap_.RemoveTouch(args->CurrentPoint->PointerId); + if (pointerId < 0) + return; + float X = args->CurrentPoint->Position.X; + float Y = args->CurrentPoint->Position.Y; + int64_t timestamp = args->CurrentPoint->Timestamp; + m_main->OnTouchEvent(TOUCH_UP|TOUCH_MOVE, pointerId, X, Y, timestamp); +#if !PPSSPP_ARCH(ARM) + sender->ReleasePointerCapture(); +#endif +} + +void App::OnPointerCaptureLost(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { +} + +void App::OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { + int pointerId = 0; // irrelevant + float delta = args->CurrentPoint->GetCurrentPoint(args->CurrentPoint->PointerId)->Properties->MouseWheelDelta; + m_main->OnMouseWheel(delta); +} + +// Initializes scene resources, or loads a previously saved app state. +void App::Load(Platform::String^ entryPoint) { + if (m_main == nullptr) { + m_main = std::unique_ptr(new PPSSPP_UWPMain(this, m_deviceResources)); + } +} + +// This method is called after the window becomes active. +void App::Run() { + while (!m_windowClosed) { + if (m_windowVisible) { + CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessAllIfPresent); + if (m_main->Render()) { + m_deviceResources->Present(); + } + } else { + CoreWindow::GetForCurrentThread()->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessOneAndAllPending); + } + } +} + +// Required for IFrameworkView. +// Terminate events do not cause Uninitialize to be called. It will be called if your IFrameworkView +// class is torn down while the app is in the foreground. +void App::Uninitialize() { +} + +// Application lifecycle event handlers. + +void App::OnActivated(CoreApplicationView^ applicationView, IActivatedEventArgs^ args) { + // Run() won't start until the CoreWindow is activated. + CoreWindow::GetForCurrentThread()->Activate(); + // On mobile, we force-enter fullscreen mode. +#ifdef _ARM + Windows::UI::ViewManagement::ApplicationView::GetForCurrentView()->TryEnterFullScreenMode(); +#endif +} + +void App::OnSuspending(Platform::Object^ sender, SuspendingEventArgs^ args) { + // Save app state asynchronously after requesting a deferral. Holding a deferral + // indicates that the application is busy performing suspending operations. Be + // aware that a deferral may not be held indefinitely. After about five seconds, + // the app will be forced to exit. + SuspendingDeferral^ deferral = args->SuspendingOperation->GetDeferral(); + + create_task([this, deferral]() { + m_deviceResources->Trim(); + deferral->Complete(); + }); +} + +void App::OnResuming(Platform::Object^ sender, Platform::Object^ args) { + // Restore any data or state that was unloaded on suspend. By default, data + // and state are persisted when resuming from suspend. Note that this event + // does not occur if the app was previously terminated. + + // Insert your code here. +} + +// Window event handlers. + +void App::OnWindowSizeChanged(CoreWindow^ sender, WindowSizeChangedEventArgs^ args) { + m_deviceResources->SetLogicalSize(Size(sender->Bounds.Width, sender->Bounds.Height)); + m_main->CreateWindowSizeDependentResources(); +} + +void App::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEventArgs^ args) { + m_windowVisible = args->Visible; +} + +void App::OnWindowClosed(CoreWindow^ sender, CoreWindowEventArgs^ args) { + m_windowClosed = true; +} + +// DisplayInformation event handlers. + +void App::OnDpiChanged(DisplayInformation^ sender, Object^ args) { + // Note: The value for LogicalDpi retrieved here may not match the effective DPI of the app + // if it is being scaled for high resolution devices. Once the DPI is set on DeviceResources, + // you should always retrieve it using the GetDpi method. + // See DeviceResources.cpp for more details. + m_deviceResources->SetDpi(sender->LogicalDpi); + m_main->CreateWindowSizeDependentResources(); +} + +void App::OnOrientationChanged(DisplayInformation^ sender, Object^ args) { + m_deviceResources->SetCurrentOrientation(sender->CurrentOrientation); + m_main->CreateWindowSizeDependentResources(); +} + +void App::OnDisplayContentsInvalidated(DisplayInformation^ sender, Object^ args) { + m_deviceResources->ValidateDevice(); +} \ No newline at end of file diff --git a/UWP/App.h b/UWP/App.h new file mode 100644 index 0000000000..d329ac2c20 --- /dev/null +++ b/UWP/App.h @@ -0,0 +1,113 @@ +#pragma once + +#include + +#include "pch.h" +#include "Common/DeviceResources.h" +#include "PPSSPP_UWPMain.h" + +namespace UWP { + struct Touch { + bool inUse = false; + unsigned uid; + }; + + class TouchMapper { + public: + int TouchId(unsigned touch) { + for (int touchIx = 0; touchIx < maxTouches; touchIx++) + if (touches[touchIx].inUse && touches[touchIx].uid == touch) + return touchIx; + return -1; + } + + int AddNewTouch(unsigned touch) { + for (int touchIx = 0; touchIx < maxTouches; touchIx++) { + if (!touches[touchIx].inUse) { + touches[touchIx].inUse = true; + touches[touchIx].uid = touch; + return touchIx; + } + } + return -1; + } + + int RemoveTouch(unsigned touch) { + for (int touchIx = 0; touchIx < maxTouches; touchIx++) { + if (touches[touchIx].inUse && touches[touchIx].uid == touch) { + touches[touchIx].inUse = false; + return touchIx; + } + } + return -1; + } + + private: + enum { maxTouches = 11 }; + Touch touches[maxTouches]{}; + }; + + enum class HardwareButton { + BACK, + }; + + // Main entry point for our app. Connects the app with the Windows shell and handles application lifecycle events. + ref class App sealed : public Windows::ApplicationModel::Core::IFrameworkView { + public: + App(); + + // IFrameworkView Methods. + virtual void Initialize(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView); + virtual void SetWindow(Windows::UI::Core::CoreWindow^ window); + virtual void Load(Platform::String^ entryPoint); + virtual void Run(); + virtual void Uninitialize(); + + bool HasBackButton(); + + protected: + // Application lifecycle event handlers. + void OnActivated(Windows::ApplicationModel::Core::CoreApplicationView^ applicationView, Windows::ApplicationModel::Activation::IActivatedEventArgs^ args); + void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ args); + void OnResuming(Platform::Object^ sender, Platform::Object^ args); + + // Window event handlers. + void OnWindowSizeChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ args); + void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); + void OnWindowClosed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CoreWindowEventArgs^ args); + + // DisplayInformation event handlers. + void OnDpiChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); + void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); + void OnDisplayContentsInvalidated(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); + + // Input + void OnKeyDown(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); + void OnKeyUp(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); + + void OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerEntered(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerExited(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerCaptureLost(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + void OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args); + + void App_BackRequested(Platform::Object^ sender, Windows::UI::Core::BackRequestedEventArgs^ e); + + private: + std::shared_ptr m_deviceResources; + std::set m_hardwareButtons; + std::unique_ptr m_main; + bool m_windowClosed; + bool m_windowVisible; + + TouchMapper touchMap_; + }; +} + +ref class Direct3DApplicationSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource +{ +public: + virtual Windows::ApplicationModel::Core::IFrameworkView^ CreateView(); +}; diff --git a/UWP/AssetsGold/LockScreenLogo.scale-200.png b/UWP/AssetsGold/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..f03796f780 Binary files /dev/null and b/UWP/AssetsGold/LockScreenLogo.scale-200.png differ diff --git a/UWP/AssetsGold/SplashScreen.scale-200.png b/UWP/AssetsGold/SplashScreen.scale-200.png new file mode 100644 index 0000000000..4f2ce38cd3 Binary files /dev/null and b/UWP/AssetsGold/SplashScreen.scale-200.png differ diff --git a/UWP/AssetsGold/Square150x150Logo.scale-200.png b/UWP/AssetsGold/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..4527504979 Binary files /dev/null and b/UWP/AssetsGold/Square150x150Logo.scale-200.png differ diff --git a/UWP/AssetsGold/Square44x44Logo.scale-200.png b/UWP/AssetsGold/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..a5306af93c Binary files /dev/null and b/UWP/AssetsGold/Square44x44Logo.scale-200.png differ diff --git a/UWP/AssetsGold/Square44x44Logo.targetsize-24_altform-unplated.png b/UWP/AssetsGold/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..c8683d2950 Binary files /dev/null and b/UWP/AssetsGold/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/UWP/AssetsGold/StoreLogo.png b/UWP/AssetsGold/StoreLogo.png new file mode 100644 index 0000000000..e1d69c31b1 Binary files /dev/null and b/UWP/AssetsGold/StoreLogo.png differ diff --git a/UWP/AssetsGold/Wide310x150Logo.scale-200.png b/UWP/AssetsGold/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..f158b6982f Binary files /dev/null and b/UWP/AssetsGold/Wide310x150Logo.scale-200.png differ diff --git a/UWP/AssetsNormal/LockScreenLogo.scale-200.png b/UWP/AssetsNormal/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..0e78f4b01b Binary files /dev/null and b/UWP/AssetsNormal/LockScreenLogo.scale-200.png differ diff --git a/UWP/AssetsNormal/SplashScreen.scale-200.png b/UWP/AssetsNormal/SplashScreen.scale-200.png new file mode 100644 index 0000000000..fb75451a3d Binary files /dev/null and b/UWP/AssetsNormal/SplashScreen.scale-200.png differ diff --git a/UWP/AssetsNormal/Square150x150Logo.scale-200.png b/UWP/AssetsNormal/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..92cdf494e4 Binary files /dev/null and b/UWP/AssetsNormal/Square150x150Logo.scale-200.png differ diff --git a/UWP/AssetsNormal/Square44x44Logo.scale-200.png b/UWP/AssetsNormal/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..739503aa2e Binary files /dev/null and b/UWP/AssetsNormal/Square44x44Logo.scale-200.png differ diff --git a/UWP/AssetsNormal/Square44x44Logo.targetsize-24_altform-unplated.png b/UWP/AssetsNormal/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..d88950ecd1 Binary files /dev/null and b/UWP/AssetsNormal/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/UWP/AssetsNormal/StoreLogo.png b/UWP/AssetsNormal/StoreLogo.png new file mode 100644 index 0000000000..a971eb8ca8 Binary files /dev/null and b/UWP/AssetsNormal/StoreLogo.png differ diff --git a/UWP/AssetsNormal/Wide310x150Logo.scale-200.png b/UWP/AssetsNormal/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..297a69de14 Binary files /dev/null and b/UWP/AssetsNormal/Wide310x150Logo.scale-200.png differ diff --git a/UWP/Common/DeviceResources.cpp b/UWP/Common/DeviceResources.cpp new file mode 100644 index 0000000000..fa1e71be5a --- /dev/null +++ b/UWP/Common/DeviceResources.cpp @@ -0,0 +1,670 @@ +#include "pch.h" +#include +#include "DeviceResources.h" +#include "DirectXHelper.h" + +using namespace D2D1; +using namespace DirectX; +using namespace Microsoft::WRL; +using namespace Windows::Foundation; +using namespace Windows::Graphics::Display; +using namespace Windows::UI::Core; +using namespace Windows::UI::Xaml::Controls; +using namespace Platform; + +namespace DisplayMetrics +{ + // High resolution displays can require a lot of GPU and battery power to render. + // High resolution phones, for example, may suffer from poor battery life if + // games attempt to render at 60 frames per second at full fidelity. + // The decision to render at full fidelity across all platforms and form factors + // should be deliberate. + static const bool SupportHighResolutions = true; + + // The default thresholds that define a "high resolution" display. If the thresholds + // are exceeded and SupportHighResolutions is false, the dimensions will be scaled + // by 50%. + static const float DpiThreshold = 192.0f; // 200% of standard desktop display. + static const float WidthThreshold = 1920.0f; // 1080p width. + static const float HeightThreshold = 1080.0f; // 1080p height. +}; + +// Constants used to calculate screen rotations +namespace ScreenRotation +{ + // 0-degree Z-rotation + static const XMFLOAT4X4 Rotation0( + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + // 90-degree Z-rotation + static const XMFLOAT4X4 Rotation90( + 0.0f, 1.0f, 0.0f, 0.0f, + -1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + // 180-degree Z-rotation + static const XMFLOAT4X4 Rotation180( + -1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); + + // 270-degree Z-rotation + static const XMFLOAT4X4 Rotation270( + 0.0f, -1.0f, 0.0f, 0.0f, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f + ); +}; + +// Constructor for DeviceResources. +DX::DeviceResources::DeviceResources() : + m_screenViewport(), + m_d3dFeatureLevel(D3D_FEATURE_LEVEL_9_1), + m_d3dRenderTargetSize(), + m_outputSize(), + m_logicalSize(), + m_nativeOrientation(DisplayOrientations::None), + m_currentOrientation(DisplayOrientations::None), + m_dpi(-1.0f), + m_effectiveDpi(-1.0f), + m_deviceNotify(nullptr) +{ + CreateDeviceIndependentResources(); + CreateDeviceResources(); +} + +// Configures resources that don't depend on the Direct3D device. +void DX::DeviceResources::CreateDeviceIndependentResources() +{ + // Initialize Direct2D resources. + D2D1_FACTORY_OPTIONS options; + ZeroMemory(&options, sizeof(D2D1_FACTORY_OPTIONS)); + +#if defined(_DEBUG) + // If the project is in a debug build, enable Direct2D debugging via SDK Layers. + options.debugLevel = D2D1_DEBUG_LEVEL_INFORMATION; +#endif + + // Initialize the Direct2D Factory. + DX::ThrowIfFailed( + D2D1CreateFactory( + D2D1_FACTORY_TYPE_SINGLE_THREADED, + __uuidof(ID2D1Factory3), + &options, + &m_d2dFactory + ) + ); + + // Initialize the DirectWrite Factory. + DX::ThrowIfFailed( + DWriteCreateFactory( + DWRITE_FACTORY_TYPE_SHARED, + __uuidof(IDWriteFactory3), + &m_dwriteFactory + ) + ); + + // Initialize the Windows Imaging Component (WIC) Factory. + DX::ThrowIfFailed( + CoCreateInstance( + CLSID_WICImagingFactory2, + nullptr, + CLSCTX_INPROC_SERVER, + IID_PPV_ARGS(&m_wicFactory) + ) + ); +} + +// Configures the Direct3D device, and stores handles to it and the device context. +void DX::DeviceResources::CreateDeviceResources() +{ + // This flag adds support for surfaces with a different color channel ordering + // than the API default. It is required for compatibility with Direct2D. + UINT creationFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT; + +#if defined(_DEBUG) + if (DX::SdkLayersAvailable()) + { + // If the project is in a debug build, enable debugging via SDK Layers with this flag. + creationFlags |= D3D11_CREATE_DEVICE_DEBUG; + } +#endif + + // This array defines the set of DirectX hardware feature levels this app will support. + // Note the ordering should be preserved. + // Don't forget to declare your application's minimum required feature level in its + // description. All applications are assumed to support 9.1 unless otherwise stated. + D3D_FEATURE_LEVEL featureLevels[] = + { + D3D_FEATURE_LEVEL_12_1, + D3D_FEATURE_LEVEL_12_0, + D3D_FEATURE_LEVEL_11_1, + D3D_FEATURE_LEVEL_11_0, + D3D_FEATURE_LEVEL_10_1, + D3D_FEATURE_LEVEL_10_0, + D3D_FEATURE_LEVEL_9_3, + D3D_FEATURE_LEVEL_9_2, + D3D_FEATURE_LEVEL_9_1 + }; + + // Create the Direct3D 11 API device object and a corresponding context. + ComPtr device; + ComPtr context; + + HRESULT hr = D3D11CreateDevice( + nullptr, // Specify nullptr to use the default adapter. + D3D_DRIVER_TYPE_HARDWARE, // Create a device using the hardware graphics driver. + 0, // Should be 0 unless the driver is D3D_DRIVER_TYPE_SOFTWARE. + creationFlags, // Set debug and Direct2D compatibility flags. + featureLevels, // List of feature levels this app can support. + ARRAYSIZE(featureLevels), // Size of the list above. + D3D11_SDK_VERSION, // Always set this to D3D11_SDK_VERSION for Windows Store apps. + &device, // Returns the Direct3D device created. + &m_d3dFeatureLevel, // Returns feature level of device created. + &context // Returns the device immediate context. + ); + + if (FAILED(hr)) + { + // If the initialization fails, fall back to the WARP device. + // For more information on WARP, see: + // http://go.microsoft.com/fwlink/?LinkId=286690 + DX::ThrowIfFailed( + D3D11CreateDevice( + nullptr, + D3D_DRIVER_TYPE_WARP, // Create a WARP device instead of a hardware device. + 0, + creationFlags, + featureLevels, + ARRAYSIZE(featureLevels), + D3D11_SDK_VERSION, + &device, + &m_d3dFeatureLevel, + &context + ) + ); + } + + // Store pointers to the Direct3D 11.3 API device and immediate context. + DX::ThrowIfFailed( + device.As(&m_d3dDevice) + ); + + DX::ThrowIfFailed( + context.As(&m_d3dContext) + ); + + // Create the Direct2D device object and a corresponding context. + ComPtr dxgiDevice; + DX::ThrowIfFailed( + m_d3dDevice.As(&dxgiDevice) + ); + + DX::ThrowIfFailed( + m_d2dFactory->CreateDevice(dxgiDevice.Get(), &m_d2dDevice) + ); + + DX::ThrowIfFailed( + m_d2dDevice->CreateDeviceContext( + D2D1_DEVICE_CONTEXT_OPTIONS_NONE, + &m_d2dContext + ) + ); +} + +// These resources need to be recreated every time the window size is changed. +void DX::DeviceResources::CreateWindowSizeDependentResources() +{ + // Clear the previous window size specific context. + ID3D11RenderTargetView* nullViews[] = {nullptr}; + m_d3dContext->OMSetRenderTargets(ARRAYSIZE(nullViews), nullViews, nullptr); + m_d3dRenderTargetView = nullptr; + m_d2dContext->SetTarget(nullptr); + m_d2dTargetBitmap = nullptr; + m_d3dContext->Flush1(D3D11_CONTEXT_TYPE_ALL, nullptr); + + UpdateRenderTargetSize(); + + // The width and height of the swap chain must be based on the window's + // natively-oriented width and height. If the window is not in the native + // orientation, the dimensions must be reversed. + DXGI_MODE_ROTATION displayRotation = ComputeDisplayRotation(); + + bool swapDimensions = displayRotation == DXGI_MODE_ROTATION_ROTATE90 || displayRotation == DXGI_MODE_ROTATION_ROTATE270; + m_d3dRenderTargetSize.Width = swapDimensions ? m_outputSize.Height : m_outputSize.Width; + m_d3dRenderTargetSize.Height = swapDimensions ? m_outputSize.Width : m_outputSize.Height; + + if (m_swapChain != nullptr) + { + // If the swap chain already exists, resize it. + HRESULT hr = m_swapChain->ResizeBuffers( + 2, // Double-buffered swap chain. + lround(m_d3dRenderTargetSize.Width), + lround(m_d3dRenderTargetSize.Height), + DXGI_FORMAT_B8G8R8A8_UNORM, + 0 + ); + + if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET) + { + // If the device was removed for any reason, a new device and swap chain will need to be created. + HandleDeviceLost(); + + // Everything is set up now. Do not continue execution of this method. HandleDeviceLost will reenter this method + // and correctly set up the new device. + return; + } + else + { + DX::ThrowIfFailed(hr); + } + } + else + { + // Otherwise, create a new one using the same adapter as the existing Direct3D device. + DXGI_SCALING scaling = DisplayMetrics::SupportHighResolutions ? DXGI_SCALING_NONE : DXGI_SCALING_STRETCH; + DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {0}; + + swapChainDesc.Width = lround(m_d3dRenderTargetSize.Width); // Match the size of the window. + swapChainDesc.Height = lround(m_d3dRenderTargetSize.Height); + swapChainDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; // This is the most common swap chain format. + swapChainDesc.Stereo = false; + swapChainDesc.SampleDesc.Count = 1; // Don't use multi-sampling. + swapChainDesc.SampleDesc.Quality = 0; + swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + swapChainDesc.BufferCount = 2; // Use double-buffering to minimize latency. + swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; // All Windows Store apps must use this SwapEffect. + swapChainDesc.Flags = 0; + swapChainDesc.Scaling = scaling; + swapChainDesc.AlphaMode = DXGI_ALPHA_MODE_IGNORE; + + // This sequence obtains the DXGI factory that was used to create the Direct3D device above. + ComPtr dxgiDevice; + DX::ThrowIfFailed( + m_d3dDevice.As(&dxgiDevice) + ); + + ComPtr dxgiAdapter; + DX::ThrowIfFailed( + dxgiDevice->GetAdapter(&dxgiAdapter) + ); + + ComPtr dxgiFactory; + DX::ThrowIfFailed( + dxgiAdapter->GetParent(IID_PPV_ARGS(&dxgiFactory)) + ); + + ComPtr swapChain; + DX::ThrowIfFailed( + dxgiFactory->CreateSwapChainForCoreWindow( + m_d3dDevice.Get(), + reinterpret_cast(m_window.Get()), + &swapChainDesc, + nullptr, + &swapChain + ) + ); + DX::ThrowIfFailed( + swapChain.As(&m_swapChain) + ); + + // Ensure that DXGI does not queue more than one frame at a time. This both reduces latency and + // ensures that the application will only render after each VSync, minimizing power consumption. + DX::ThrowIfFailed( + dxgiDevice->SetMaximumFrameLatency(1) + ); + } + + // Set the proper orientation for the swap chain, and generate 2D and + // 3D matrix transformations for rendering to the rotated swap chain. + // Note the rotation angle for the 2D and 3D transforms are different. + // This is due to the difference in coordinate spaces. Additionally, + // the 3D matrix is specified explicitly to avoid rounding errors. + + switch (displayRotation) + { + case DXGI_MODE_ROTATION_IDENTITY: + m_orientationTransform2D = Matrix3x2F::Identity(); + m_orientationTransform3D = ScreenRotation::Rotation0; + break; + + case DXGI_MODE_ROTATION_ROTATE90: + m_orientationTransform2D = + Matrix3x2F::Rotation(90.0f) * + Matrix3x2F::Translation(m_logicalSize.Height, 0.0f); + m_orientationTransform3D = ScreenRotation::Rotation270; + break; + + case DXGI_MODE_ROTATION_ROTATE180: + m_orientationTransform2D = + Matrix3x2F::Rotation(180.0f) * + Matrix3x2F::Translation(m_logicalSize.Width, m_logicalSize.Height); + m_orientationTransform3D = ScreenRotation::Rotation180; + break; + + case DXGI_MODE_ROTATION_ROTATE270: + m_orientationTransform2D = + Matrix3x2F::Rotation(270.0f) * + Matrix3x2F::Translation(0.0f, m_logicalSize.Width); + m_orientationTransform3D = ScreenRotation::Rotation90; + break; + + default: + throw ref new FailureException(); + } + + DX::ThrowIfFailed( + m_swapChain->SetRotation(displayRotation) + ); + + // Create a render target view of the swap chain back buffer. + ComPtr backBuffer; + DX::ThrowIfFailed( + m_swapChain->GetBuffer(0, IID_PPV_ARGS(&backBuffer)) + ); + + DX::ThrowIfFailed( + m_d3dDevice->CreateRenderTargetView1( + backBuffer.Get(), + nullptr, + &m_d3dRenderTargetView + ) + ); + + // Set the 3D rendering viewport to target the entire window. + m_screenViewport = CD3D11_VIEWPORT( + 0.0f, + 0.0f, + m_d3dRenderTargetSize.Width, + m_d3dRenderTargetSize.Height + ); + + m_d3dContext->RSSetViewports(1, &m_screenViewport); + + // Create a Direct2D target bitmap associated with the + // swap chain back buffer and set it as the current target. + D2D1_BITMAP_PROPERTIES1 bitmapProperties = + D2D1::BitmapProperties1( + D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW, + D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED), + m_dpi, + m_dpi + ); + + ComPtr dxgiBackBuffer; + DX::ThrowIfFailed( + m_swapChain->GetBuffer(0, IID_PPV_ARGS(&dxgiBackBuffer)) + ); + + DX::ThrowIfFailed( + m_d2dContext->CreateBitmapFromDxgiSurface( + dxgiBackBuffer.Get(), + &bitmapProperties, + &m_d2dTargetBitmap + ) + ); + + m_d2dContext->SetTarget(m_d2dTargetBitmap.Get()); + m_d2dContext->SetDpi(m_effectiveDpi, m_effectiveDpi); + + // Grayscale text anti-aliasing is recommended for all Windows Store apps. + m_d2dContext->SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE); +} + +// Determine the dimensions of the render target and whether it will be scaled down. +void DX::DeviceResources::UpdateRenderTargetSize() +{ + m_effectiveDpi = m_dpi; + + // To improve battery life on high resolution devices, render to a smaller render target + // and allow the GPU to scale the output when it is presented. + if (!DisplayMetrics::SupportHighResolutions && m_dpi > DisplayMetrics::DpiThreshold) + { + float width = DX::ConvertDipsToPixels(m_logicalSize.Width, m_dpi); + float height = DX::ConvertDipsToPixels(m_logicalSize.Height, m_dpi); + + // When the device is in portrait orientation, height > width. Compare the + // larger dimension against the width threshold and the smaller dimension + // against the height threshold. + if (std::max(width, height) > DisplayMetrics::WidthThreshold && std::min(width, height) > DisplayMetrics::HeightThreshold) + { + // To scale the app we change the effective DPI. Logical size does not change. + m_effectiveDpi /= 2.0f; + } + } + // Calculate the necessary render target size in pixels. + m_outputSize.Width = DX::ConvertDipsToPixels(m_logicalSize.Width, m_effectiveDpi); + m_outputSize.Height = DX::ConvertDipsToPixels(m_logicalSize.Height, m_effectiveDpi); + + // Prevent zero size DirectX content from being created. + m_outputSize.Width = std::max(m_outputSize.Width, 1.0f); + m_outputSize.Height = std::max(m_outputSize.Height, 1.0f); +} + +// This method is called when the CoreWindow is created (or re-created). +void DX::DeviceResources::SetWindow(CoreWindow^ window) +{ + DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); + + m_window = window; + m_logicalSize = Windows::Foundation::Size(window->Bounds.Width, window->Bounds.Height); + m_nativeOrientation = currentDisplayInformation->NativeOrientation; + m_currentOrientation = currentDisplayInformation->CurrentOrientation; + m_dpi = currentDisplayInformation->LogicalDpi; + m_d2dContext->SetDpi(m_dpi, m_dpi); + + CreateWindowSizeDependentResources(); +} + +// This method is called in the event handler for the SizeChanged event. +void DX::DeviceResources::SetLogicalSize(Windows::Foundation::Size logicalSize) +{ + if (m_logicalSize != logicalSize) + { + m_logicalSize = logicalSize; + CreateWindowSizeDependentResources(); + } +} + +// This method is called in the event handler for the DpiChanged event. +void DX::DeviceResources::SetDpi(float dpi) +{ + if (dpi != m_dpi) + { + m_dpi = dpi; + + // When the display DPI changes, the logical size of the window (measured in Dips) also changes and needs to be updated. + m_logicalSize = Windows::Foundation::Size(m_window->Bounds.Width, m_window->Bounds.Height); + + m_d2dContext->SetDpi(m_dpi, m_dpi); + CreateWindowSizeDependentResources(); + } +} + +// This method is called in the event handler for the OrientationChanged event. +void DX::DeviceResources::SetCurrentOrientation(DisplayOrientations currentOrientation) +{ + if (m_currentOrientation != currentOrientation) + { + m_currentOrientation = currentOrientation; + CreateWindowSizeDependentResources(); + } +} + +// This method is called in the event handler for the DisplayContentsInvalidated event. +void DX::DeviceResources::ValidateDevice() +{ + // The D3D Device is no longer valid if the default adapter changed since the device + // was created or if the device has been removed. + + // First, get the information for the default adapter from when the device was created. + + ComPtr dxgiDevice; + DX::ThrowIfFailed(m_d3dDevice.As(&dxgiDevice)); + + ComPtr deviceAdapter; + DX::ThrowIfFailed(dxgiDevice->GetAdapter(&deviceAdapter)); + + ComPtr deviceFactory; + DX::ThrowIfFailed(deviceAdapter->GetParent(IID_PPV_ARGS(&deviceFactory))); + + ComPtr previousDefaultAdapter; + DX::ThrowIfFailed(deviceFactory->EnumAdapters1(0, &previousDefaultAdapter)); + + DXGI_ADAPTER_DESC1 previousDesc; + DX::ThrowIfFailed(previousDefaultAdapter->GetDesc1(&previousDesc)); + + // Next, get the information for the current default adapter. + + ComPtr currentFactory; + DX::ThrowIfFailed(CreateDXGIFactory1(IID_PPV_ARGS(¤tFactory))); + + ComPtr currentDefaultAdapter; + DX::ThrowIfFailed(currentFactory->EnumAdapters1(0, ¤tDefaultAdapter)); + + DXGI_ADAPTER_DESC1 currentDesc; + DX::ThrowIfFailed(currentDefaultAdapter->GetDesc1(¤tDesc)); + + // If the adapter LUIDs don't match, or if the device reports that it has been removed, + // a new D3D device must be created. + + if (previousDesc.AdapterLuid.LowPart != currentDesc.AdapterLuid.LowPart || + previousDesc.AdapterLuid.HighPart != currentDesc.AdapterLuid.HighPart || + FAILED(m_d3dDevice->GetDeviceRemovedReason())) + { + // Release references to resources related to the old device. + dxgiDevice = nullptr; + deviceAdapter = nullptr; + deviceFactory = nullptr; + previousDefaultAdapter = nullptr; + + // Create a new device and swap chain. + HandleDeviceLost(); + } +} + +// Recreate all device resources and set them back to the current state. +void DX::DeviceResources::HandleDeviceLost() +{ + m_swapChain = nullptr; + + if (m_deviceNotify != nullptr) + { + m_deviceNotify->OnDeviceLost(); + } + + CreateDeviceResources(); + m_d2dContext->SetDpi(m_dpi, m_dpi); + CreateWindowSizeDependentResources(); + + if (m_deviceNotify != nullptr) + { + m_deviceNotify->OnDeviceRestored(); + } +} + +// Register our DeviceNotify to be informed on device lost and creation. +void DX::DeviceResources::RegisterDeviceNotify(DX::IDeviceNotify* deviceNotify) +{ + m_deviceNotify = deviceNotify; +} + +// Call this method when the app suspends. It provides a hint to the driver that the app +// is entering an idle state and that temporary buffers can be reclaimed for use by other apps. +void DX::DeviceResources::Trim() +{ + ComPtr dxgiDevice; + m_d3dDevice.As(&dxgiDevice); + + dxgiDevice->Trim(); +} + +// Present the contents of the swap chain to the screen. +void DX::DeviceResources::Present() +{ + // The first argument instructs DXGI to block until VSync, putting the application + // to sleep until the next VSync. This ensures we don't waste any cycles rendering + // frames that will never be displayed to the screen. + DXGI_PRESENT_PARAMETERS parameters = { 0 }; + HRESULT hr = m_swapChain->Present1(1, 0, ¶meters); + + // Discard the contents of the render target. + // This is a valid operation only when the existing contents will be entirely + // overwritten. If dirty or scroll rects are used, this call should be removed. + m_d3dContext->DiscardView1(m_d3dRenderTargetView.Get(), nullptr, 0); + + // If the device was removed either by a disconnection or a driver upgrade, we + // must recreate all device resources. + if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET) + { + HandleDeviceLost(); + } + else + { + DX::ThrowIfFailed(hr); + } +} + +// This method determines the rotation between the display device's native orientation and the +// current display orientation. +DXGI_MODE_ROTATION DX::DeviceResources::ComputeDisplayRotation() +{ + DXGI_MODE_ROTATION rotation = DXGI_MODE_ROTATION_UNSPECIFIED; + + // Note: NativeOrientation can only be Landscape or Portrait even though + // the DisplayOrientations enum has other values. + switch (m_nativeOrientation) + { + case DisplayOrientations::Landscape: + switch (m_currentOrientation) + { + case DisplayOrientations::Landscape: + rotation = DXGI_MODE_ROTATION_IDENTITY; + break; + + case DisplayOrientations::Portrait: + rotation = DXGI_MODE_ROTATION_ROTATE270; + break; + + case DisplayOrientations::LandscapeFlipped: + rotation = DXGI_MODE_ROTATION_ROTATE180; + break; + + case DisplayOrientations::PortraitFlipped: + rotation = DXGI_MODE_ROTATION_ROTATE90; + break; + } + break; + + case DisplayOrientations::Portrait: + switch (m_currentOrientation) + { + case DisplayOrientations::Landscape: + rotation = DXGI_MODE_ROTATION_ROTATE90; + break; + + case DisplayOrientations::Portrait: + rotation = DXGI_MODE_ROTATION_IDENTITY; + break; + + case DisplayOrientations::LandscapeFlipped: + rotation = DXGI_MODE_ROTATION_ROTATE270; + break; + + case DisplayOrientations::PortraitFlipped: + rotation = DXGI_MODE_ROTATION_ROTATE180; + break; + } + break; + } + return rotation; +} \ No newline at end of file diff --git a/UWP/Common/DeviceResources.h b/UWP/Common/DeviceResources.h new file mode 100644 index 0000000000..8942c49014 --- /dev/null +++ b/UWP/Common/DeviceResources.h @@ -0,0 +1,102 @@ +#pragma once + +namespace DX +{ + // Provides an interface for an application that owns DeviceResources to be notified of the device being lost or created. + interface IDeviceNotify + { + virtual void OnDeviceLost() = 0; + virtual void OnDeviceRestored() = 0; + }; + + // Controls all the DirectX device resources. + class DeviceResources + { + public: + DeviceResources(); + void SetWindow(Windows::UI::Core::CoreWindow^ window); + void SetLogicalSize(Windows::Foundation::Size logicalSize); + void SetCurrentOrientation(Windows::Graphics::Display::DisplayOrientations currentOrientation); + void SetDpi(float dpi); + void ValidateDevice(); + void HandleDeviceLost(); + void RegisterDeviceNotify(IDeviceNotify* deviceNotify); + void Trim(); + void Present(); + + // The size of the render target, in pixels. + Windows::Foundation::Size GetOutputSize() const { return m_outputSize; } + + // The size of the render target, in dips. + Windows::Foundation::Size GetLogicalSize() const { return m_logicalSize; } + float GetDpi() const { return m_effectiveDpi; } + float GetActualDpi() const { return m_dpi; } + + // D3D Accessors. + ID3D11Device3* GetD3DDevice() const { return m_d3dDevice.Get(); } + ID3D11DeviceContext3* GetD3DDeviceContext() const { return m_d3dContext.Get(); } + IDXGISwapChain3* GetSwapChain() const { return m_swapChain.Get(); } + D3D_FEATURE_LEVEL GetDeviceFeatureLevel() const { return m_d3dFeatureLevel; } + ID3D11RenderTargetView1* GetBackBufferRenderTargetView() const { return m_d3dRenderTargetView.Get(); } + D3D11_VIEWPORT GetScreenViewport() const { return m_screenViewport; } + DirectX::XMFLOAT4X4 GetOrientationTransform3D() const { return m_orientationTransform3D; } + + // D2D Accessors. + ID2D1Factory3* GetD2DFactory() const { return m_d2dFactory.Get(); } + ID2D1Device2* GetD2DDevice() const { return m_d2dDevice.Get(); } + ID2D1DeviceContext2* GetD2DDeviceContext() const { return m_d2dContext.Get(); } + ID2D1Bitmap1* GetD2DTargetBitmap() const { return m_d2dTargetBitmap.Get(); } + IDWriteFactory3* GetDWriteFactory() const { return m_dwriteFactory.Get(); } + IWICImagingFactory2* GetWicImagingFactory() const { return m_wicFactory.Get(); } + D2D1::Matrix3x2F GetOrientationTransform2D() const { return m_orientationTransform2D; } + + DXGI_MODE_ROTATION ComputeDisplayRotation(); + + private: + void CreateDeviceIndependentResources(); + void CreateDeviceResources(); + void CreateWindowSizeDependentResources(); + void UpdateRenderTargetSize(); + + // Direct3D objects. + Microsoft::WRL::ComPtr m_d3dDevice; + Microsoft::WRL::ComPtr m_d3dContext; + Microsoft::WRL::ComPtr m_swapChain; + + // Direct3D rendering objects. Required for 3D. + Microsoft::WRL::ComPtr m_d3dRenderTargetView; + D3D11_VIEWPORT m_screenViewport; + + // Direct2D drawing components. + Microsoft::WRL::ComPtr m_d2dFactory; + Microsoft::WRL::ComPtr m_d2dDevice; + Microsoft::WRL::ComPtr m_d2dContext; + Microsoft::WRL::ComPtr m_d2dTargetBitmap; + + // DirectWrite drawing components. + Microsoft::WRL::ComPtr m_dwriteFactory; + Microsoft::WRL::ComPtr m_wicFactory; + + // Cached reference to the Window. + Platform::Agile m_window; + + // Cached device properties. + D3D_FEATURE_LEVEL m_d3dFeatureLevel; + Windows::Foundation::Size m_d3dRenderTargetSize; + Windows::Foundation::Size m_outputSize; + Windows::Foundation::Size m_logicalSize; + Windows::Graphics::Display::DisplayOrientations m_nativeOrientation; + Windows::Graphics::Display::DisplayOrientations m_currentOrientation; + float m_dpi; + + // This is the DPI that will be reported back to the app. It takes into account whether the app supports high resolution screens or not. + float m_effectiveDpi; + + // Transforms used for display orientation. + D2D1::Matrix3x2F m_orientationTransform2D; + DirectX::XMFLOAT4X4 m_orientationTransform3D; + + // The IDeviceNotify can be held directly as it owns the DeviceResources. + IDeviceNotify* m_deviceNotify; + }; +} \ No newline at end of file diff --git a/UWP/Common/DirectXHelper.h b/UWP/Common/DirectXHelper.h new file mode 100644 index 0000000000..1137361a9a --- /dev/null +++ b/UWP/Common/DirectXHelper.h @@ -0,0 +1,63 @@ +#pragma once + +#include // For create_task + +namespace DX +{ + inline void ThrowIfFailed(HRESULT hr) + { + if (FAILED(hr)) + { + // Set a breakpoint on this line to catch Win32 API errors. + throw Platform::Exception::CreateException(hr); + } + } + + // Function that reads from a binary file asynchronously. + inline Concurrency::task> ReadDataAsync(const std::wstring& filename) + { + using namespace Windows::Storage; + using namespace Concurrency; + + auto folder = Windows::ApplicationModel::Package::Current->InstalledLocation; + + return create_task(folder->GetFileAsync(Platform::StringReference(filename.c_str()))).then([] (StorageFile^ file) + { + return FileIO::ReadBufferAsync(file); + }).then([] (Streams::IBuffer^ fileBuffer) -> std::vector + { + std::vector returnBuffer; + returnBuffer.resize(fileBuffer->Length); + Streams::DataReader::FromBuffer(fileBuffer)->ReadBytes(Platform::ArrayReference(returnBuffer.data(), fileBuffer->Length)); + return returnBuffer; + }); + } + + // Converts a length in device-independent pixels (DIPs) to a length in physical pixels. + inline float ConvertDipsToPixels(float dips, float dpi) + { + static const float dipsPerInch = 96.0f; + return floorf(dips * dpi / dipsPerInch + 0.5f); // Round to nearest integer. + } + +#if defined(_DEBUG) + // Check for SDK Layer support. + inline bool SdkLayersAvailable() + { + HRESULT hr = D3D11CreateDevice( + nullptr, + D3D_DRIVER_TYPE_NULL, // There is no need to create a real hardware device. + 0, + D3D11_CREATE_DEVICE_DEBUG, // Check for the SDK layers. + nullptr, // Any feature level will do. + 0, + D3D11_SDK_VERSION, // Always set this to D3D11_SDK_VERSION for Windows Store apps. + nullptr, // No need to keep the D3D device reference. + nullptr, // No need to know the feature level. + nullptr // No need to keep the D3D device context reference. + ); + + return SUCCEEDED(hr); + } +#endif +} diff --git a/UWP/CommonUWP/CommonUWP.cpp b/UWP/CommonUWP/CommonUWP.cpp new file mode 100644 index 0000000000..af3e506d90 --- /dev/null +++ b/UWP/CommonUWP/CommonUWP.cpp @@ -0,0 +1,2 @@ +#include "pch.h" +#include "CommonUWP.h" diff --git a/UWP/CommonUWP/CommonUWP.h b/UWP/CommonUWP/CommonUWP.h new file mode 100644 index 0000000000..73b4b86650 --- /dev/null +++ b/UWP/CommonUWP/CommonUWP.h @@ -0,0 +1 @@ +#pragma once diff --git a/UWP/CommonUWP/CommonUWP.vcxproj b/UWP/CommonUWP/CommonUWP.vcxproj new file mode 100644 index 0000000000..f79045110f --- /dev/null +++ b/UWP/CommonUWP/CommonUWP.vcxproj @@ -0,0 +1,396 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + UWP Gold + ARM + + + UWP Gold + Win32 + + + UWP Gold + x64 + + + + {acb316ca-3ecb-48e5-be0a-91e72d5b0f12} + StaticLibrary + CommonUWP + en-US + 14.0 + true + Windows Store + 10.0.10586.0 + 10.0.10240.0 + 10.0 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Use + false + true + pch.h + ../..;../../ext/native;../../ext/snappy;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + ../..;../../ext/native;../../ext/snappy;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + pch.h + + + Console + false + false + + + + + Use + false + true + ../..;../../ext/native;../../ext/snappy;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + pch.h + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native;../../ext/snappy;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + ../..;../../ext/native;../../ext/snappy;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + pch.h + + + Console + false + false + + + + + Use + false + true + ../..;../../ext/native;../../ext/snappy;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + pch.h + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native;../../ext/snappy;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + ../..;../../ext/native;../../ext/snappy;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + pch.h + + + Console + false + false + + + + + Use + false + true + ../..;../../ext/native;../../ext/snappy;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + pch.h + + + Console + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/UWP/CommonUWP/CommonUWP.vcxproj.filters b/UWP/CommonUWP/CommonUWP.vcxproj.filters new file mode 100644 index 0000000000..67086f1bc2 --- /dev/null +++ b/UWP/CommonUWP/CommonUWP.vcxproj.filters @@ -0,0 +1,102 @@ + + + + + {da855697-f7aa-49bf-b969-7a90c5b4d259} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Crypto + + + Crypto + + + Crypto + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Crypto + + + Crypto + + + Crypto + + + \ No newline at end of file diff --git a/UWP/CommonUWP/pch.cpp b/UWP/CommonUWP/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/UWP/CommonUWP/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/UWP/CommonUWP/pch.h b/UWP/CommonUWP/pch.h new file mode 100644 index 0000000000..529bbb17fe --- /dev/null +++ b/UWP/CommonUWP/pch.h @@ -0,0 +1,9 @@ +#pragma once + +#include "targetver.h" + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#include diff --git a/UWP/CommonUWP/targetver.h b/UWP/CommonUWP/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/UWP/CommonUWP/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/UWP/Content/7z.png b/UWP/Content/7z.png new file mode 100644 index 0000000000..b49535297f Binary files /dev/null and b/UWP/Content/7z.png differ diff --git a/UWP/Content/compat.ini b/UWP/Content/compat.ini new file mode 100644 index 0000000000..00adc21e42 --- /dev/null +++ b/UWP/Content/compat.ini @@ -0,0 +1,164 @@ +# ======================================================================================== +# compat.ini for PPSSPP +# ======================================================================================== +# +# This file is not meant to be user-editable, although is kept as a separate ini +# file instead of compiled into the code for debugging purposes. +# +# The uses cases are strict: +# * Enable fixes for things we can't reasonably emulate without completely ruining +# performance for other games, such as the screen copies in Dangan Ronpa +# * Disabling accuracy features like 16-bit depth rounding, when we can't seem to +# implement them at all in a 100% compatible way +# * Emergency game-specific compatibility fixes before releases, such as the GTA +# music problem where every attempted fix has reduced compatibility with other games +# * Enable "unsafe" performance optimizations that some games can tolerate and +# others cannot. We do not currently have any of those. +# +# This functionality should NOT be used for any of the following: +# * Cheats +# * Fun hacks, like enlarged heads or whatever +# * Fixing general compatibility issues. First try to find a general solution. Try hard. +# +# Game IDs can be looked up at GameFAQs, for example: +# http://www.gamefaqs.com/psp/925776-grand-theft-auto-liberty-city-stories/data +# Sometimes the information may be incomplete though. +# +# ======================================================================================== +# Issue numbers refer to issues on https://github.com/hrydgard/ppsspp/issues +# ======================================================================================== + +[VertexDepthRounding] +# Phantasy Star Portable needs depth rounding to 16-bit precision for text to show up. +# It's enough to do it at the vertex granularity. #3777 +ULJM05309 = true +ULUS10410 = true +ULES01218 = true +ULJM08023 = true +ULES01218 = true +# Phantasy Star Portable 2 JP (missing text) +ULJM05493 = true +NPJH50043 = true +ULJM08030 = true +# Puyo Puyo Fever 2 #3663 (layering) +ULJM05058 = true +# NBA 2K13 #6603 (menu glitches) +ULAS42332 = true +ULJS00551 = true +NPJH50713 = true +ULJS00596 = true +ULES01578 = true +# Power Stone Collection #6257 (map arrow) +ULES00496 = true +ULUS10171 = true +ULJM05178 = true +# Taiko no Tatsujin Portable DX #7920 (missing text) +ULJS00383 = true +NPJH50426 = true +ULAS42282 = true +# PhotoKano #7920 (missing text) +ULJS00378 = true +NPJH50579 = true +ULJS19069 = true +NPJH50579 = true + +[PixelDepthRounding] +# Heroes Phantasia requires pixel depth rounding. #6485 (flickering overlaid sprites) +NPJH50558 = true +ULJS00456 = true +ULJS00454 = true +# Heroes Phantasia Limited Edition Disc requires pixel depth rounding. +ULJS00455 = true +# Phantasy Star games flickering +# Phantasy Star Portable 1 +ULJM05309 = true +ULUS10410 = true +ULES01218 = true +ULJM08023 = true +ULES01218 = true +# Phantasy Star Portable 2 JP +ULJM05493 = true +NPJH50043 = true +ULJM08030 = true +# Phantasy Star Portable 1 Demo +NPUH90023 = true +ULJM91014 = true +NPJH90002 = true +# Phantasy Star Portable 2 JP Demo +ULJM91018 = true +NPJH90062 = true + +[DepthRangeHack] +# Phantasy Star Portable 2 and Infinity both use viewport depth outside [0, 1]. +# This gets clamped in our current implementation, but attempts to fix it run into +# Other bugs, so we've restored this hack for now. +ULJM05493 = true +NPJH50043 = true +ULJM08030 = true +ULES01439 = true +ULUS10529 = true +ULJM91018 = true # Infinity demo disc? +NPJH90157 = true # Infinity demo +ULJM05732 = true +NPJH50332 = true + +[ClearToRAM] +# SOCOM Navy Seals games require this. See issue #8973. +# Navy Seals +UCUS98615 = true +ULES00038 = true +UCKS45021 = true +# Fireteam Bravo 3 +UCJS10102 = true +NPJG00035 = true +UCUS98716 = true +UCES01242 = true + +[Force04154000Download] +# This applies a hack to Dangan Ronpa, its demo, and its sequel. +# The game draws solid colors to a small framebuffer, and then reads this directly in VRAM. +# We force this framebuffer to 1x and force download it automatically. +NPJH50631 = true +NPJH50372 = true +NPJH90164 = true +NPJH50515 = true +# Let's also apply to Me & My Katamari. +ULUS10094 = true +ULES00339 = true +ULJS00033 = true +UCKS45022 = true +ULJS19009 = true +NPJH50141 = true + + +[DrawSyncEatCycles] +# This replaced Crash Tag Team Racing hack to also fix Gundam games +# It makes sceGeDrawSync eat a lot of cycles which can affect timing in lots of games, +# might be negative for others, but happens to fix games below. +# Crash Tag Team Racing needs it to pass checking memory stick screen. +ULUS10044 = true +ULES00168 = true +ULJM05036 = true +# Gundam Battle Royale might need it to avoid crashes when certain Ace enemies shows up +ULJS00083 = true +ULKS46104 = true +ULJS19015 = true +# Gundam Battle Chronicle needs it to avoid crashes after most battles +ULJS00122 = true +ULKS46158 = true +ULJS19021 = true +# Gundam Battle Universe same problem as above +ULJS00145 = true +ULKS46183 = true +ULJS00260 = true +ULJS19041 = true +NPJH50843 = true + +[FakeMipmapChange] +# This hacks separates each mipmap to independent textures to display wrong-size mipmaps. +# For example this requires games like Tactics Ogre(Japanese) to display multi bytes fonts stored in mipmaps. +# See issue #5350. +# Tactics Ogre(Japanese) +ULJM05753 = true +NPJH50348 = true +ULJM06009 = true diff --git a/UWP/Content/gamecontrollerdb.txt b/UWP/Content/gamecontrollerdb.txt new file mode 100644 index 0000000000..9c964ede61 --- /dev/null +++ b/UWP/Content/gamecontrollerdb.txt @@ -0,0 +1,153 @@ +# Windows - DINPUT +8f0e1200000000000000504944564944,Acme,platform:Windows,x:b2,a:b0,b:b1,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b6,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2, +341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, +ffff0000000000000000504944564944,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows, +6d0416c2000000000000504944564944,Generic DirectInput Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, +0d0f6e00000000000000504944564944,HORIPAD 4,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Windows, +6d0419c2000000000000504944564944,Logitech F710 Gamepad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows, +88880803000000000000504944564944,PS3 Controller,a:b2,b:b1,back:b8,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b9,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:b7,rightx:a3,righty:a4,start:b11,x:b0,y:b3,platform:Windows, +4c056802000000000000504944564944,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Windows, +25090500000000000000504944564944,PS3 DualShock,a:b2,b:b1,back:b9,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b0,y:b3,platform:Windows, +4c05c405000000000000504944564944,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, +6d0418c2000000000000504944564944,Logitech RumblePad 2 USB,platform:Windows,x:b0,a:b1,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, +36280100000000000000504944564944,OUYA Controller,platform:Windows,a:b0,b:b3,y:b2,x:b1,start:b14,guide:b15,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b8,dpleft:b10,dpdown:b9,dpright:b11,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b12,righttrigger:b13, +4f0400b3000000000000504944564944,Thrustmaster Firestorm Dual Power,a:b0,b:b2,y:b3,x:b1,start:b10,guide:b8,back:b9,leftstick:b11,rightstick:b12,leftshoulder:b4,rightshoulder:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b5,righttrigger:b7,platform:Windows, +00f00300000000000000504944564944,RetroUSB.com RetroPad,a:b1,b:b5,x:b0,y:b4,back:b2,start:b3,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1,platform:Windows, +00f0f100000000000000504944564944,RetroUSB.com Super RetroPort,a:b1,b:b5,x:b0,y:b4,back:b2,start:b3,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1,platform:Windows, +28040140000000000000504944564944,GamePad Pro USB,platform:Windows,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,lefttrigger:b6,righttrigger:b7, +ff113133000000000000504944564944,SVEN X-PAD,platform:Windows,a:b2,b:b3,y:b1,x:b0,start:b5,back:b4,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a4,lefttrigger:b8,righttrigger:b9, +8f0e0300000000000000504944564944,Piranha xtreme,platform:Windows,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2, +8f0e0d31000000000000504944564944,Multilaser JS071 USB,platform:Windows,a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7, +10080300000000000000504944564944,PS2 USB,platform:Windows,a:b2,b:b1,y:b0,x:b3,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a4,righty:a2,lefttrigger:b4,righttrigger:b5, +79000600000000000000504944564944,G-Shark GS-GP702,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a4,lefttrigger:b6,righttrigger:b7,platform:Windows, +4b12014d000000000000504944564944,NYKO AIRFLO,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b10,start:b9,leftstick:a0,rightstick:a2,leftshoulder:a3,rightshoulder:b5,dpup:h0.1,dpdown:h0.0,dpleft:h0.8,dpright:h0.2,leftx:h0.6,lefty:h0.12,rightx:h0.9,righty:h0.4,lefttrigger:b6,righttrigger:b7,platform:Windows, +d6206dca000000000000504944564944,PowerA Pro Ex,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b12,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.0,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Windows, +a3060cff000000000000504944564944,Saitek P2500,a:b2,b:b3,y:b1,x:b0,start:b4,guide:b10,back:b5,leftstick:b8,rightstick:b9,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,platform:Windows, +4f0415b3000000000000504944564944,Thrustmaster Dual Analog 3.2,platform:Windows,x:b1,a:b0,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b6,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, +6f0e1e01000000000000504944564944,Rock Candy Gamepad for PS3,platform:Windows,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,guide:b12,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2, +83056020000000000000504944564944,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,y:b2,x:b3,start:b7,back:b6,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,platform:Windows, +10080100000000000000504944564944,PS1 USB,platform:Windows,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftshoulder:b6,rightshoulder:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b4,righttrigger:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2, +49190204000000000000504944564944,Ipega PG-9023,a:b0,b:b1,x:b3,y:b4,back:b10,start:b11,leftstick:b13,rightstick:b14,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b8,righttrigger:b9,platform:Windows, +4f0423b3000000000000504944564944,Dual Trigger 3-in-1,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a5,lefttrigger:b6,righttrigger:b7,platform:Windows, +0d0f4900000000000000504944564944,Hatsune Miku Sho Controller,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b12,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Windows, +79004318000000000000504944564944,Mayflash GameCube Controller Adapter,platform:Windows,a:b1,b:b2,x:b0,y:b3,back:b0,start:b9,guide:b0,leftshoulder:b4,rightshoulder:b7,leftstick:b0,rightstick:b0,leftx:a0,lefty:a1,rightx:a5,righty:a2,lefttrigger:a3,righttrigger:a4,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2, +79000018000000000000504944564944,Mayflash WiiU Pro Game Controller Adapter (DInput),a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Windows, +2509e803000000000000504944564944,Mayflash Wii Classic Controller,a:b1,b:b0,x:b3,y:b2,back:b8,guide:b10,start:b9,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:b11,dpdown:b13,dpleft:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Windows, +300f1001000000000000504944564944,Saitek P480 Rumble Pad,a:b2,b:b3,x:b0,y:b1,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b6,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b5,righttrigger:b7,platform:Windows, +10280900000000000000504944564944,8Bitdo SFC30 GamePad,a:b1,b:b0,y:b3,x:b4,start:b11,back:b10,leftshoulder:b6,leftx:a0,lefty:a1,rightshoulder:b7,platform:Windows, +63252305000000000000504944564944,USB Vibration Joystick (BM),platform:Windows,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, +20380900000000000000504944564944,8Bitdo NES30 PRO Wireless,platform:Windows,a:b0,b:b1,x:b3,y:b4,leftshoulder:b6,rightshoulder:b7,lefttrigger:b8,righttrigger:b9,back:b10,start:b11,leftstick:b13,rightstick:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8, +02200090000000000000504944564944,8Bitdo NES30 PRO USB,platform:Windows,a:b0,b:b1,x:b3,y:b4,leftshoulder:b6,rightshoulder:b7,lefttrigger:b8,righttrigger:b9,back:b10,start:b11,leftstick:b13,rightstick:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8, +ff113133000000000000504944564944,Gembird JPD-DualForce,platform:Windows,a:b2,b:b3,x:b0,y:b1,start:b9,back:b8,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a4,lefttrigger:b6,righttrigger:b7,leftstick:b10,rightstick:b11, +341a0108000000000000504944564944,EXEQ RF USB Gamepad 8206,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,leftstick:b8,rightstick:b7,back:b8,start:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,platform:Windows, +c0111352000000000000504944564944,Battalife Joystick,platform:Windows,x:b4,a:b6,b:b7,y:b5,back:b2,start:b3,leftshoulder:b0,rightshoulder:b1,leftx:a0,lefty:a1, + +# OS X +0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, +6d0400000000000016c2000000000000,Logitech F310 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, +6d0400000000000018c2000000000000,Logitech F510 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, +6d040000000000001fc2000000000000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, +6d0400000000000019c2000000000000,Logitech Wireless Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X, +4c050000000000006802000000000000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Mac OS X, +4c05000000000000c405000000000000,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X, +5e040000000000008e02000000000000,X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, +891600000000000000fd000000000000,Razer Onza Tournament,a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Mac OS X, +4f0400000000000000b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,y:b3,x:b1,start:b10,guide:b8,back:b9,leftstick:b11,rightstick:,leftshoulder:b4,rightshoulder:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b5,righttrigger:b7,platform:Mac OS X, +8f0e0000000000000300000000000000,Piranha xtreme,platform:Mac OS X,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2, +0d0f0000000000004d00000000000000,HORI Gem Pad 3,platform:Mac OS X,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7, +79000000000000000600000000000000,G-Shark GP-702,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b6,righttrigger:b7,platform:Mac OS X, +4f0400000000000015b3000000000000,Thrustmaster Dual Analog 3.2,platform:Mac OS X,x:b1,a:b0,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b6,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, +AD1B00000000000001F9000000000000,Gamestop BB-070 X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, +050000005769696d6f74652028303000,Wii Remote,a:b4,b:b5,y:b9,x:b10,start:b6,guide:b8,back:b7,dpup:b2,dpleft:b0,dpdown:b3,dpright:b1,leftx:a0,lefty:a1,lefttrigger:b12,righttrigger:,leftshoulder:b11,platform:Mac OS X, +83050000000000006020000000000000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,x:b3,y:b2,back:b6,start:b7,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,platform:Mac OS X, +5e04000000000000dd02000000000000,Xbox One Wired Controller,platform:Mac OS X,x:b2,a:b0,b:b1,y:b3,back:b9,guide:b10,start:b8,dpleft:b13,dpdown:b12,dpright:b14,dpup:b11,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b6,rightstick:b7,leftx:a0,lefty:a1,rightx:a3,righty:a4, +050000005769696d6f74652028313800,Wii U Pro Controller,a:b16,b:b15,x:b18,y:b17,back:b7,guide:b8,start:b6,leftstick:b23,rightstick:b24,leftshoulder:b19,rightshoulder:b20,dpup:b11,dpdown:b12,dpleft:b13,dpright:b14,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b21,righttrigger:b22,platform:Mac OS X, +79000000000000000018000000000000,Mayflash WiiU Pro Game Controller Adapter (DInput),a:b4,b:b8,x:b0,y:b12,back:b32,start:b36,leftstick:b40,rightstick:b44,leftshoulder:b16,rightshoulder:b20,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a4,rightx:a8,righty:a12,lefttrigger:b24,righttrigger:b28,platform:Mac OS X, +2509000000000000e803000000000000,Mayflash Wii Classic Controller,a:b1,b:b0,x:b3,y:b2,back:b8,guide:b10,start:b9,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:b11,dpdown:b13,dpleft:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Mac OS X, +351200000000000021ab000000000000,SFC30 Joystick,a:b1,b:b0,x:b4,y:b3,back:b10,start:b11,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1,platform:Mac OS X, +b4040000000000000a01000000000000,Sega Saturn USB Gamepad,a:b0,b:b1,x:b3,y:b4,back:b5,guide:b2,start:b8,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1,platform:Mac OS X, +10280000000000000900000000000000,8Bitdo SFC30 GamePad,a:b1,b:b0,x:b4,y:b3,back:b10,start:b11,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1,platform:Mac OS X, +d814000000000000cecf000000000000,MC Cthulhu,platform:Mac OS X,leftx:,lefty:,rightx:,righty:,lefttrigger:b6,a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,righttrigger:b7, +0d0f0000000000006600000000000000,HORIPAD FPS PLUS 4,platform:Mac OS X,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a5,lefttrigger:b6,righttrigger:a4, + +# Linux +0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, +03000000ba2200002010000001010000,Jess Technology USB Game Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux, +030000006d04000019c2000010010000,Logitech Cordless RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, +030000006d0400001dc2000014400000,Logitech F310 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, +030000006d0400001ec2000020200000,Logitech F510 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, +030000006d04000019c2000011010000,Logitech F710 Gamepad (DInput),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux, +030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, +030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux, +030000004c050000c405000011010000,Sony DualShock 4,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a5,lefttrigger:b6,righttrigger:b7,platform:Linux, +030000006f0e00003001000001010000,EA Sports PS3 Controller,platform:Linux,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7, +03000000de280000ff11000001000000,Valve Streaming Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, +030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, +030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, +030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, +03000000100800000100000010010000,Twin USB PS2 Adapter,a:b2,b:b1,y:b0,x:b3,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b4,righttrigger:b5,platform:Linux, +03000000a306000023f6000011010000,Saitek Cyborg V.1 Game Pad,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a4,lefttrigger:b6,righttrigger:b7,platform:Linux, +030000004f04000020b3000010010000,Thrustmaster 2 in 1 DT,a:b0,b:b2,y:b3,x:b1,start:b9,guide:,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b5,righttrigger:b7,platform:Linux, +030000004f04000023b3000000010000,Thrustmaster Dual Trigger 3-in-1,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a5, +030000008f0e00000300000010010000,GreenAsia Inc. USB Joystick ,platform:Linux,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2, +030000008f0e00001200000010010000,GreenAsia Inc. USB Joystick ,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b6,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2, +030000005e0400009102000007010000,X360 Wireless Controller,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:b13,dpleft:b11,dpdown:b14,dpright:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux, +030000006d04000016c2000010010000,Logitech Logitech Dual Action,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, +03000000260900008888000000010000,GameCube {WiseGroup USB box},a:b0,b:b2,y:b3,x:b1,start:b7,leftshoulder:,rightshoulder:b6,dpup:h0.1,dpleft:h0.8,rightstick:,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,platform:Linux, +030000006d04000011c2000010010000,Logitech WingMan Cordless RumblePad,a:b0,b:b1,y:b4,x:b3,start:b8,guide:b5,back:b2,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b9,righttrigger:b10,platform:Linux, +030000006d04000018c2000010010000,Logitech Logitech RumblePad 2 USB,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, +05000000d6200000ad0d000001000000,Moga Pro,platform:Linux,a:b0,b:b1,y:b3,x:b2,start:b6,leftstick:b7,rightstick:b8,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4, +030000004f04000009d0000000010000,Thrustmaster Run N Drive Wireless PS3,platform:Linux,a:b1,b:b2,x:b0,y:b3,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7, +030000004f04000008d0000000010000,Thrustmaster Run N Drive Wireless,platform:Linux,a:b1,b:b2,x:b0,y:b3,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a5,lefttrigger:b6,righttrigger:b7, +0300000000f000000300000000010000,RetroUSB.com RetroPad,a:b1,b:b5,x:b0,y:b4,back:b2,start:b3,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1,platform:Linux, +0300000000f00000f100000000010000,RetroUSB.com Super RetroPort,a:b1,b:b5,x:b0,y:b4,back:b2,start:b3,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1,platform:Linux, +030000006f0e00001f01000000010000,Generic X-Box pad,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +03000000280400000140000000010000,Gravis GamePad Pro USB ,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,start:b9,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftx:a0,lefty:a1, +030000005e0400008902000021010000,Microsoft X-Box pad v2 (US),platform:Linux,x:b3,a:b0,b:b1,y:b4,back:b6,start:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b5,lefttrigger:a2,rightshoulder:b2,righttrigger:a5,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a3,righty:a4, +030000005e0400008502000000010000,Microsoft X-Box pad (Japan),platform:Linux,x:b3,a:b0,b:b1,y:b4,back:b6,start:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b5,lefttrigger:a2,rightshoulder:b2,righttrigger:a5,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a3,righty:a4, +030000006f0e00001e01000011010000,Rock Candy Gamepad for PS3,platform:Linux,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,guide:b12,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2, +03000000250900000500000000010000,Sony PS2 pad with SmartJoy adapter,platform:Linux,a:b2,b:b1,y:b0,x:b3,start:b8,back:b9,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b4,righttrigger:b5, +030000008916000000fd000024010000,Razer Onza Tournament,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:b13,dpleft:b11,dpdown:b14,dpright:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux, +030000004f04000000b3000010010000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,y:b3,x:b1,start:b10,guide:b8,back:b9,leftstick:b11,rightstick:b12,leftshoulder:b4,rightshoulder:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b5,righttrigger:b7,platform:Linux, +03000000ad1b000001f5000033050000,Hori Pad EX Turbo 2,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux, +050000004c050000c405000000010000,PS4 Controller (Bluetooth),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux, +060000004c0500006802000000010000,PS3 Controller (Bluetooth),a:b14,b:b13,y:b12,x:b15,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9,platform:Linux, +050000004c0500006802000000010000,PS3 Controller (Bluetooth),a:b14,b:b13,y:b12,x:b15,start:b3,guide:b16,back:b0,leftstick:b1,rightstick:b2,leftshoulder:b10,rightshoulder:b11,dpup:b4,dpleft:b7,dpdown:b6,dpright:b5,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9,platform:Linux, +03000000790000000600000010010000,DragonRise Inc. Generic USB Joystick ,platform:Linux,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a4, +03000000666600000488000000010000,Super Joy Box 5 Pro,platform:Linux,a:b2,b:b1,x:b3,y:b0,back:b9,start:b8,leftshoulder:b6,rightshoulder:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b4,righttrigger:b5,dpup:b12,dpleft:b15,dpdown:b14,dpright:b13, +05000000362800000100000002010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,platform:Linux,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2, +05000000362800000100000003010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,platform:Linux,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2, +030000008916000001fd000024010000,Razer Onza Classic Edition,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:b11,dpdown:b14,dpright:b12,dpup:b13,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +030000005e040000d102000001010000,Microsoft X-Box One pad,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +030000005e040000dd02000003020000,Microsoft X-Box One pad v2,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,platform:Linux, +03000000790000001100000010010000,RetroLink Saturn Classic Controller,platform:Linux,x:b3,a:b0,b:b1,y:b4,back:b5,guide:b2,start:b8,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1, +050000007e0500003003000001000000,Nintendo Wii U Pro Controller,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b8,start:b9,guide:b10,leftshoulder:b4,rightshoulder:b5,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,dpup:b13,dpleft:b15,dpdown:b14,dpright:b16, +030000005e0400008e02000004010000,Microsoft X-Box 360 pad,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b6,start:b7,guide:b8,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2, +030000000d0f00002200000011010000,HORI CO. LTD. REAL ARCADE Pro.V3,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,guide:b12,start:b9,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1, +030000000d0f00001000000011010000,HORI CO. LTD. FIGHTING STICK 3,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,guide:b12,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7 +03000000f0250000c183000010010000,Goodbetterbest Ltd USB Controller,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,guide:b12,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, +0000000058626f782047616d65706100,Xbox Gamepad (userspace driver),platform:Linux,a:b0,b:b1,x:b2,y:b3,start:b7,back:b6,guide:b8,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,lefttrigger:a5,righttrigger:a4,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a2,righty:a3, +03000000ff1100003133000010010000,PC Game Controller,a:b2,b:b1,y:b0,x:b3,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Linux, +030000005e0400008e02000020200000,SpeedLink XEOX Pro Analog Gamepad pad,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +030000006f0e00001304000000010000,Generic X-Box pad,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:a0,rightstick:a3,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +03000000a306000018f5000010010000,Saitek PLC Saitek P3200 Rumble Pad,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a4, +03000000830500006020000010010000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,x:b3,y:b2,back:b6,start:b7,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,platform:Linux, +03000000c9110000f055000011010000,HJC Game GAMEPAD,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b11,rightshoulder:b5,rightx:a2,start:b9,righty:a3,dpleft:h0.8,lefttrigger:b6,x:b2,dpup:h0.1,back:b8,leftstick:b10,leftshoulder:b4,y:b3,a:b0,dpright:h0.2,righttrigger:b7,b:b1,platform:Linux, +03000000a30600000c04000011010000,Saitek P2900 Wireless Pad,a:b1,b:b2,y:b3,x:b0,start:b12,guide:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b4,righttrigger:b5,platform:Linux, +03000000341a000005f7000010010000,GameCube {HuiJia USB box},a:b1,b:b2,y:b3,x:b0,start:b9,guide:,back:,leftstick:,rightstick:,leftshoulder:,dpleft:b15,dpdown:b14,dpright:b13,leftx:a0,lefty:a1,rightx:a5,righty:a2,lefttrigger:a3,righttrigger:a4,rightshoulder:b7,dpup:b12,platform:Linux, +030000006e0500000320000010010000,JC-U3613M - DirectInput Mode,platform:Linux,x:b0,a:b2,b:b3,y:b1,back:b10,guide:b12,start:b11,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3, +030000006f0e00004601000001010000,Rock Candy Wired Controller for Xbox One,platform:Linux,a:b0,b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,guide:b8,leftstick:b9,rightstick:b10,lefttrigger:a2,righttrigger:a5,leftx:a0,lefty:a1,rightx:a3,righty:a4, +03000000380700001647000010040000,Mad Catz Wired Xbox 360 Controller,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +030000006f0e00003901000020060000,Afterglow Wired Controller for Xbox One,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,platform:Linux, +030000004f04000015b3000010010000,Thrustmaster Dual Analog 4,platform:Linux,a:b0,b:b2,x:b1,y:b3,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b5,righttrigger:b7, +05000000102800000900000000010000,8Bitdo SFC30 GamePad,platform:Linux,x:b4,a:b1,b:b0,y:b3,back:b10,start:b11,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1, +03000000d81400000862000011010000,HitBox (PS3/PC) Analog Mode,platform:Linux,a:b1,b:b2,y:b3,x:b0,start:b12,guide:b9,back:b8,leftshoulder:b4,rightshoulder:b5,lefttrigger:b6,righttrigger:b7,leftx:a0,lefty:a1, +030000000d0f00000d00000000010000,hori,platform:Linux,a:b0,b:b6,y:b2,x:b1,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,start:b9,guide:b10,back:b8,leftshoulder:b3,rightshoulder:b7,leftx:b4,lefty:b5, +03000000ad1b000016f0000090040000,Mad Catz Xbox 360 Controller,platform:Linux,a:b0,b:b1,y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5, +03000000d814000007cd000011010000,Toodles 2008 Chimp PC/PS3,platform:Linux,a:b0,b:b1,y:b2,x:b3,start:b9,back:b8,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,lefttrigger:b6,righttrigger:b7, +03000000fd0500000030000000010000,InterAct GoPad I-73000 (Fighting Game Layout),platform:Linux,a:b3,b:b4,y:b1,x:b0,start:b7,back:b6,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5, +05000000010000000100000003000000,Nintendo Wiimote,platform:Linux,a:b0,b:b1,y:b3,x:b2,start:b9,guide:b10,back:b8,leftstick:b11,rightstick:b12,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7, +030000005e0400008e02000062230000,Microsoft X-Box 360 pad,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +03000000a30600000901000000010000,Saitek P880,a:b2,b:b3,y:b1,x:b0,leftstick:b8,rightstick:b9,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b6,righttrigger:b7,platform:Linux, +030000006f0e00000103000000020000,Logic3 Controller,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +05000000380700006652000025010000,Mad Catz C.T.R.L.R ,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,guide:b12,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, diff --git a/UWP/Content/knownfuncs.ini b/UWP/Content/knownfuncs.ini new file mode 100644 index 0000000000..0635f46637 --- /dev/null +++ b/UWP/Content/knownfuncs.ini @@ -0,0 +1,337 @@ +006b570008068310:184 = strtok_r +019ba2099fb88f3c:48 = vector_normalize_t +0266f96d740c7e03:912 = memcpy +02bd2859045d2383:240 = bcmp +030507c9a1f0fc85:92 = matrix_rot_x +0483fceefa4557ff:1360 = __udivdi3 +0558ad5c5be00ca1:76 = vtfm_t +05aedd0c04b451a1:356 = sqrt +0654fc8adbe16ef7:28 = vmul_q +06b243c926fa6ab5:24 = vf2in_q +06e2826e02056114:56 = wcslen +075fa9b234b41e9b:32 = fmodf +0a051019bdd786c3:184 = strcasecmp +0a46dc426054bb9d:24 = vector_add_t +0c0173ed70f84f66:48 = vnormalize_t +0c65188f5bfb3915:24 = vsgn_q +0d898513a722ea3c:40 = copysignf +0e99b037b852c8ea:68 = isnan +0eb5f2e95f59276a:40 = dl_write_lightmode +0f1e7533a546f6a1:228 = dl_write_bone_matrix_4 +0f2a1106ad84fb74:52 = strcmp +0ffa5db8396d4274:64 = memcpy_jak +1252e902d0b49bfb:44 = vector_sub_q_2 +12df3d33a58d0298:52 = vmidt_t +12feef7b017d3431:700 = memmove +1322c7e3fe6dff4d:784 = _free_r +1376c115d5f1d90c:36 = strlen +1448134dd3acd1f9:240 = memchr +14800e59c04968d7:100 = wcsstr +14b56e858a27a8a4:24 = vi2f_q +15c4662d5d3c728e:308 = acosf +1616ee7052542059:48 = vtfm_t +16965ca11a4e7dac:104 = vmmul_q_transp +16afe830a5dd2de2:40 = vdiv_q +184e834a63a79016:32 = isnanf +189212bda9c94df1:736 = atanf +199821ce500ef9d2:24 = vocp_t +1a3c8e9d637ed421:104 = __adddf3 +1a7564fa3e25c992:844 = memcpy +1aad94c0723edfc0:124 = vmmul_t_transp +1ab33b12b3cb8cb0:28 = vqmul_q +1ac05627df1f87f4:112 = memcpy16 +1bdf3600844373fd:112 = strstr +1c967be07917ddc9:92 = strcat +1d03fa48334ca966:556 = _strtol_r +1e1525e3bc2f6703:676 = rint +1ec055f28bb9f4d1:88 = gu_update_stall +1ef9cfe6afd3c035:180 = memset +1f53eac122f96b37:224 = cosf +2097a8b75c8fe651:436 = atan2 +21411b3c860822c0:36 = matrix_scale_q_t +24d82a8675800808:220 = ceilf +26cc90cb25af9d27:476 = log10 +2774614d57d4baa2:28 = vsub_q +279c6bf9cf99cc85:436 = strncpy +2876ed93c5fd1211:328 = dl_write_matrix_4 +2965b1ad3ca15cc1:44 = vtfm_t +299a370587df078f:116 = strange_copy_routine +2abca53599f09ea7:608 = dl_write_matrix_3 +2adb92e8855c454e:48 = vtfm_q +2adc229bef7bbc75:40 = isnan +2bcf5268dd26345a:340 = acos +2c4cb2028a1735bf:600 = floor +2ca5958bb816c72e:44 = vector_i2f_t +2e7022d9767c9018:2100 = atan +2f10d3faec84b5bb:276 = sinf +2f639673670caa0e:772 = dl_write_matrix_2 +2f718936b371fc44:40 = vcos_s +3024e961d1811dea:396 = fmod +30c9c4f420573eb6:540 = expf +317afeb882ff324a:212 = memcpy +31ea2e192f5095a1:52 = vector_add_t +31f523ef18898e0e:420 = logf +32806967fe81568b:40 = vector_sub_t_2 +32ceb9a7f72b9385:440 = _strtoul_r +32e6bc7c151491ed:68 = memchr +335df69db1073a8d:96 = wcscpy +33dc6b144cb302c1:304 = memmove +35d3527ff8c22ff2:56 = matrix_scale_q +373ce518eee5a2d2:20 = matrix300_store_q +388043e96b0e11fd:144 = dl_write_material_2 +38f19bc3be215acc:388 = log10f +393047f06eceaba1:96 = strcspn +39a651942a0b3861:204 = tan +3a3bc2b20a55bf02:68 = memchr +3ab08b5659de1746:40 = vsin_s +3c421a9265f37ebc:700 = memmove +3cbc2d50a3db59e9:100 = strncmp +3ce1806699a91d9d:148 = dl_write_light +3d5e914011c181d4:444 = scalbnf +3ea41eafb53fc99a:388 = logf +3fe38bff09ac3da0:436 = _strtoul_r +40a25c7e1fd44fe2:24 = fabsf +410d48d9b6580b4a:36 = dl_write_ztest +42dc17c8018f30f2:44 = vtan.s +436b07caa2aab931:352 = acos +444472537eedf966:32 = vmzero_q +449ff96982626338:28 = vmidt_q +44f65b1a72c45703:36 = strlen +45528de3948615dc:64 = memcpy +456a0d78ac318d15:164 = gta_dl_write_matrix +497248c9d12f44fd:68 = strcpy +4a70207212a4c497:24 = strlen +4b16a5c602c74c6c:24 = vsub_t +4bb677dace6ca526:184 = memset +4c4bdedcc13ac77c:624 = dl_write_matrix_5 +4c91c556d1aa896b:104 = dl_write_material_3 +4cf38c368078181e:616 = dl_write_matrix +4d72b294501cddfb:80 = copysign +4ddd83b7f4ed8d4e:844 = memcpy +4e266783291b0220:28 = vsub_t +4e5950928c0bb082:44 = vmmul_q_transp4 +4f34fc596ecf5b25:40 = vdiv_t +500a949afb39133f:24 = vf2iu_q +50d8f01ea8fa713d:48 = send_commandi +50fa6db2fb14814a:544 = rint +513ce13cd7ce97ea:332 = scalbnf +514161da54d37416:1416 = __umoddi3 +51c52d7dd4d2191c:360 = cos +5287d4b8abd5806b:768 = _strtoll_r +52d5141545a75eda:60 = dl_write_clutformat +530cbe1ce9b45d58:108 = dl_write_light_vector +53c9aa23504a630f:96 = vmmul_q_5 +54015ccbcbc75374:24 = strlen +5550d87a851c218c:168 = dl_write_viewport +55c1294280bfade0:88 = dl_write_blend_fixed +56c9929e8c8c5768:24 = fabsf +572b2d9e57e6e363:788 = memcpy_thingy +580200b840b47c58:1856 = _realloc_r +5961f681bbd69035:28 = vfad_q +598b91c64cf7e036:2388 = qsort +59a0cb08f5ecf8b6:28 = copysignf +5ae4ec2a5e133de3:28 = vector_cross_t +5b005f8375d7c364:236 = floorf +5b103d973fd1dd94:92 = matrix_rot_y +5b9d7e9d4c905694:196 = _calloc_r +5bf7a77b028e9f66:324 = sqrtf +5c0b3edc0e48852c:148 = memmove +5e898df42c4af6b8:76 = wcsncmp +5f473780835e3458:52 = vclamp_q +5fc58ed2c4d48b79:40 = vtfm_q_transp +6145029ef86f0365:76 = __extendsfdf2 +62815f41fa86a131:656 = scalbn +6301fa5149bd973a:120 = wcscat +658b07240a690dbd:36 = strlen +66122f0ab50b2ef9:296 = dl_write_dither_matrix_5 +66f7f1beccbc104a:256 = memcpy_swizzled +679e647e34ecf7f1:132 = roundf +67afe74d9ec72f52:4380 = _strtod_r +68b22c2aa4b8b915:400 = sqrt +6962da85a6dad937:60 = strrchr +69a3c4f774859404:64 = vmmul_q_transp2 +6b022e20ee3fa733:68 = __negdf2 +6b2a6347c0dfcb57:152 = strcpy +6b4148322c569cb3:240 = wmemchr +6c4cb6d25851553a:44 = vtfm_t +6c7b2462b9ec7bc7:56 = vmmul_q +6ca9cc8fa485d096:304 = __ieee754_sqrtf +6ccffc753d2c148e:96 = strlwr +6e40ec681fb5c571:40 = matrix_copy_q +6e9884c842a51142:236 = strncasecmp +6f101c5c4311c144:276 = floorf +6f1731f84bbf76c3:116 = strcmp +6f4e1a1a84df1da0:68 = dl_write_texmode +70649c7211f6a8da:16 = fabsf +7245b74db370ae72:64 = vmmul_q_transp3 +7259d52b21814a5a:40 = vtfm_t_transp +736b34ebc702d873:104 = vmmul_q_transp +7499a2ce8b60d801:12 = abs +74ebbe7d341463f3:72 = dl_write_colortest +755a41f9183bb89a:60 = vmmul_q +759834c69bb12c12:68 = strcpy +75c5a88d62c9c99f:276 = sinf +76c661fecbb39990:364 = sin +770c9c07bf58fd14:16 = fabsf +774e479eb9634525:464 = _strtol_r +77aeb1c23f9aa2ad:56 = strchr +78e8c65b5a458f33:148 = memcmp +794d1b073c183c77:24 = fabsf +7978a886cf70b1c9:56 = wcschr +79faa339fff5a80c:28 = finitef +7c50728008c288e3:36 = vector_transform_q_4x4 +7f1fc0dce6be120a:404 = fmod +828b98925af9ff8f:40 = vector_distance_t +83ac39971df4b966:336 = sqrtf +84c6cd47834f4c79:1284 = powf +8734dc1d155ea493:24 = vf2iz_q +87fe3f7e621ddebb:212 = memcpy +891ca854e1c664e9:2392 = qsort +8965d4b004adad28:420 = log10f +89e1858ba11b84e4:52 = memset +8a00e7207e7dbc81:232 = _exit +8a1f9daadecbaf7f:104 = vmmul_q_transp +8a610f34078ce360:32 = vector_copy_q_t +8c3fd997a544d0b1:268 = memcpy +8df2928848857e97:164 = strcat +8e48cabd529ca6b5:52 = vector_multiply_t +8e97dcb03fbaba5c:104 = vmmul_q_transp +8ee81b03d2eef1e7:28 = vmul_t +8f19c41e8b987e18:100 = matrix_mogrify +8ff11e9bed387401:700 = memmove +910140c1a07aa59e:256 = rot_matrix_euler_zyx +91606bd72ae90481:44 = wmemcpy +92c7d2de74068c9c:32 = vcross_t +93d8a275ba288b26:32 = vdot_t +94c7083b64a946b4:2028 = powf +95a52ce1bc460108:2036 = _malloc_r +95bd33ac373c019a:24 = fabsf +9705934b0950d68d:280 = dl_write_framebuffer_ptr +9734cf721bc0f3a1:732 = atanf +9a06b9d5c16c4c20:76 = dl_write_clut_ptrload +9b88b739267d189e:88 = strrchr +9ce53975bb88c0e7:96 = strncpy +9d4f5f56b52f07f2:808 = memmove +9e2941c4a5c5e847:792 = memcpy +9e6ce11f9d49f954:292 = memcpy +9f269daa6f0da803:128 = dl_write_scissor_region +9f7919eeb43982b0:208 = __fixdfsi +a1ca0640f11182e7:72 = strcspn +a243486be51ce224:272 = cosf +a2bcef60a550a3ef:92 = matrix_rot_z +a41989db0f9bf97e:1304 = pow +a44f6227fdbc12b1:132 = memcmp +a46cc6ea720d5775:44 = dl_write_cull +a54967288afe8f26:600 = ceil +a5ddbbc688e89a4d:56 = isinf +a662359e30b829e4:148 = memcmp +a8390e65fa087c62:140 = vtfm_t_q +a85fe8abb88b1c6f:52 = vector_sub_t +a9194e55cc586557:268 = memcpy +a91b3d60bd75105b:28 = vadd_t +ab97ec58c58a7c75:52 = vector_divide_t +acc2c11c3ea28320:268 = ceilf +ad67add5122b8c64:52 = matrix_q_translate_t +ada952a1adcea4f5:60 = vmmul_q_transp5 +adfbf8fb8c933193:56 = fabs +ae50226363135bdd:24 = vector_sub_t +ae6cd7dfac82c244:48 = vpow_s +af85d47f95ad2921:1936 = pow +afb2c7e56c04c8e9:48 = vtfm_q +afc9968e7d246a5e:1588 = atan +afcb7dfbc4d72588:44 = vector_transform_3x4 +b0db731f27d3aa1b:40 = vmax_s +b0ef265e87899f0a:32 = vector_divide_t_s +b183a37baa12607b:32 = vscl_t +b1a3e60a89af9857:20 = fabs +b3fef47fb27d57c9:44 = vector_scale_t +b43fd5078ae78029:84 = send_commandi_stall +b43ffbd4dc446dd2:324 = atan2f +b5fdb3083e6f4b3f:36 = vhtfm_t +b6a04277fb1e1a1a:104 = vmmul_q_transp +b7448c5ffdd3b0fc:356 = atan2f +b7d88567dc22aab1:820 = memcpy +b877d3c37a7aaa5d:60 = vmmul_q_2 +b89aa73b6f94ba95:52 = vclamp_t +b8bd1f0e02e9ad87:156 = dl_write_light_dir +b8cfaeebfeb2de20:7548 = _vfprintf_r +b97f352e85661af6:32 = finitef +bb3c6592ed319ba4:132 = dl_write_fog_params +bb7d7c93e4c08577:124 = __truncdfsf2 +bdf54d66079afb96:200 = dl_write_bone_matrix_3 +be773f78afd1a70f:128 = rand +bf5d02ccb8514881:108 = strcmp +bf791954ebef4afb:396 = expf +bfe07e305abc4cd1:808 = memmove +c0feb88cc04a1dc7:48 = vector_negate_t +c1f34599d0b9146b:116 = __subdf3 +c319f0d107dd2f45:888 = __muldf3 +c35c10300b6b6091:620 = floor +c3dbf3e6c80a0a51:164 = dl_write_bone_matrix +c51519f5dab342d4:224 = cosf +c52c14b9af8c3008:76 = memcmp +c54eae62622f1e11:164 = dl_write_bone_matrix_2 +c96e3a087ebf49a9:100 = dl_write_light_color +cb7a2edd603ecfef:48 = vtfm_p +cdf64d21418b2667:24 = vzero_q +ce1c95ee25b8e2ea:448 = fmod +ce4d18a75b98859f:40 = vector_add_t_2 +ceb5372d0003d951:52 = dl_write_stenciltest +cee11483b550ce8f:24 = vocp_q +cfecf208769ed5fd:272 = cosf +d019b067b58cf6c3:700 = memmove +d12a3a91e0040229:524 = dl_write_enable_disable +d1faacfc711d61e8:68 = __negdf2 +d207b0650a41dd9c:28 = vmin_q +d6d6e0bb21654778:24 = vneg_t +d7229fee680e7851:40 = vmin_s +d75670860a7f4b05:144 = wcsncpy +d76d1a8804c7ec2c:100 = dl_write_material +d7d350c0b33a4662:28 = vadd_q +d80051931427dca0:116 = __subdf3 +da51dab503b06979:32 = vmidt_q +dc0cc8b400ecfbf2:36 = strcmp +dcab869acf2bacab:292 = strncasecmp +dcdf7e1c1a3dc260:372 = strncmp +dcfc28e624a81bf1:5476 = _dtoa_r +ddfa5a85937aa581:32 = vdot_q +e0214719d8a0aa4e:104 = strstr +e029f0699ca3a886:76 = matrix300_transform_by +e1107cf3892724a0:460 = _memalign_r +e1724e6e29209d97:24 = vector_length_t_2 +e1a5d939cc308195:68 = wcscmp +e2d9106e5b9e39e6:80 = strnlen +e32cb5c062d1a1c4:700 = _strtoull_r +e3835fb2c9c04e59:44 = vmmul_q +e527c62d8613f297:136 = strcpy +e7b36c2c1348551d:148 = tan +e83a7a9d80a21c11:4448 = _strtod_r +e894bda909a8a8f9:1064 = expensive_wipeout_pulse +e8ad7719be44e7c8:276 = strchr +eabb9c1b4f83d2b4:52 = memset +eb0f7bf63d52ece9:88 = strncat +eb8c0834d8bbc28c:416 = fmodf +edbbe9bf9fbceca8:172 = dl_write_viewport2 +edc3f476221f96e6:148 = tanf +f1f660fdf349eac2:1588 = _malloc_r +f38a356a359dbe06:28 = vmax_q +f3fc2220ed0f2703:32 = send_commandf +f4d797cef4ac88cd:684 = _free_r +f4ea7d2ec943fa02:224 = sinf +f4f8cdf479dfc4a4:224 = sinf +f52f993e444b6c52:44 = dl_write_shademode +f56641884b36c638:468 = scalbn +f5f7826b4a61767c:40 = matrix_copy_q +f73c094e492bc163:396 = hypot +f7fc691db0147e25:96 = strspn +f842aea3baa61f29:32 = vector_length_t +f8e0902f4099a9d6:2260 = qsort +f972543ab7df071a:32 = vsqrt_s +f9b00ef163e8b9d4:32 = vscl_q +f9ea1bf2a897ef24:588 = ceil +fa156c48461eeeb9:24 = vf2id_q +fb4253a1d9d9df9f:20 = isnanf +fd34a9ad94fa6241:76 = __extendsfdf2 +fe4f0280240008e9:28 = vavg_q +fe5dd338ab862291:216 = memset +ffc8f5f8f946152c:192 = dl_write_light_color diff --git a/UWP/Content/langregion.ini b/UWP/Content/langregion.ini new file mode 100644 index 0000000000..8838d9a9a2 --- /dev/null +++ b/UWP/Content/langregion.ini @@ -0,0 +1,59 @@ +[LangRegionNames] +ja_JP = "日本語" +en_US = "English" +fi_FI = "Suomi" +fr_FR = "Français" +es_ES = "Castellano (España)" +es_LA = "Español (América Latina)" +de_DE = "Deutsch" +it_IT = "Italiano" +nl_NL = "Nederlands" +pt_PT = "Português" +pt_BR = "Português Brasileiro" +ru_RU = "Русский" +ko_KR = "한국어" +zh_TW = "繁體中文" +zh_CN = "简体中文" +ar_AE = "العربية" +az_AZ = "Azeri" +ca_ES = "Català" +gl_ES = "Galego" +gr_EL = "Ελληνικά" +he_IL = "עברית" +hu_HU = "Magyar" +id_ID = "Indonesia" +pl_PL = "Polski" +ro_RO = "Român" +sv_SE = "Svenska" +tr_TR = "Türk" +uk_UA = "Українська" +vi_VN = "Tiếng Việt" +cz_CZ = "Česky" +tg_PH = "Tagalog" +th_TH = "ไทย" +dr_ID = "Duri" +fa_IR = "فارسی" +ms_MY = "Melayu" +da_DK = "Dansk" +no_NO = "Norsk" +bg_BG = "български език" +lt-LT = "Lithuanian" +jv_ID = "Jawa" + +[SystemLanguage] +ja_JP = "JAPANESE" +en_US = "ENGLISH" +fr_FR = "FRENCH" +es_ES = "SPANISH" +gl_ES = "SPANISH" +es_LA = "SPANISH" +de_DE = "GERMAN" +it_IT = "ITALIAN" +nl_NL = "DUTCH" +pt_PT = "PORTUGUESE" +pt_BR = "PORTUGUESE" +ru_RU = "RUSSIAN" +ko_KR = "KOREAN" +th_TH = "THAI" +zh_TW = "CHINESE_TRADITIONAL" +zh_CN = "CHINESE_SIMPLIFIED" diff --git a/UWP/Content/ppge_atlas.zim b/UWP/Content/ppge_atlas.zim new file mode 100644 index 0000000000..2b50603a37 Binary files /dev/null and b/UWP/Content/ppge_atlas.zim differ diff --git a/UWP/Content/rargray.png b/UWP/Content/rargray.png new file mode 100644 index 0000000000..90bdf104cd Binary files /dev/null and b/UWP/Content/rargray.png differ diff --git a/UWP/Content/ui_atlas.zim b/UWP/Content/ui_atlas.zim new file mode 100644 index 0000000000..5aad9ac292 Binary files /dev/null and b/UWP/Content/ui_atlas.zim differ diff --git a/UWP/Content/ui_atlas_lowmem.zim b/UWP/Content/ui_atlas_lowmem.zim new file mode 100644 index 0000000000..92062a9ea5 Binary files /dev/null and b/UWP/Content/ui_atlas_lowmem.zim differ diff --git a/UWP/Content/unknown.png b/UWP/Content/unknown.png new file mode 100644 index 0000000000..1a233d9519 Binary files /dev/null and b/UWP/Content/unknown.png differ diff --git a/UWP/Content/zip.png b/UWP/Content/zip.png new file mode 100644 index 0000000000..beb6822e5f Binary files /dev/null and b/UWP/Content/zip.png differ diff --git a/UWP/CoreUWP/CoreUWP.vcxproj b/UWP/CoreUWP/CoreUWP.vcxproj new file mode 100644 index 0000000000..17d35ebbdc --- /dev/null +++ b/UWP/CoreUWP/CoreUWP.vcxproj @@ -0,0 +1,790 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + UWP Gold + ARM + + + UWP Gold + Win32 + + + UWP Gold + x64 + + + + {40b76674-02de-40ef-889b-fad1489685e7} + StaticLibrary + CoreUWP + en-US + 14.0 + true + Windows Store + 10.0.10586.0 + 10.0.10240.0 + 10.0 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Use + false + true + pch.h + ../../ffmpeg/Windows10/x86/include;../..;../../ext/native;../../ext/snappy;../../Common;../../ext/zlib;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + USE_FFMPEG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../../ffmpeg/Windows10/x86/include;../..;../../ext/native;../../ext/snappy;../../Common;../../ext/zlib;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + USE_FFMPEG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../../ffmpeg/Windows10/x86/include;../..;../../ext/native;../../ext/snappy;../../Common;../../ext/zlib;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + USE_FFMPEG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../../ffmpeg/Windows10/ARM/include;../../ffmpeg/WindowsInclude;../..;../../ext/native;../../ext/snappy;../../Common;../../ext/zlib;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + USE_FFMPEG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../../ffmpeg/Windows10/ARM/include;../../ffmpeg/WindowsInclude;../..;../../ext/native;../../ext/snappy;../../Common;../../ext/zlib;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + USE_FFMPEG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../../ffmpeg/Windows10/ARM/include;../../ffmpeg/WindowsInclude;../..;../../ext/native;../../ext/snappy;../../Common;../../ext/zlib;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + USE_FFMPEG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../../ffmpeg/Windows10/x64/include;../../ffmpeg/WindowsInclude;../..;../../ext/native;../../ext/snappy;../../Common;../../ext/zlib;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + USE_FFMPEG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../../ffmpeg/Windows10/x64/include;../../ffmpeg/WindowsInclude;../..;../../ext/native;../../ext/snappy;../../Common;../../ext/zlib;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + USE_FFMPEG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../../ffmpeg/Windows10/x64/include;../../ffmpeg/WindowsInclude;../..;../../ext/native;../../ext/snappy;../../Common;../../ext/zlib;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + USE_FFMPEG;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + Create + Create + Create + Create + Create + Create + Create + Create + Create + + + + + {acb316ca-3ecb-48e5-be0a-91e72d5b0f12} + + + + + + \ No newline at end of file diff --git a/UWP/CoreUWP/CoreUWP.vcxproj.filters b/UWP/CoreUWP/CoreUWP.vcxproj.filters new file mode 100644 index 0000000000..2b20fc1219 --- /dev/null +++ b/UWP/CoreUWP/CoreUWP.vcxproj.filters @@ -0,0 +1,1150 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms + + + {651b350c-cb4d-400e-8d18-cfb8413313d2} + + + {c9faaeb5-ada3-41ba-9bf1-35b13e3ea059} + + + {22a6ef3c-13be-49b5-9a37-713635124525} + + + {2aa716ba-a602-4f30-9ec7-4bfa7e2d29ab} + + + {12e7c4a9-e8f1-4284-97b1-d1e7a01f4bfc} + + + {b054550e-6280-41b2-b867-eca77fe86c9e} + + + {caa89656-e677-43e0-814c-554b091ff8c9} + + + {c99f4b4f-10f9-4900-90e3-917c54f25ab6} + + + {00435c7b-988e-474d-bd79-1895615f9e23} + + + {4b683e84-143b-4cec-8f44-c22796941580} + + + {a26a4cc8-fee2-4bd7-bf5f-a64a09b12fe4} + + + {d2f0d6db-6d9f-4b51-b669-5235b62e3f9c} + + + {6610d0d5-9522-491a-a281-785bde03c192} + + + {9c5247a4-2f82-44a1-90b8-333123913ef5} + + + {3c09fd8a-787b-4ade-8c7a-0e648e0ceb02} + + + {a1e8e961-d324-459f-918c-3387bf987e1a} + + + {dc076a61-7770-46c5-ab43-98cff13a12d1} + + + {5505b40e-3f96-4e3f-aca3-cd6bd7c7ab73} + + + {e0604f48-5522-43e8-ba22-6d08bc2ccacd} + + + {9c6552c2-9858-41da-a920-31ea5628d417} + + + + + + + + + + + + + + + + + + + + + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\JitCommon + + + MIPS\JitCommon + + + MIPS\JitCommon + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + FileSystems + + + FileSystems + + + FileSystems + + + FileSystems + + + FileSystems + + + FileSystems + + + FileSystems + + + HW + + + HW + + + HW + + + HW + + + HW + + + HW + + + HW + + + HW + + + Util + + + Util + + + Util + + + Util + + + Util + + + Util + + + Util + + + ELF + + + ELF + + + ELF + + + ELF + + + FileLoaders + + + FileLoaders + + + FileLoaders + + + FileLoaders + + + FileLoaders + + + FileLoaders + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + Font + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Debugger + + + Debugger + + + Debugger + + + Ext\SFMT + + + Ext\snappy + + + Ext\snappy + + + Ext\udis86 + + + Ext\udis86 + + + Ext\udis86 + + + Ext\udis86 + + + Ext\udis86 + + + Ext\udis86 + + + Ext\xbrz + + + Ext\disarm + + + Ext + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + + + + + + + + + + + + + + + + + + + + + + + + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\ARM + + + MIPS\JitCommon + + + MIPS\JitCommon + + + MIPS\JitCommon + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + MIPS\x86 + + + FileSystems + + + FileSystems + + + FileSystems + + + FileSystems + + + FileSystems + + + FileSystems + + + HW + + + HW + + + HW + + + HW + + + HW + + + HW + + + HW + + + HW + + + HW + + + Util + + + Util + + + Util + + + Util + + + Util + + + Util + + + Util + + + ELF + + + ELF + + + ELF + + + ELF + + + ELF + + + FileLoaders + + + FileLoaders + + + FileLoaders + + + FileLoaders + + + FileLoaders + + + FileLoaders + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + HLE + + + Font + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + MIPS + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Dialog + + + Debugger + + + Debugger + + + Debugger + + + Debugger + + + Ext\SFMT + + + Ext\SFMT + + + Ext\SFMT + + + Ext\SFMT + + + Ext\snappy + + + Ext\snappy + + + Ext\snappy + + + Ext\snappy + + + Ext\snappy + + + Ext\snappy + + + Ext\udis86 + + + Ext\udis86 + + + Ext\udis86 + + + Ext\udis86 + + + Ext\udis86 + + + Ext\udis86 + + + Ext\udis86 + + + Ext\xbrz + + + Ext\xbrz + + + Ext\disarm + + + Ext + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + MIPS\IR + + + + \ No newline at end of file diff --git a/UWP/CoreUWP/pch.cpp b/UWP/CoreUWP/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/UWP/CoreUWP/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/UWP/CoreUWP/pch.h b/UWP/CoreUWP/pch.h new file mode 100644 index 0000000000..529bbb17fe --- /dev/null +++ b/UWP/CoreUWP/pch.h @@ -0,0 +1,9 @@ +#pragma once + +#include "targetver.h" + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#include diff --git a/UWP/CoreUWP/targetver.h b/UWP/CoreUWP/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/UWP/CoreUWP/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/UWP/GPU_UWP/GPU_UWP.vcxproj b/UWP/GPU_UWP/GPU_UWP.vcxproj new file mode 100644 index 0000000000..0200d09d61 --- /dev/null +++ b/UWP/GPU_UWP/GPU_UWP.vcxproj @@ -0,0 +1,431 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + UWP Gold + ARM + + + UWP Gold + Win32 + + + UWP Gold + x64 + + + + {5d271429-c288-4534-98af-94475d940058} + StaticLibrary + GPU_UWP + en-US + 14.0 + true + Windows Store + 10.0.10586.0 + 10.0.10240.0 + 10.0 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Use + false + true + pch.h + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + Create + + + + + {acb316ca-3ecb-48e5-be0a-91e72d5b0f12} + + + {40b76674-02de-40ef-889b-fad1489685e7} + + + {d326891e-ece4-4b94-b5e7-8aa0a8e8ecbc} + + + {2b2d16bd-1d37-46af-a3f8-552900951b26} + + + + + + \ No newline at end of file diff --git a/UWP/GPU_UWP/GPU_UWP.vcxproj.filters b/UWP/GPU_UWP/GPU_UWP.vcxproj.filters new file mode 100644 index 0000000000..4ede6509b6 --- /dev/null +++ b/UWP/GPU_UWP/GPU_UWP.vcxproj.filters @@ -0,0 +1,291 @@ + + + + + {73b2cfa4-f51e-48f5-a9fd-2c4df203a4f0} + + + {7634891c-a60e-48d4-abdb-d8fe347dfef5} + + + {508714cf-18c6-4a82-b92d-1527d9a100f0} + + + {15dc3187-4c49-46a7-8027-6ff23564cc22} + + + {b5c82a80-e146-4133-b199-a07a427f04cc} + + + + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D9 + + + D3D9 + + + + + + + + Software + + + Software + + + Software + + + Software + + + Software + + + Debugger + + + Debugger + + + Common + + + + + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D11 + + + D3D9 + + + D3D9 + + + + + + + + + + Software + + + Software + + + Software + + + Software + + + Software + + + Debugger + + + Debugger + + + \ No newline at end of file diff --git a/UWP/GPU_UWP/pch.cpp b/UWP/GPU_UWP/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/UWP/GPU_UWP/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/UWP/GPU_UWP/pch.h b/UWP/GPU_UWP/pch.h new file mode 100644 index 0000000000..529bbb17fe --- /dev/null +++ b/UWP/GPU_UWP/pch.h @@ -0,0 +1,9 @@ +#pragma once + +#include "targetver.h" + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#include diff --git a/UWP/GPU_UWP/targetver.h b/UWP/GPU_UWP/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/UWP/GPU_UWP/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/UWP/NKCodeFromWindowsSystem.cpp b/UWP/NKCodeFromWindowsSystem.cpp new file mode 100644 index 0000000000..01c6aeda21 --- /dev/null +++ b/UWP/NKCodeFromWindowsSystem.cpp @@ -0,0 +1,110 @@ +#include "pch.h" +#include "NKCodeFromWindowsSystem.h" + +using namespace Windows::System; + +std::map virtualKeyCodeToNKCode{ + { VirtualKey::A, NKCODE_A }, + { VirtualKey::B, NKCODE_B }, + { VirtualKey::C, NKCODE_C }, + { VirtualKey::D, NKCODE_D }, + { VirtualKey::E, NKCODE_E }, + { VirtualKey::F, NKCODE_F }, + { VirtualKey::G, NKCODE_G }, + { VirtualKey::H, NKCODE_H }, + { VirtualKey::I, NKCODE_I }, + { VirtualKey::J, NKCODE_J }, + { VirtualKey::K, NKCODE_K }, + { VirtualKey::L, NKCODE_L }, + { VirtualKey::M, NKCODE_M }, + { VirtualKey::N, NKCODE_N }, + { VirtualKey::O, NKCODE_O }, + { VirtualKey::P, NKCODE_P }, + { VirtualKey::Q, NKCODE_Q }, + { VirtualKey::R, NKCODE_R }, + { VirtualKey::S, NKCODE_S }, + { VirtualKey::T, NKCODE_T }, + { VirtualKey::U, NKCODE_U }, + { VirtualKey::V, NKCODE_V }, + { VirtualKey::W, NKCODE_W }, + { VirtualKey::X, NKCODE_X }, + { VirtualKey::Y, NKCODE_Y }, + { VirtualKey::Z, NKCODE_Z }, + { VirtualKey::Number0, NKCODE_0 }, + { VirtualKey::Number1, NKCODE_1 }, + { VirtualKey::Number2, NKCODE_2 }, + { VirtualKey::Number3, NKCODE_3 }, + { VirtualKey::Number4, NKCODE_4 }, + { VirtualKey::Number5, NKCODE_5 }, + { VirtualKey::Number6, NKCODE_6 }, + { VirtualKey::Number7, NKCODE_7 }, + { VirtualKey::Number8, NKCODE_8 }, + { VirtualKey::Number9, NKCODE_9 }, + { VirtualKey::Decimal, NKCODE_PERIOD }, + // { VirtualKey::Comma, NKCODE_COMMA }, + { VirtualKey::NumberPad0, NKCODE_NUMPAD_0 }, + { VirtualKey::NumberPad1, NKCODE_NUMPAD_1 }, + { VirtualKey::NumberPad2, NKCODE_NUMPAD_2 }, + { VirtualKey::NumberPad3, NKCODE_NUMPAD_3 }, + { VirtualKey::NumberPad4, NKCODE_NUMPAD_4 }, + { VirtualKey::NumberPad5, NKCODE_NUMPAD_5 }, + { VirtualKey::NumberPad6, NKCODE_NUMPAD_6 }, + { VirtualKey::NumberPad7, NKCODE_NUMPAD_7 }, + { VirtualKey::NumberPad8, NKCODE_NUMPAD_8 }, + { VirtualKey::NumberPad9, NKCODE_NUMPAD_9 }, + { VirtualKey::Decimal, NKCODE_NUMPAD_DOT }, + { VirtualKey::Divide, NKCODE_NUMPAD_DIVIDE }, + { VirtualKey::Multiply, NKCODE_NUMPAD_MULTIPLY }, + { VirtualKey::Subtract, NKCODE_NUMPAD_SUBTRACT }, + { VirtualKey::Add, NKCODE_NUMPAD_ADD }, + { VirtualKey::Separator, NKCODE_NUMPAD_COMMA }, + { VirtualKey::LeftControl, NKCODE_CTRL_LEFT }, + { VirtualKey::RightControl, NKCODE_CTRL_RIGHT }, + { VirtualKey::LeftShift, NKCODE_SHIFT_LEFT }, + { VirtualKey::RightShift, NKCODE_SHIFT_RIGHT }, + //{ VK_LMENU, NKCODE_ALT_LEFT }, + //{ VK_RMENU, NKCODE_ALT_RIGHT }, + { VirtualKey::GoBack, NKCODE_BACK }, + { VirtualKey::Space, NKCODE_SPACE }, + { VirtualKey::Escape, NKCODE_ESCAPE }, + { VirtualKey::Up, NKCODE_DPAD_UP }, + { VirtualKey::Insert, NKCODE_INSERT }, + { VirtualKey::Home, NKCODE_MOVE_HOME }, + { VirtualKey::PageUp, NKCODE_PAGE_UP }, + { VirtualKey::PageDown, NKCODE_PAGE_DOWN }, + { VirtualKey::Delete, NKCODE_FORWARD_DEL }, + { VirtualKey::End, NKCODE_MOVE_END }, + { VirtualKey::Tab, NKCODE_TAB }, + { VirtualKey::Down, NKCODE_DPAD_DOWN }, + { VirtualKey::Left, NKCODE_DPAD_LEFT }, + { VirtualKey::Right, NKCODE_DPAD_RIGHT }, + { VirtualKey::CapitalLock, NKCODE_CAPS_LOCK }, + { VirtualKey::Clear, NKCODE_CLEAR }, + // { VirtualKey::, NKCODE_SYSRQ }, + { VirtualKey::Scroll, NKCODE_SCROLL_LOCK }, + // { , NKCODE_SEMICOLON }, + // { VK_OEM_2, NKCODE_SLASH }, + // { VK_OEM_3, NKCODE_GRAVE }, + // { VK_OEM_4, NKCODE_LEFT_BRACKET }, + // { VK_OEM_5, NKCODE_BACKSLASH }, + // { VK_OEM_6, NKCODE_RIGHT_BRACKET }, + // { VK_OEM_7, NKCODE_APOSTROPHE }, + { VirtualKey::Enter, NKCODE_ENTER }, + // { VK_APPS, NKCODE_MENU }, // Context menu key, let's call this "menu". + { VirtualKey::Pause, NKCODE_BREAK }, + { VirtualKey::F1, NKCODE_F1 }, + { VirtualKey::F2, NKCODE_F2 }, + { VirtualKey::F3, NKCODE_F3 }, + { VirtualKey::F4, NKCODE_F4 }, + { VirtualKey::F5, NKCODE_F5 }, + { VirtualKey::F6, NKCODE_F6 }, + { VirtualKey::F7, NKCODE_F7 }, + { VirtualKey::F8, NKCODE_F8 }, + { VirtualKey::F9, NKCODE_F9 }, + { VirtualKey::F10, NKCODE_F10 }, + { VirtualKey::F11, NKCODE_F11 }, + { VirtualKey::F12, NKCODE_F12 }, + //{ VK_OEM_102, NKCODE_EXT_PIPE }, + //{ VK_LBUTTON, NKCODE_EXT_MOUSEBUTTON_1 }, + //{ VK_RBUTTON, NKCODE_EXT_MOUSEBUTTON_2 },; +}; \ No newline at end of file diff --git a/UWP/NKCodeFromWindowsSystem.h b/UWP/NKCodeFromWindowsSystem.h new file mode 100644 index 0000000000..470a72456a --- /dev/null +++ b/UWP/NKCodeFromWindowsSystem.h @@ -0,0 +1,7 @@ +#pragma once + +#include + +#include "input/keycodes.h" + +extern std::map virtualKeyCodeToNKCode; \ No newline at end of file diff --git a/UWP/NativeUWP/NativeUWP.vcxproj b/UWP/NativeUWP/NativeUWP.vcxproj new file mode 100644 index 0000000000..c03420e802 --- /dev/null +++ b/UWP/NativeUWP/NativeUWP.vcxproj @@ -0,0 +1,1320 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + UWP Gold + ARM + + + UWP Gold + Win32 + + + UWP Gold + x64 + + + + {935028af-b850-4ad7-a00e-7ba84fb97d05} + StaticLibrary + NativeUWP + en-US + 14.0 + true + Windows Store + 10.0.10586.0 + 10.0.10240.0 + 10.0 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Use + false + true + pch.h + ../..;../../ext/native/ext;../..;../../ext/native;../../ext/zlib;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native/ext;../..;../../ext/native;../../ext/zlib;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native/ext;../..;../../ext/native;../../ext/zlib;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native/ext;../..;../../ext/native;../../ext/zlib;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native/ext;../..;../../ext/native;../../ext/zlib;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native/ext;../..;../../ext/native;../../ext/zlib;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native/ext;../..;../../ext/native;../../ext/zlib;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native/ext;../..;../../ext/native;../../ext/zlib;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + ../..;../../ext/native/ext;../..;../../ext/native;../../ext/zlib;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + Create + + + + + {ddf90203-0aae-4f38-b589-2e9637658ce6} + + + + + + \ No newline at end of file diff --git a/UWP/NativeUWP/NativeUWP.vcxproj.filters b/UWP/NativeUWP/NativeUWP.vcxproj.filters new file mode 100644 index 0000000000..04fe80993b --- /dev/null +++ b/UWP/NativeUWP/NativeUWP.vcxproj.filters @@ -0,0 +1,729 @@ + + + + + {903dae00-880d-4c12-bd10-29fca750376f} + + + {98343696-3517-451a-9b47-94d462263e3e} + + + {63177c91-8ebd-4e87-ad4e-e6b8b52879c8} + + + {58d2f6cf-2448-4095-8479-9fe5d765b573} + + + {8a254b8c-46f2-4ff1-bc53-deea7e614276} + + + {244992ec-8dcf-49f4-b63c-cae6ac437c58} + + + {6f098c49-cf71-466b-9b1e-c4287681ab26} + + + {9d02a269-6cdd-4726-ab58-34c012e37d37} + + + {8292cb5c-02c9-46a4-a8d5-ea5e8f362688} + + + {d8c0dd74-7ad2-440a-a3e0-5dbf3435a2fc} + + + {a522f449-7873-4af7-908e-7cc91eb8bfc0} + + + {2be24387-0b6a-4253-97fa-b8b6f75a8a4c} + + + {7fdd3320-a8e0-42ed-b08b-2d86ba2ff414} + + + {1a486fc4-bac0-4b33-9139-262272690c74} + + + {f3b2701a-3ddc-4604-a867-2ee9a0600dab} + + + {34445680-c1be-4aec-a716-1e118ef48906} + + + {96ac6deb-ad00-4ee4-9f0d-515d78d1886b} + + + {3ffe0470-9652-4d89-a3d1-7eb989d266ab} + + + {4d23e7d3-0b9b-4dbe-95df-6ab250782a66} + + + + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + thin3d + + + thin3d + + + thread + + + thread + + + thread + + + thread + + + util + + + util + + + util + + + util + + + gfx + + + gfx + + + file + + + file + + + file + + + file + + + file + + + file + + + file + + + input + + + input + + + ui + + + ui + + + ui + + + ui + + + ui + + + ui + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + net + + + net + + + net + + + net + + + net + + + net + + + i18n + + + ext\vjson + + + ext\vjson + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\jpge + + + ext\jpge + + + gfx + + + image + + + image + + + ext\cityhash + + + gfx + + + data + + + gfx + + + base + + + + + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + thin3d + + + thread + + + thread + + + thread + + + thread + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + util + + + gfx + + + gfx + + + file + + + file + + + file + + + file + + + file + + + file + + + file + + + file + + + input + + + input + + + input + + + ui + + + ui + + + ui + + + ui + + + ui + + + ui + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + net + + + net + + + net + + + net + + + net + + + net + + + i18n + + + ext\vjson + + + ext\vjson + + + ext\libzip + + + ext\libzip + + + ext\libzip + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\libpng17 + + + ext\jpge + + + ext\jpge + + + gfx + + + image + + + image + + + ext\cityhash + + + ext\cityhash + + + gfx + + + data + + + data + + + gfx + + + \ No newline at end of file diff --git a/UWP/NativeUWP/pch.cpp b/UWP/NativeUWP/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/UWP/NativeUWP/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/UWP/NativeUWP/pch.h b/UWP/NativeUWP/pch.h new file mode 100644 index 0000000000..529bbb17fe --- /dev/null +++ b/UWP/NativeUWP/pch.h @@ -0,0 +1,9 @@ +#pragma once + +#include "targetver.h" + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#include diff --git a/UWP/NativeUWP/targetver.h b/UWP/NativeUWP/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/UWP/NativeUWP/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/UWP/PPSSPP_UWP.sln b/UWP/PPSSPP_UWP.sln new file mode 100644 index 0000000000..e2427c75ac --- /dev/null +++ b/UWP/PPSSPP_UWP.sln @@ -0,0 +1,309 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CommonUWP", "CommonUWP\CommonUWP.vcxproj", "{ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CoreUWP", "CoreUWP\CoreUWP.vcxproj", "{40B76674-02DE-40EF-889B-FAD1489685E7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GPU_UWP", "GPU_UWP\GPU_UWP.vcxproj", "{5D271429-C288-4534-98AF-94475D940058}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NativeUWP", "NativeUWP\NativeUWP.vcxproj", "{935028AF-B850-4AD7-A00E-7BA84FB97D05}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UI_UWP", "UI_UWP\UI_UWP.vcxproj", "{5FAC15BD-7397-4512-99D5-66CDC03AF5B7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libkirk_UWP", "libkirk_UWP\libkirk_UWP.vcxproj", "{2F911C05-B341-4291-8BF5-09EDECBDD5F5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib_UWP", "zlib_UWP\zlib_UWP.vcxproj", "{DDF90203-0AAE-4F38-B589-2E9637658CE6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPSSPP_UWP", "UWP.vcxproj", "{01D7D581-09A3-4A26-94BD-A7C529B29329}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glslang_UWP", "glslang_UWP\glslang_UWP.vcxproj", "{D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SPIRVCross_UWP", "SPIRVCross_UWP\SPIRVCross_UWP.vcxproj", "{2B2D16BD-1D37-46AF-A3F8-552900951B26}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|ARM = Release|ARM + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Tests|ARM = Tests|ARM + Tests|Win32 = Tests|Win32 + Tests|x64 = Tests|x64 + UWP Gold|ARM = UWP Gold|ARM + UWP Gold|Win32 = UWP Gold|Win32 + UWP Gold|x64 = UWP Gold|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Debug|ARM.ActiveCfg = Debug|ARM + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Debug|ARM.Build.0 = Debug|ARM + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Debug|Win32.ActiveCfg = Debug|Win32 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Debug|Win32.Build.0 = Debug|Win32 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Debug|x64.ActiveCfg = Debug|x64 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Debug|x64.Build.0 = Debug|x64 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Release|ARM.ActiveCfg = Release|ARM + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Release|ARM.Build.0 = Release|ARM + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Release|Win32.ActiveCfg = Release|Win32 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Release|Win32.Build.0 = Release|Win32 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Release|x64.ActiveCfg = Release|x64 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Release|x64.Build.0 = Release|x64 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Tests|ARM.ActiveCfg = Release|ARM + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Tests|ARM.Build.0 = Release|ARM + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Tests|Win32.ActiveCfg = Release|Win32 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Tests|Win32.Build.0 = Release|Win32 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Tests|x64.ActiveCfg = Release|x64 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.Tests|x64.Build.0 = Release|x64 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.UWP Gold|ARM.ActiveCfg = UWP Gold|ARM + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.UWP Gold|ARM.Build.0 = UWP Gold|ARM + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.UWP Gold|Win32.ActiveCfg = UWP Gold|Win32 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.UWP Gold|Win32.Build.0 = UWP Gold|Win32 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.UWP Gold|x64.ActiveCfg = UWP Gold|x64 + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12}.UWP Gold|x64.Build.0 = UWP Gold|x64 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Debug|ARM.ActiveCfg = Debug|ARM + {40B76674-02DE-40EF-889B-FAD1489685E7}.Debug|ARM.Build.0 = Debug|ARM + {40B76674-02DE-40EF-889B-FAD1489685E7}.Debug|Win32.ActiveCfg = Debug|Win32 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Debug|Win32.Build.0 = Debug|Win32 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Debug|x64.ActiveCfg = Debug|x64 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Debug|x64.Build.0 = Debug|x64 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Release|ARM.ActiveCfg = Release|ARM + {40B76674-02DE-40EF-889B-FAD1489685E7}.Release|ARM.Build.0 = Release|ARM + {40B76674-02DE-40EF-889B-FAD1489685E7}.Release|Win32.ActiveCfg = Release|Win32 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Release|Win32.Build.0 = Release|Win32 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Release|x64.ActiveCfg = Release|x64 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Release|x64.Build.0 = Release|x64 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Tests|ARM.ActiveCfg = Release|ARM + {40B76674-02DE-40EF-889B-FAD1489685E7}.Tests|ARM.Build.0 = Release|ARM + {40B76674-02DE-40EF-889B-FAD1489685E7}.Tests|Win32.ActiveCfg = Release|Win32 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Tests|Win32.Build.0 = Release|Win32 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Tests|x64.ActiveCfg = Release|x64 + {40B76674-02DE-40EF-889B-FAD1489685E7}.Tests|x64.Build.0 = Release|x64 + {40B76674-02DE-40EF-889B-FAD1489685E7}.UWP Gold|ARM.ActiveCfg = UWP Gold|ARM + {40B76674-02DE-40EF-889B-FAD1489685E7}.UWP Gold|ARM.Build.0 = UWP Gold|ARM + {40B76674-02DE-40EF-889B-FAD1489685E7}.UWP Gold|Win32.ActiveCfg = UWP Gold|Win32 + {40B76674-02DE-40EF-889B-FAD1489685E7}.UWP Gold|Win32.Build.0 = UWP Gold|Win32 + {40B76674-02DE-40EF-889B-FAD1489685E7}.UWP Gold|x64.ActiveCfg = UWP Gold|x64 + {40B76674-02DE-40EF-889B-FAD1489685E7}.UWP Gold|x64.Build.0 = UWP Gold|x64 + {5D271429-C288-4534-98AF-94475D940058}.Debug|ARM.ActiveCfg = Debug|ARM + {5D271429-C288-4534-98AF-94475D940058}.Debug|ARM.Build.0 = Debug|ARM + {5D271429-C288-4534-98AF-94475D940058}.Debug|Win32.ActiveCfg = Debug|Win32 + {5D271429-C288-4534-98AF-94475D940058}.Debug|Win32.Build.0 = Debug|Win32 + {5D271429-C288-4534-98AF-94475D940058}.Debug|x64.ActiveCfg = Debug|x64 + {5D271429-C288-4534-98AF-94475D940058}.Debug|x64.Build.0 = Debug|x64 + {5D271429-C288-4534-98AF-94475D940058}.Release|ARM.ActiveCfg = Release|ARM + {5D271429-C288-4534-98AF-94475D940058}.Release|ARM.Build.0 = Release|ARM + {5D271429-C288-4534-98AF-94475D940058}.Release|Win32.ActiveCfg = Release|Win32 + {5D271429-C288-4534-98AF-94475D940058}.Release|Win32.Build.0 = Release|Win32 + {5D271429-C288-4534-98AF-94475D940058}.Release|x64.ActiveCfg = Release|x64 + {5D271429-C288-4534-98AF-94475D940058}.Release|x64.Build.0 = Release|x64 + {5D271429-C288-4534-98AF-94475D940058}.Tests|ARM.ActiveCfg = Release|ARM + {5D271429-C288-4534-98AF-94475D940058}.Tests|ARM.Build.0 = Release|ARM + {5D271429-C288-4534-98AF-94475D940058}.Tests|Win32.ActiveCfg = Release|Win32 + {5D271429-C288-4534-98AF-94475D940058}.Tests|Win32.Build.0 = Release|Win32 + {5D271429-C288-4534-98AF-94475D940058}.Tests|x64.ActiveCfg = Release|x64 + {5D271429-C288-4534-98AF-94475D940058}.Tests|x64.Build.0 = Release|x64 + {5D271429-C288-4534-98AF-94475D940058}.UWP Gold|ARM.ActiveCfg = UWP Gold|ARM + {5D271429-C288-4534-98AF-94475D940058}.UWP Gold|ARM.Build.0 = UWP Gold|ARM + {5D271429-C288-4534-98AF-94475D940058}.UWP Gold|Win32.ActiveCfg = UWP Gold|Win32 + {5D271429-C288-4534-98AF-94475D940058}.UWP Gold|Win32.Build.0 = UWP Gold|Win32 + {5D271429-C288-4534-98AF-94475D940058}.UWP Gold|x64.ActiveCfg = UWP Gold|x64 + {5D271429-C288-4534-98AF-94475D940058}.UWP Gold|x64.Build.0 = UWP Gold|x64 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Debug|ARM.ActiveCfg = Debug|ARM + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Debug|ARM.Build.0 = Debug|ARM + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Debug|Win32.ActiveCfg = Debug|Win32 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Debug|Win32.Build.0 = Debug|Win32 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Debug|x64.ActiveCfg = Debug|x64 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Debug|x64.Build.0 = Debug|x64 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Release|ARM.ActiveCfg = Release|ARM + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Release|ARM.Build.0 = Release|ARM + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Release|Win32.ActiveCfg = Release|Win32 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Release|Win32.Build.0 = Release|Win32 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Release|x64.ActiveCfg = Release|x64 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Release|x64.Build.0 = Release|x64 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Tests|ARM.ActiveCfg = Release|ARM + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Tests|ARM.Build.0 = Release|ARM + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Tests|Win32.ActiveCfg = Release|Win32 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Tests|Win32.Build.0 = Release|Win32 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Tests|x64.ActiveCfg = Release|x64 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.Tests|x64.Build.0 = Release|x64 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.UWP Gold|ARM.ActiveCfg = UWP Gold|ARM + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.UWP Gold|ARM.Build.0 = UWP Gold|ARM + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.UWP Gold|Win32.ActiveCfg = UWP Gold|Win32 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.UWP Gold|Win32.Build.0 = UWP Gold|Win32 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.UWP Gold|x64.ActiveCfg = UWP Gold|x64 + {935028AF-B850-4AD7-A00E-7BA84FB97D05}.UWP Gold|x64.Build.0 = UWP Gold|x64 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Debug|ARM.ActiveCfg = Debug|ARM + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Debug|ARM.Build.0 = Debug|ARM + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Debug|Win32.ActiveCfg = Debug|Win32 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Debug|Win32.Build.0 = Debug|Win32 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Debug|x64.ActiveCfg = Debug|x64 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Debug|x64.Build.0 = Debug|x64 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Release|ARM.ActiveCfg = Release|ARM + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Release|ARM.Build.0 = Release|ARM + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Release|Win32.ActiveCfg = Release|Win32 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Release|Win32.Build.0 = Release|Win32 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Release|x64.ActiveCfg = Release|x64 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Release|x64.Build.0 = Release|x64 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Tests|ARM.ActiveCfg = Release|ARM + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Tests|ARM.Build.0 = Release|ARM + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Tests|Win32.ActiveCfg = Release|Win32 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Tests|Win32.Build.0 = Release|Win32 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Tests|x64.ActiveCfg = Release|x64 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.Tests|x64.Build.0 = Release|x64 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.UWP Gold|ARM.ActiveCfg = UWP Gold|ARM + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.UWP Gold|ARM.Build.0 = UWP Gold|ARM + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.UWP Gold|Win32.ActiveCfg = UWP Gold|Win32 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.UWP Gold|Win32.Build.0 = UWP Gold|Win32 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.UWP Gold|x64.ActiveCfg = UWP Gold|x64 + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7}.UWP Gold|x64.Build.0 = UWP Gold|x64 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Debug|ARM.ActiveCfg = Debug|ARM + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Debug|ARM.Build.0 = Debug|ARM + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Debug|Win32.Build.0 = Debug|Win32 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Debug|x64.ActiveCfg = Debug|x64 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Debug|x64.Build.0 = Debug|x64 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Release|ARM.ActiveCfg = Release|ARM + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Release|ARM.Build.0 = Release|ARM + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Release|Win32.ActiveCfg = Release|Win32 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Release|Win32.Build.0 = Release|Win32 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Release|x64.ActiveCfg = Release|x64 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Release|x64.Build.0 = Release|x64 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Tests|ARM.ActiveCfg = Release|ARM + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Tests|ARM.Build.0 = Release|ARM + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Tests|Win32.ActiveCfg = Release|Win32 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Tests|Win32.Build.0 = Release|Win32 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Tests|x64.ActiveCfg = Release|x64 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.Tests|x64.Build.0 = Release|x64 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.UWP Gold|ARM.ActiveCfg = UWP Gold|ARM + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.UWP Gold|ARM.Build.0 = UWP Gold|ARM + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.UWP Gold|Win32.ActiveCfg = UWP Gold|Win32 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.UWP Gold|Win32.Build.0 = UWP Gold|Win32 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.UWP Gold|x64.ActiveCfg = UWP Gold|x64 + {2F911C05-B341-4291-8BF5-09EDECBDD5F5}.UWP Gold|x64.Build.0 = UWP Gold|x64 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Debug|ARM.ActiveCfg = Debug|ARM + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Debug|ARM.Build.0 = Debug|ARM + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Debug|Win32.ActiveCfg = Debug|Win32 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Debug|Win32.Build.0 = Debug|Win32 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Debug|x64.ActiveCfg = Debug|x64 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Debug|x64.Build.0 = Debug|x64 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Release|ARM.ActiveCfg = Release|ARM + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Release|ARM.Build.0 = Release|ARM + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Release|Win32.ActiveCfg = Release|Win32 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Release|Win32.Build.0 = Release|Win32 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Release|x64.ActiveCfg = Release|x64 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Release|x64.Build.0 = Release|x64 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Tests|ARM.ActiveCfg = Release|ARM + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Tests|ARM.Build.0 = Release|ARM + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Tests|Win32.ActiveCfg = Release|Win32 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Tests|Win32.Build.0 = Release|Win32 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Tests|x64.ActiveCfg = Release|x64 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.Tests|x64.Build.0 = Release|x64 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.UWP Gold|ARM.ActiveCfg = UWP Gold|ARM + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.UWP Gold|ARM.Build.0 = UWP Gold|ARM + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.UWP Gold|Win32.ActiveCfg = UWP Gold|Win32 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.UWP Gold|Win32.Build.0 = UWP Gold|Win32 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.UWP Gold|x64.ActiveCfg = UWP Gold|x64 + {DDF90203-0AAE-4F38-B589-2E9637658CE6}.UWP Gold|x64.Build.0 = UWP Gold|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Debug|ARM.ActiveCfg = Debug|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Debug|ARM.Build.0 = Debug|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Debug|ARM.Deploy.0 = Debug|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Debug|Win32.ActiveCfg = Debug|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Debug|Win32.Build.0 = Debug|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Debug|Win32.Deploy.0 = Debug|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Debug|x64.ActiveCfg = Debug|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Debug|x64.Build.0 = Debug|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Debug|x64.Deploy.0 = Debug|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Release|ARM.ActiveCfg = Release|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Release|ARM.Build.0 = Release|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Release|ARM.Deploy.0 = Release|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Release|Win32.ActiveCfg = Release|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Release|Win32.Build.0 = Release|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Release|Win32.Deploy.0 = Release|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Release|x64.ActiveCfg = Release|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Release|x64.Build.0 = Release|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Release|x64.Deploy.0 = Release|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Tests|ARM.ActiveCfg = Release|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Tests|ARM.Build.0 = Release|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Tests|ARM.Deploy.0 = Release|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Tests|Win32.ActiveCfg = Release|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Tests|Win32.Build.0 = Release|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Tests|Win32.Deploy.0 = Release|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Tests|x64.ActiveCfg = Release|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Tests|x64.Build.0 = Release|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.Tests|x64.Deploy.0 = Release|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.UWP Gold|ARM.ActiveCfg = UWP Gold|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.UWP Gold|ARM.Build.0 = UWP Gold|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.UWP Gold|ARM.Deploy.0 = UWP Gold|ARM + {01D7D581-09A3-4A26-94BD-A7C529B29329}.UWP Gold|Win32.ActiveCfg = UWP Gold|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.UWP Gold|Win32.Build.0 = UWP Gold|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.UWP Gold|Win32.Deploy.0 = UWP Gold|Win32 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.UWP Gold|x64.ActiveCfg = UWP Gold|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.UWP Gold|x64.Build.0 = UWP Gold|x64 + {01D7D581-09A3-4A26-94BD-A7C529B29329}.UWP Gold|x64.Deploy.0 = UWP Gold|x64 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Debug|ARM.ActiveCfg = Debug|ARM + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Debug|ARM.Build.0 = Debug|ARM + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Debug|Win32.ActiveCfg = Debug|Win32 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Debug|Win32.Build.0 = Debug|Win32 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Debug|x64.ActiveCfg = Debug|x64 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Debug|x64.Build.0 = Debug|x64 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Release|ARM.ActiveCfg = Release|ARM + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Release|ARM.Build.0 = Release|ARM + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Release|Win32.ActiveCfg = Release|Win32 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Release|Win32.Build.0 = Release|Win32 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Release|x64.ActiveCfg = Release|x64 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Release|x64.Build.0 = Release|x64 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Tests|ARM.ActiveCfg = Release|ARM + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Tests|ARM.Build.0 = Release|ARM + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Tests|Win32.ActiveCfg = Release|Win32 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Tests|Win32.Build.0 = Release|Win32 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Tests|x64.ActiveCfg = Release|x64 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.Tests|x64.Build.0 = Release|x64 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.UWP Gold|ARM.ActiveCfg = UWP Gold|ARM + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.UWP Gold|ARM.Build.0 = UWP Gold|ARM + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.UWP Gold|Win32.ActiveCfg = UWP Gold|Win32 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.UWP Gold|Win32.Build.0 = UWP Gold|Win32 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.UWP Gold|x64.ActiveCfg = UWP Gold|x64 + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC}.UWP Gold|x64.Build.0 = UWP Gold|x64 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Debug|ARM.ActiveCfg = Debug|ARM + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Debug|ARM.Build.0 = Debug|ARM + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Debug|Win32.ActiveCfg = Debug|Win32 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Debug|Win32.Build.0 = Debug|Win32 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Debug|x64.ActiveCfg = Debug|x64 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Debug|x64.Build.0 = Debug|x64 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Release|ARM.ActiveCfg = Release|ARM + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Release|ARM.Build.0 = Release|ARM + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Release|Win32.ActiveCfg = Release|Win32 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Release|Win32.Build.0 = Release|Win32 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Release|x64.ActiveCfg = Release|x64 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Release|x64.Build.0 = Release|x64 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Tests|ARM.ActiveCfg = Release|ARM + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Tests|ARM.Build.0 = Release|ARM + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Tests|Win32.ActiveCfg = Release|Win32 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Tests|Win32.Build.0 = Release|Win32 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Tests|x64.ActiveCfg = Release|x64 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.Tests|x64.Build.0 = Release|x64 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.UWP Gold|ARM.ActiveCfg = UWP Gold|ARM + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.UWP Gold|ARM.Build.0 = UWP Gold|ARM + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.UWP Gold|Win32.ActiveCfg = UWP Gold|Win32 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.UWP Gold|Win32.Build.0 = UWP Gold|Win32 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.UWP Gold|x64.ActiveCfg = UWP Gold|x64 + {2B2D16BD-1D37-46AF-A3F8-552900951B26}.UWP Gold|x64.Build.0 = UWP Gold|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {ACB316CA-3ECB-48E5-BE0A-91E72D5B0F12} = {13ED48E6-7BC8-474F-8A8D-195B57921353} + {40B76674-02DE-40EF-889B-FAD1489685E7} = {13ED48E6-7BC8-474F-8A8D-195B57921353} + {5D271429-C288-4534-98AF-94475D940058} = {13ED48E6-7BC8-474F-8A8D-195B57921353} + {935028AF-B850-4AD7-A00E-7BA84FB97D05} = {13ED48E6-7BC8-474F-8A8D-195B57921353} + {5FAC15BD-7397-4512-99D5-66CDC03AF5B7} = {13ED48E6-7BC8-474F-8A8D-195B57921353} + {2F911C05-B341-4291-8BF5-09EDECBDD5F5} = {13ED48E6-7BC8-474F-8A8D-195B57921353} + {DDF90203-0AAE-4F38-B589-2E9637658CE6} = {13ED48E6-7BC8-474F-8A8D-195B57921353} + {01D7D581-09A3-4A26-94BD-A7C529B29329} = {13ED48E6-7BC8-474F-8A8D-195B57921353} + {D326891E-ECE4-4B94-B5E7-8AA0A8E8ECBC} = {13ED48E6-7BC8-474F-8A8D-195B57921353} + {2B2D16BD-1D37-46AF-A3F8-552900951B26} = {13ED48E6-7BC8-474F-8A8D-195B57921353} + EndGlobalSection +EndGlobal diff --git a/UWP/PPSSPP_UWPMain.cpp b/UWP/PPSSPP_UWPMain.cpp new file mode 100644 index 0000000000..599299a66e --- /dev/null +++ b/UWP/PPSSPP_UWPMain.cpp @@ -0,0 +1,455 @@ +#include "pch.h" +#include "PPSSPP_UWPMain.h" + +#include + +#include "base/basictypes.h" +#include "Common/FileUtil.h" +#include "Common/Log.h" +#include "Common/LogManager.h" +#include "Core/System.h" +#include "Core/Loaders.h" +#include "base/NativeApp.h" +#include "base/timeutil.h" +#include "input/input_state.h" +#include "file/vfs.h" +#include "file/zip_read.h" +#include "file/file_util.h" +#include "net/http_client.h" +#include "net/resolve.h" +#include "base/display.h" +#include "thread/threadutil.h" +#include "util/text/utf8.h" +#include "Common/DirectXHelper.h" +#include "NKCodeFromWindowsSystem.h" +#include "XAudioSoundStream.h" +#include "UWPHost.h" +#include "UWPUtil.h" +#include "StorageFileLoader.h" +#include "App.h" + +using namespace UWP; +using namespace Windows::Foundation; +using namespace Windows::Storage; +using namespace Windows::Storage::Streams; +using namespace Windows::System::Threading; +using namespace Windows::ApplicationModel::DataTransfer; +using namespace Concurrency; + +// UGLY! +PPSSPP_UWPMain *g_main; +extern WindowsAudioBackend *winAudioBackend; +// TODO: Use Microsoft::WRL::ComPtr<> for D3D11 objects? +// TODO: See https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/WindowsAudioSession for WASAPI with UWP +// TODO: Low latency input: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/LowLatencyInput/cpp + +// Loads and initializes application assets when the application is loaded. +PPSSPP_UWPMain::PPSSPP_UWPMain(App ^app, const std::shared_ptr& deviceResources) : + app_(app), + m_deviceResources(deviceResources) +{ + g_main = this; + + net::Init(); + + host = new UWPHost(); + // Register to be notified if the Device is lost or recreated + m_deviceResources->RegisterDeviceNotify(this); + + // create_task(KnownFolders::GetFolderForUserAsync(nullptr, KnownFolderId::RemovableDevices)).then([this](StorageFolder ^)); + + // TODO: Change the timer settings if you want something other than the default variable timestep mode. + // e.g. for 60 FPS fixed timestep update logic, call: + /* + m_timer.SetFixedTimeStep(true); + m_timer.SetTargetElapsedSeconds(1.0 / 60); + */ + + ctx_.reset(new UWPGraphicsContext(deviceResources)); + + const std::string &exePath = File::GetExeDirectory(); + VFSRegister("", new DirectoryAssetReader((exePath + "/Content/").c_str())); + VFSRegister("", new DirectoryAssetReader(exePath.c_str())); + + wchar_t lcCountry[256]; + + std::string langRegion; + if (0 != GetLocaleInfoEx(LOCALE_NAME_USER_DEFAULT, LOCALE_SNAME, lcCountry, 256)) { + langRegion = ConvertWStringToUTF8(lcCountry); + for (size_t i = 0; i < langRegion.size(); i++) { + if (langRegion[i] == '-') + langRegion[i] = '_'; + } + } else { + langRegion = "en_US"; + } + + char configFilename[MAX_PATH] = { 0 }; + char controlsConfigFilename[MAX_PATH] = { 0 }; + + std::wstring memstickFolderW = ApplicationData::Current->LocalFolder->Path->Data(); + + g_Config.memStickDirectory = ReplaceAll(ConvertWStringToUTF8(memstickFolderW), "\\", "/"); + if (g_Config.memStickDirectory.back() != '/') + g_Config.memStickDirectory += "/"; + + // On Win32 it makes more sense to initialize the system directories here + // because the next place it was called was in the EmuThread, and it's too late by then. + InitSysDirectories(); + + LogManager::Init(); + + // Load config up here, because those changes below would be overwritten + // if it's not loaded here first. + g_Config.AddSearchPath(GetSysDirectory(DIRECTORY_SYSTEM)); + g_Config.SetDefaultPath(GetSysDirectory(DIRECTORY_SYSTEM)); + g_Config.Load(configFilename, controlsConfigFilename); + + bool debugLogLevel = false; + + g_Config.iGPUBackend = GPU_BACKEND_DIRECT3D11; + g_Config.bSeparateCPUThread = false; + + if (debugLogLevel) { + LogManager::GetInstance()->SetAllLogLevels(LogTypes::LDEBUG); + } + + const char *argv[2] = { "fake", nullptr }; + + + std::string cacheFolder = ConvertWStringToUTF8(ApplicationData::Current->LocalFolder->Path->Data()); + + NativeInit(1, argv, "", "", cacheFolder.c_str(), false); + + NativeInitGraphics(ctx_.get()); + NativeResized(); + + int width = m_deviceResources->GetScreenViewport().Width; + int height = m_deviceResources->GetScreenViewport().Height; + + ctx_->GetDrawContext()->HandleEvent(Draw::Event::GOT_BACKBUFFER, width, height, m_deviceResources->GetBackBufferRenderTargetView()); +} + +PPSSPP_UWPMain::~PPSSPP_UWPMain() { + ctx_->GetDrawContext()->HandleEvent(Draw::Event::LOST_BACKBUFFER, 0, 0, nullptr); + NativeShutdownGraphics(); + NativeShutdown(); + + // Deregister device notification + m_deviceResources->RegisterDeviceNotify(nullptr); + net::Shutdown(); +} + +// Updates application state when the window size changes (e.g. device orientation change) +void PPSSPP_UWPMain::CreateWindowSizeDependentResources() { + ctx_->GetDrawContext()->HandleEvent(Draw::Event::LOST_BACKBUFFER, 0, 0, nullptr); + + NativeResized(); + + int width = m_deviceResources->GetScreenViewport().Width; + int height = m_deviceResources->GetScreenViewport().Height; + ctx_->GetDrawContext()->HandleEvent(Draw::Event::GOT_BACKBUFFER, width, height, m_deviceResources->GetBackBufferRenderTargetView()); +} + +// Renders the current frame according to the current application state. +// Returns true if the frame was rendered and is ready to be displayed. +bool PPSSPP_UWPMain::Render() { + ctx_->GetDrawContext()->HandleEvent(Draw::Event::PRESENTED, 0, 0, nullptr, nullptr); + NativeUpdate(); + + static bool hasSetThreadName = false; + if (!hasSetThreadName) { + setCurrentThreadName("UWPRenderThread"); + hasSetThreadName = true; + } + + time_update(); + auto context = m_deviceResources->GetD3DDeviceContext(); + + auto bounds = Windows::UI::ViewManagement::ApplicationView::GetForCurrentView()->VisibleBounds; + + int boundTop = bounds.Top; + int boundLeft = bounds.Left; + int boundedWidth = bounds.Width; + int boundedHeight = bounds.Height; + + switch (m_deviceResources->ComputeDisplayRotation()) { + case DXGI_MODE_ROTATION_IDENTITY: g_display_rotation = DisplayRotation::ROTATE_0; break; + case DXGI_MODE_ROTATION_ROTATE90: g_display_rotation = DisplayRotation::ROTATE_90; break; + case DXGI_MODE_ROTATION_ROTATE180: g_display_rotation = DisplayRotation::ROTATE_180; break; + case DXGI_MODE_ROTATION_ROTATE270: g_display_rotation = DisplayRotation::ROTATE_270; break; + } + // Not super elegant but hey. + memcpy(&g_display_rot_matrix, &m_deviceResources->GetOrientationTransform3D(), sizeof(float) * 16); + + // Reset the viewport to target the whole screen. + auto viewport = m_deviceResources->GetScreenViewport(); + + pixel_xres = viewport.Width; + pixel_yres = viewport.Height; + + if (g_display_rotation == DisplayRotation::ROTATE_90 || g_display_rotation == DisplayRotation::ROTATE_270) { + // We need to swap our width/height. + std::swap(pixel_xres, pixel_yres); + } + + g_dpi = m_deviceResources->GetActualDpi(); + pixel_xres = (g_dpi / 96.0f) * boundedWidth; + pixel_yres = (g_dpi / 96.0f) * boundedHeight; + + if (System_GetPropertyInt(SYSPROP_DEVICE_TYPE) == DEVICE_TYPE_MOBILE) { + // Boost DPI a bit to look better. + g_dpi *= 96.0f / 136.0f; + } + g_dpi_scale = 96.0f / g_dpi; + + pixel_in_dps = 1.0f / g_dpi_scale; + + dp_xres = pixel_xres * g_dpi_scale; + dp_yres = pixel_yres * g_dpi_scale; + + context->RSSetViewports(1, &viewport); + + ctx_->GetDrawContext()->BindBackbufferAsRenderTarget(); + + NativeRender(ctx_.get()); + return true; +} + +// Notifies renderers that device resources need to be released. +void PPSSPP_UWPMain::OnDeviceLost() { + ctx_->GetDrawContext()->HandleEvent(Draw::Event::LOST_DEVICE, 0, 0, nullptr); +} + +// Notifies renderers that device resources may now be recreated. +void PPSSPP_UWPMain::OnDeviceRestored() { + CreateWindowSizeDependentResources(); + + ctx_->GetDrawContext()->HandleEvent(Draw::Event::GOT_DEVICE, 0, 0, nullptr); +} + +void PPSSPP_UWPMain::OnKeyDown(int scanCode, Windows::System::VirtualKey virtualKey, int repeatCount) { + auto iter = virtualKeyCodeToNKCode.find(virtualKey); + if (iter != virtualKeyCodeToNKCode.end()) { + KeyInput key{}; + key.deviceId = DEVICE_ID_KEYBOARD; + key.keyCode = iter->second; + key.flags = KEY_DOWN | (repeatCount > 1 ? KEY_IS_REPEAT : 0); + NativeKey(key); + } +} + +void PPSSPP_UWPMain::OnKeyUp(int scanCode, Windows::System::VirtualKey virtualKey) { + auto iter = virtualKeyCodeToNKCode.find(virtualKey); + if (iter != virtualKeyCodeToNKCode.end()) { + KeyInput key{}; + key.deviceId = DEVICE_ID_KEYBOARD; + key.keyCode = iter->second; + key.flags = KEY_UP; + NativeKey(key); + } +} + +void PPSSPP_UWPMain::OnMouseWheel(float delta) { + int key = NKCODE_EXT_MOUSEWHEEL_UP; + if (delta < 0) { + key = NKCODE_EXT_MOUSEWHEEL_DOWN; + } else if (delta == 0) { + return; + } + + KeyInput keyInput{}; + keyInput.keyCode = key; + keyInput.deviceId = DEVICE_ID_MOUSE; + keyInput.flags = KEY_DOWN | KEY_UP; + NativeKey(keyInput); +} + +bool PPSSPP_UWPMain::OnHardwareButton(HardwareButton button) { + KeyInput keyInput{}; + keyInput.deviceId = DEVICE_ID_KEYBOARD; + keyInput.flags = KEY_DOWN | KEY_UP; + switch (button) { + case HardwareButton::BACK: + keyInput.keyCode = NKCODE_BACK; + return NativeKey(keyInput); + default: + return false; + } +} + +void PPSSPP_UWPMain::OnTouchEvent(int touchEvent, int touchId, float x, float y, double timestamp) { + // We get the coordinate in Windows' device independent pixels already. So let's undo that, + // and then apply our own "dpi". + float dpiFactor = m_deviceResources->GetActualDpi() / 96.0f; + dpiFactor /= pixel_in_dps; + + TouchInput input{}; + input.id = touchId; + input.x = x * dpiFactor; + input.y = y * dpiFactor; + input.flags = touchEvent; + input.timestamp = timestamp; + NativeTouch(input); + + KeyInput key{}; + key.deviceId = DEVICE_ID_MOUSE; + if (touchEvent & TOUCH_DOWN) { + key.keyCode = NKCODE_EXT_MOUSEBUTTON_1; + key.flags = KEY_DOWN; + NativeKey(key); + } + if (touchEvent & TOUCH_UP) { + key.keyCode = NKCODE_EXT_MOUSEBUTTON_1; + key.flags = KEY_UP; + NativeKey(key); + } +} + +void PPSSPP_UWPMain::OnSuspend() { + // TODO +} + +void PPSSPP_UWPMain::LoadStorageFile(StorageFile ^file) { + std::unique_ptr factory(new StorageFileLoaderFactory(file, IdentifiedFileType::PSP_ISO)); + RegisterFileLoaderFactory("override://", std::move(factory)); + NativeMessageReceived("boot", "override://"); +} + +UWPGraphicsContext::UWPGraphicsContext(std::shared_ptr resources) { + draw_ = Draw::T3DCreateD3D11Context( + resources->GetD3DDevice(), resources->GetD3DDeviceContext(), resources->GetD3DDevice(), resources->GetD3DDeviceContext(), resources->GetDeviceFeatureLevel(), 0); +} + +void UWPGraphicsContext::Shutdown() { + delete draw_; +} + +void UWPGraphicsContext::SwapInterval(int interval) { + +} + +std::string System_GetProperty(SystemProperty prop) { + static bool hasCheckedGPUDriverVersion = false; + switch (prop) { + case SYSPROP_NAME: + return "Windows 10 Universal"; + case SYSPROP_LANGREGION: + return "en_US"; // TODO UWP + case SYSPROP_CLIPBOARD_TEXT: + /* TODO: Need to either change this API or do this on a thread in an ugly fashion. + DataPackageView ^view = Clipboard::GetContent(); + if (view) { + string text = await view->GetTextAsync(); + } + */ + return ""; + case SYSPROP_GPUDRIVER_VERSION: + return ""; + default: + return ""; + } +} + +int System_GetPropertyInt(SystemProperty prop) { + switch (prop) { + case SYSPROP_AUDIO_SAMPLE_RATE: + return winAudioBackend ? winAudioBackend->GetSampleRate() : -1; + case SYSPROP_DISPLAY_REFRESH_RATE: + return 60000; + case SYSPROP_DEVICE_TYPE: + // TODO: Detect touch screen instead. +#ifdef _M_ARM + return DEVICE_TYPE_MOBILE; +#else + return DEVICE_TYPE_DESKTOP; +#endif + case SYSPROP_HAS_BACK_BUTTON: + return 1; + case SYSPROP_HAS_FILE_BROWSER: + return 1; + default: + return -1; + } +} + +void System_SendMessage(const char *command, const char *parameter) { + using namespace concurrency; + + if (!strcmp(command, "finish")) { + // Not really supposed to support this under UWP. + } else if (!strcmp(command, "browse_file")) { + auto picker = ref new Windows::Storage::Pickers::FileOpenPicker(); + picker->ViewMode = Pickers::PickerViewMode::List; + + // These are single files that can be loaded directly using StorageFileLoader. + picker->FileTypeFilter->Append(".cso"); + picker->FileTypeFilter->Append(".iso"); + + // Can't load these this way currently, they require mounting the underlying folder. + // picker->FileTypeFilter->Append(".bin"); + // picker->FileTypeFilter->Append(".elf"); + picker->SuggestedStartLocation = Pickers::PickerLocationId::DocumentsLibrary; + + create_task(picker->PickSingleFileAsync()).then([](StorageFile ^file){ + if (file) { + g_main->LoadStorageFile(file); + } + }); + } +} + +void LaunchBrowser(const char *url) { + auto uri = ref new Windows::Foundation::Uri(ToPlatformString(url)); + + create_task(Windows::System::Launcher::LaunchUriAsync(uri)).then([](bool b) {}); +} + +void Vibrate(int length_ms) { +#if _M_ARM + if (length_ms == -1 || length_ms == -3) + length_ms = 50; + else if (length_ms == -2) + length_ms = 25; + else + return; + + auto timeSpan = Windows::Foundation::TimeSpan(); + timeSpan.Duration = length_ms * 10000; + // TODO: Can't use this? + // Windows::Phone::Devices::Notification::VibrationDevice::GetDefault()->Vibrate(timeSpan); +#endif +} + +void System_AskForPermission(SystemPermission permission) { + // Do nothing +} + +PermissionStatus System_GetPermissionStatus(SystemPermission permission) { + return PERMISSION_STATUS_GRANTED; +} + +bool System_InputBoxGetString(const char *title, const char *defaultValue, char *outValue, size_t outLength) { + return false; +} + +bool System_InputBoxGetWString(const wchar_t *title, const std::wstring &defaultvalue, std::wstring &outvalue) { + return false; +} + +// Emulation of TlsAlloc for Windows 10. Used by glslang. Doesn't actually seem to work, other than fixing the linking errors? + +extern "C" { +DWORD WINAPI __imp_TlsAlloc() { + return FlsAlloc(nullptr); +} +BOOL WINAPI __imp_TlsFree(DWORD index) { + return FlsFree(index); +} +BOOL WINAPI __imp_TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue) { + return FlsSetValue(dwTlsIndex, lpTlsValue); +} +LPVOID WINAPI __imp_TlsGetValue(DWORD dwTlsIndex) { + return FlsGetValue(dwTlsIndex); +} +} diff --git a/UWP/PPSSPP_UWPMain.h b/UWP/PPSSPP_UWPMain.h new file mode 100644 index 0000000000..3b38deeb3d --- /dev/null +++ b/UWP/PPSSPP_UWPMain.h @@ -0,0 +1,73 @@ +#pragma once + +#include + +#include "thin3d/thin3d.h" +#include "input/input_state.h" + +#include "Common/GraphicsContext.h" +#include "Common/DeviceResources.h" + +// Renders Direct2D and 3D content on the screen. +namespace UWP { + +ref class App; +enum class HardwareButton; + +class UWPGraphicsContext : public GraphicsContext { +public: + UWPGraphicsContext(std::shared_ptr resources); + + void Shutdown() override; + void SwapInterval(int interval) override; + void SwapBuffers() override {} + void Resize() override {} + Draw::DrawContext * GetDrawContext() override { + return draw_; + } + +private: + Draw::DrawContext *draw_; + std::shared_ptr resources_; +}; + +class PPSSPP_UWPMain : public DX::IDeviceNotify { +public: + PPSSPP_UWPMain(App ^app, const std::shared_ptr& deviceResources); + ~PPSSPP_UWPMain(); + void CreateWindowSizeDependentResources(); + bool Render(); + + // IDeviceNotify + virtual void OnDeviceLost(); + virtual void OnDeviceRestored(); + + // Various forwards from App, in simplified format. + // Not sure whether this abstraction is worth it. + void OnKeyDown(int scanCode, Windows::System::VirtualKey virtualKey, int repeatCount); + void OnKeyUp(int scanCode, Windows::System::VirtualKey virtualKey); + + void OnTouchEvent(int touchEvent, int touchId, float x, float y, double timestamp); + + void OnMouseWheel(float delta); + + bool OnHardwareButton(HardwareButton button); + + void RotateXYToDisplay(float &x, float &y); + + // Save state fast if we can! + void OnSuspend(); + void Close(); + + void LoadStorageFile(Windows::Storage::StorageFile ^file); + +private: + App ^app_; + + // Cached pointer to device resources. + std::shared_ptr m_deviceResources; + + std::unique_ptr ctx_; +}; + +} \ No newline at end of file diff --git a/UWP/PackageGold.appxmanifest b/UWP/PackageGold.appxmanifest new file mode 100644 index 0000000000..a926ec8194 --- /dev/null +++ b/UWP/PackageGold.appxmanifest @@ -0,0 +1,37 @@ + + + + + + PPSSPP Gold - PSP emulator + Henrik Rydgård + AssetsGold\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/UWP/PackageNormal.appxmanifest b/UWP/PackageNormal.appxmanifest new file mode 100644 index 0000000000..4d3a07e950 --- /dev/null +++ b/UWP/PackageNormal.appxmanifest @@ -0,0 +1,33 @@ + + + + + + PPSSPP - PSP emulator + Henrik Rydgård + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UWP/SPIRVCross_UWP/SPIRVCross_UWP.vcxproj b/UWP/SPIRVCross_UWP/SPIRVCross_UWP.vcxproj new file mode 100644 index 0000000000..8acb031408 --- /dev/null +++ b/UWP/SPIRVCross_UWP/SPIRVCross_UWP.vcxproj @@ -0,0 +1,315 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + UWP Gold + ARM + + + UWP Gold + Win32 + + + UWP Gold + x64 + + + + {2b2d16bd-1d37-46af-a3f8-552900951b26} + StaticLibrary + SPIRVCross_UWP + en-US + 14.0 + true + Windows Store + 10.0.10586.0 + 10.0.10240.0 + 10.0 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Use + false + true + pch.h + + + Console + false + false + + + + + Use + false + true + pch.h + + + Console + false + false + + + + + Use + false + true + pch.h + + + Console + false + false + + + + + Use + false + true + pch.h + + + Console + false + false + + + + + Use + false + true + pch.h + + + Console + false + false + + + + + Use + false + true + pch.h + + + Console + false + false + + + + + Use + false + true + pch.h + + + Console + false + false + + + + + Use + false + true + pch.h + + + Console + false + false + + + + + Use + false + true + pch.h + + + Console + false + false + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/UWP/SPIRVCross_UWP/SPIRVCross_UWP.vcxproj.filters b/UWP/SPIRVCross_UWP/SPIRVCross_UWP.vcxproj.filters new file mode 100644 index 0000000000..cedc522ec9 --- /dev/null +++ b/UWP/SPIRVCross_UWP/SPIRVCross_UWP.vcxproj.filters @@ -0,0 +1,28 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UWP/SPIRVCross_UWP/pch.cpp b/UWP/SPIRVCross_UWP/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/UWP/SPIRVCross_UWP/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/UWP/SPIRVCross_UWP/pch.h b/UWP/SPIRVCross_UWP/pch.h new file mode 100644 index 0000000000..529bbb17fe --- /dev/null +++ b/UWP/SPIRVCross_UWP/pch.h @@ -0,0 +1,9 @@ +#pragma once + +#include "targetver.h" + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#include diff --git a/UWP/SPIRVCross_UWP/targetver.h b/UWP/SPIRVCross_UWP/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/UWP/SPIRVCross_UWP/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/UWP/StorageFileLoader.cpp b/UWP/StorageFileLoader.cpp new file mode 100644 index 0000000000..9e90b8b2ef --- /dev/null +++ b/UWP/StorageFileLoader.cpp @@ -0,0 +1,187 @@ +#include "pch.h" +#include "ppltasks.h" +#include "base/logging.h" +#include "file/file_util.h" +#include "thread/threadutil.h" +#include "StorageFileLoader.h" +#include "UWPUtil.h" + +using namespace Concurrency; +using namespace Windows::Storage; +using namespace Windows::Storage::Streams; + +static std::mutex initMutex; + +StorageFileLoader::StorageFileLoader(Windows::Storage::StorageFile ^file) { + file_ = file; + path_ = FromPlatformString(file_->Path); + thread_.reset(new std::thread([this]() { this->threadfunc(); })); +} + +StorageFileLoader::~StorageFileLoader() { + active_ = false; + operationRequested_ = false; + cond_.notify_all(); + thread_->join(); +} + +void StorageFileLoader::threadfunc() { + setCurrentThreadName("StorageFileLoader"); + + initMutex.lock(); + + auto opentask = create_task(file_->OpenReadAsync()).then([this](IRandomAccessStreamWithContentType ^stream) { + stream_ = stream; + active_ = true; + }); + + try { + opentask.wait(); + } + catch (const std::exception& e) { + operationFailed_ = true; + // TODO: What do we do? + const char *what = e.what(); + ILOG("%s", what); + } + catch (Platform::COMException ^e) { + + } + + auto sizetask = create_task(file_->GetBasicPropertiesAsync()).then([this](Windows::Storage::FileProperties::BasicProperties ^props) { + size_ = props->Size; + }); + try { + sizetask.wait(); + } + catch (const std::exception& e) { + const char *what = e.what(); + ILOG("%s", what); + } + catch (Platform::COMException ^e) { + std::string what = FromPlatformString(e->ToString()); + ILOG("%s", what.c_str()); + } + + initMutex.unlock(); + + std::unique_lock lock(mutex_); + while (active_) { + if (!operationRequested_) { + cond_.wait(lock); + } + if (operationRequested_) { + switch (operation_.type) { + case OpType::READ_AT: { + Streams::Buffer ^buf = ref new Streams::Buffer(operation_.size); + operationFailed_ = false; + stream_->Seek(operation_.offset); + auto task = create_task(stream_->ReadAsync(buf, operation_.size, Streams::InputStreamOptions::None)); + Streams::IBuffer ^output = nullptr; + try { + task.wait(); + output = task.get(); + } catch (const std::exception& e) { + operationFailed_ = true; + const char *what = e.what(); + ILOG("%s", what); + } + operationRequested_ = false; + std::unique_lock lock(mutexResponse_); + response_.buffer = output; + responseAvailable_ = true; + condResponse_.notify_one(); + break; + } + default: + ELOG("Unknown operation"); + operationRequested_ = false; + break; + } + } + } +} + +bool StorageFileLoader::Exists() { + return file_ != nullptr; +} + +bool StorageFileLoader::ExistsFast() { + return file_ != nullptr; +} + +bool StorageFileLoader::IsDirectory() { + return (file_->Attributes & Windows::Storage::FileAttributes::Directory) != Windows::Storage::FileAttributes::Normal; +} + +s64 StorageFileLoader::FileSize() { + EnsureOpen(); + if (size_ == -1) + __debugbreak(); // crude race condition detection + return size_; +} + +std::string StorageFileLoader::Path() const { + return path_; +} + +std::string StorageFileLoader::Extension() { + return "." + getFileExtension(path_); +} + +void StorageFileLoader::EnsureOpen() { + // UGLY! + while (!thread_) + Sleep(100); + while (size_ == -1) + Sleep(100); +} + +// Note that multithreaded use could wreak havoc with this... +void StorageFileLoader::Seek(s64 absolutePos) { + EnsureOpen(); + seekPos_ = absolutePos; +} + +size_t StorageFileLoader::Read(size_t bytes, size_t count, void *data, Flags flags) { + size_t bytesRead = ReadAt(seekPos_, bytes, count, data, flags); + seekPos_ += bytesRead; + return bytesRead; +} + +size_t StorageFileLoader::ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data, Flags flags) { + EnsureOpen(); + if (operationRequested_ || responseAvailable_) + Crash(); + { + std::unique_lock lock(mutex_); + operation_.type = OpType::READ_AT; + operation_.offset = absolutePos; + operation_.size = (int64_t)(bytes * count); + operationRequested_ = true; + cond_.notify_one(); + } + + // OK, now wait for response... + { + std::unique_lock responseLock(mutexResponse_); + while (!responseAvailable_) { + condResponse_.wait(responseLock); + } + if (operationFailed_) { + return 0; + } + DataReader ^rd = DataReader::FromBuffer(response_.buffer); + size_t len = response_.buffer->Length; + Platform::Array ^bytearray = ref new Platform::Array((unsigned int)len); + rd->ReadBytes(bytearray); + memcpy(data, bytearray->Data, len); + responseAvailable_ = false; + response_.buffer = nullptr; + return len / bytes; + } +} + +FileLoader *StorageFileLoaderFactory::ConstructFileLoader(const std::string &filename) { + return file_ ? new StorageFileLoader(file_) : nullptr; +} diff --git a/UWP/StorageFileLoader.h b/UWP/StorageFileLoader.h new file mode 100644 index 0000000000..11b35ecb0e --- /dev/null +++ b/UWP/StorageFileLoader.h @@ -0,0 +1,90 @@ +#pragma once + +#include "pch.h" + +#include +#include +#include +#include +#include + +#include "Common/CommonTypes.h" +#include "Core/Loaders.h" + +// This thing is a terrible abomination that wraps asynchronous file access behind a synchronous interface, +// completely defeating MS' design goals for StorageFile. But hey, you gotta do what you gotta do. +// This opens a stream attached to the passed-in file. Multiple of these can be created against one StorageFile. +class StorageFileLoader : public FileLoader { +public: + StorageFileLoader(Windows::Storage::StorageFile ^file); + ~StorageFileLoader(); + + bool Exists() override; + bool ExistsFast() override; + + bool IsDirectory() override; + s64 FileSize() override; + std::string Path() const override; + std::string Extension() override; + void Seek(s64 absolutePos) override; + + size_t Read(size_t bytes, size_t count, void *data, Flags flags = Flags::NONE) override; + size_t ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data, Flags flags = Flags::NONE) override; + +private: + void threadfunc(); + void EnsureOpen(); + + enum class OpType { + NONE, + READ_AT, + }; + + struct Operation { + OpType type; + int64_t offset; + int64_t size; + }; + + struct Response { + Windows::Storage::Streams::IBuffer ^buffer; + }; + + bool active_ = false; + int64_t size_ = -1; + std::unique_ptr thread_; + + Windows::Storage::StorageFile ^file_; + Windows::Storage::Streams::IRandomAccessStreamWithContentType ^stream_; + std::string path_; + + bool operationRequested_ = false; + Operation operation_{ OpType::NONE, 0, 0 }; + std::condition_variable cond_; + std::mutex mutex_; + + bool operationFailed_ = false; + + bool responseAvailable_ = false; + Response response_; + std::condition_variable condResponse_; + std::mutex mutexResponse_; + + int64_t seekPos_ = 0; +}; + +class StorageFileLoaderFactory : public FileLoaderFactory { +public: + StorageFileLoaderFactory(Windows::Storage::StorageFile ^file, IdentifiedFileType fileType) : file_(file), fileType_(fileType) { } + FileLoader *ConstructFileLoader(const std::string &filename) override; + +private: + Windows::Storage::StorageFile ^file_; + IdentifiedFileType fileType_; +}; + +// Similar to StorageFileLoader but for directory browsing. +class StorageDirectoryWrapper { +private: + std::thread thread_; +}; \ No newline at end of file diff --git a/UWP/StorageFolderBrowser.cpp b/UWP/StorageFolderBrowser.cpp new file mode 100644 index 0000000000..e5c6149d4c --- /dev/null +++ b/UWP/StorageFolderBrowser.cpp @@ -0,0 +1,101 @@ +#include "pch.h" +#include "ppltasks.h" + +#include "base/logging.h" +#include "thread/threadutil.h" + +#include "StorageFolderBrowser.h" +#include "UWPUtil.h" + +using namespace Concurrency; +using namespace Windows::Storage; +using namespace Windows::Storage::Streams; + +static std::mutex initMutex; + +StorageFolderBrowser::StorageFolderBrowser(Windows::Storage::StorageFolder ^folder) : folder_(folder) { + thread_.reset(new std::thread([this]() { this->threadfunc(); })); + + path_ = FromPlatformString(folder->Path); + displayName_ = FromPlatformString(folder->DisplayName); +} + +void StorageFolderBrowser::threadfunc() { + setCurrentThreadName("StorageFileLoader"); + + initMutex.lock(); + + /* + auto opentask = create_task(folder_->GetItemsAsync()->OpenReadAsync()).then([this](IRandomAccessStreamWithContentType ^stream) { + stream_ = stream; + active_ = true; + }); + + try { + opentask.wait(); + } + catch (const std::exception& e) { + operationFailed_ = true; + // TODO: What do we do? + const char *what = e.what(); + ILOG("%s", what); + } + catch (Platform::COMException ^e) { + + } + + auto sizetask = create_task(file_->GetBasicPropertiesAsync()).then([this](Windows::Storage::FileProperties::BasicProperties ^props) { + size_ = props->Size; + }); + try { + sizetask.wait(); + } + catch (const std::exception& e) { + const char *what = e.what(); + ILOG("%s", what); + } + catch (Platform::COMException ^e) { + std::string what = FromPlatformString(e->ToString()); + ILOG("%s", what.c_str()); + } + */ + initMutex.unlock(); + + std::unique_lock lock(mutex_); + while (active_) { + if (!operationRequested_) { + cond_.wait(lock); + } + if (operationRequested_) { + switch (operation_.type) { + case OpType::LIST_DIRECTORY: { + + /* + Streams::Buffer ^buf = ref new Streams::Buffer(operation_.size); + operationFailed_ = false; + stream_->Seek(operation_.offset); + auto task = create_task(stream_->ReadAsync(buf, operation_.size, Streams::InputStreamOptions::None)); + Streams::IBuffer ^output = nullptr; + try { + task.wait(); + output = task.get(); + } + catch (const std::exception& e) { + operationFailed_ = true; + const char *what = e.what(); + ILOG("%s", what); + } + operationRequested_ = false; + std::unique_lock lock(mutexResponse_); + response_.buffer = output; + responseAvailable_ = true; + condResponse_.notify_one(); + break;*/ + } + default: + operationRequested_ = false; + break; + } + } + } +} diff --git a/UWP/StorageFolderBrowser.h b/UWP/StorageFolderBrowser.h new file mode 100644 index 0000000000..d5da640fa4 --- /dev/null +++ b/UWP/StorageFolderBrowser.h @@ -0,0 +1,70 @@ +#pragma once +#pragma once + +#include "pch.h" + +#include +#include +#include +#include +#include + +#include "Common/CommonTypes.h" +#include "Core/Loaders.h" + +// This thing is a terrible abomination that wraps asynchronous file access behind a synchronous interface, +// completely defeating MS' design goals for StorageFile. But hey, you gotta do what you gotta do. +// This opens a stream attached to the passed-in file. Multiple of these can be created against one StorageFile. + +class StorageFolderBrowser { +public: + StorageFolderBrowser(Windows::Storage::StorageFolder ^folder); + ~StorageFolderBrowser(); + + std::string Path() const { + return path_; + } + + std::string DisplayName() const { + return displayName_; + } + + +private: + void threadfunc(); + + enum class OpType { + NONE, + LIST_DIRECTORY, + CHANGE_FOLDER, + }; + + struct Operation { + OpType type; + }; + + struct Response { + }; + + std::string path_; + std::string displayName_; + + bool active_ = false; + std::unique_ptr thread_; + + Windows::Storage::StorageFolder ^folder_; + + bool operationRequested_ = false; + Operation operation_{ OpType::NONE }; + std::condition_variable cond_; + std::mutex mutex_; + + bool operationFailed_ = false; + + bool responseAvailable_ = false; + Response response_; + std::condition_variable condResponse_; + std::mutex mutexResponse_; + + int64_t seekPos_ = 0; +}; diff --git a/UWP/UI_UWP/UI_UWP.vcxproj b/UWP/UI_UWP/UI_UWP.vcxproj new file mode 100644 index 0000000000..eada47b3b6 --- /dev/null +++ b/UWP/UI_UWP/UI_UWP.vcxproj @@ -0,0 +1,379 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + UWP Gold + ARM + + + UWP Gold + Win32 + + + UWP Gold + x64 + + + + {5fac15bd-7397-4512-99d5-66cdc03af5b7} + StaticLibrary + UI_UWP + en-US + 14.0 + true + Windows Store + 10.0.10586.0 + 10.0.10240.0 + 10.0 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Use + false + true + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + pch.h + + + Console + false + false + + + + + Use + false + true + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + pch.h + + + Console + false + false + + + + + Use + false + true + GOLD;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + pch.h + + + Console + false + false + + + + + Use + false + true + NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + pch.h + + + Console + false + false + + + + + Use + false + true + NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + pch.h + + + Console + false + false + + + + + Use + false + true + GOLD;NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + pch.h + + + Console + false + false + + + + + Use + false + true + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + pch.h + + + Console + false + false + + + + + Use + false + true + NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + pch.h + + + Console + false + false + + + + + Use + false + true + GOLD;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + ../..;../../ext/native;../../Common;../../ext/native/ext;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) + pch.h + + + Console + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/UWP/UI_UWP/UI_UWP.vcxproj.filters b/UWP/UI_UWP/UI_UWP.vcxproj.filters new file mode 100644 index 0000000000..2dda8c4b86 --- /dev/null +++ b/UWP/UI_UWP/UI_UWP.vcxproj.filters @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UWP/UI_UWP/pch.cpp b/UWP/UI_UWP/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/UWP/UI_UWP/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/UWP/UI_UWP/pch.h b/UWP/UI_UWP/pch.h new file mode 100644 index 0000000000..529bbb17fe --- /dev/null +++ b/UWP/UI_UWP/pch.h @@ -0,0 +1,9 @@ +#pragma once + +#include "targetver.h" + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#include diff --git a/UWP/UI_UWP/targetver.h b/UWP/UI_UWP/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/UWP/UI_UWP/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/UWP/UWP.vcxproj b/UWP/UWP.vcxproj new file mode 100644 index 0000000000..72d62dc1cc --- /dev/null +++ b/UWP/UWP.vcxproj @@ -0,0 +1,490 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + Debug + ARM + + + Release + ARM + + + UWP Gold + ARM + + + UWP Gold + Win32 + + + UWP Gold + x64 + + + + {01D7D581-09A3-4A26-94BD-A7C529B29329} + DirectXApp + UWP + en-US + 14.0 + true + Windows Store + 10.0.10586.0 + 10.0.10240.0 + 10.0 + PPSSPP_UWP + + + + Application + true + v140 + + + Application + true + v140 + + + Application + true + v140 + + + Application + false + true + v140 + true + + + Application + false + true + v140 + true + + + Application + false + false + v140 + true + + + Application + false + false + v140 + true + + + Application + false + true + v140 + true + + + Application + false + true + v140 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UWP_TemporaryKey.pfx + + + + libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + ../ffmpeg/Windows10/ARM/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm + + + pch.h + $(IntDir)pch.pch + ..;../ext/native;../ext/snappy;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + _DEBUG;%(PreprocessorDefinitions) + pch.h + + + copy PackageNormal.appxmanifest Package.appxmanifest /Y +mkdir Assets +copy AssetsNormal\*.* Assets /Y + + + + + libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + ../ffmpeg/Windows10/ARM/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm + + + pch.h + $(IntDir)pch.pch + ..;../ext/native;../ext/snappy;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + NDEBUG;%(PreprocessorDefinitions) + pch.h + + + copy PackageNormal.appxmanifest Package.appxmanifest /Y +mkdir Assets +copy AssetsNormal\*.* Assets /Y + + + + + libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + ../ffmpeg/Windows10/ARM/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\arm; $(VCInstallDir)\lib\arm + + + pch.h + $(IntDir)pch.pch + ..;../ext/native;../ext/snappy;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + GOLD;NDEBUG;%(PreprocessorDefinitions) + pch.h + + + copy PackageGold.appxmanifest Package.appxmanifest /Y +mkdir Assets +copy AssetsGold\*.* Assets /Y + + + + + libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + ../ffmpeg/Windows10/x86/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib + + + pch.h + $(IntDir)pch.pch + ..;../ext/native;../ext/snappy;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + _DEBUG;%(PreprocessorDefinitions) + pch.h + + + copy PackageNormal.appxmanifest Package.appxmanifest /Y +mkdir Assets +copy AssetsNormal\*.* Assets /Y + + + + + libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + ../ffmpeg/Windows10/x86/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib + + + pch.h + $(IntDir)pch.pch + ..;../ext/native;../ext/snappy;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + NDEBUG;%(PreprocessorDefinitions) + pch.h + + + copy PackageNormal.appxmanifest Package.appxmanifest /Y +mkdir Assets +copy AssetsNormal\*.* Assets /Y + + + + + libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + ../ffmpeg/Windows10/x86/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store; $(VCInstallDir)\lib + + + pch.h + $(IntDir)pch.pch + ..;../ext/native;../ext/snappy;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + GOLD;NDEBUG;%(PreprocessorDefinitions) + pch.h + + + copy PackageGold.appxmanifest Package.appxmanifest /Y +mkdir Assets +copy AssetsGold\*.* Assets /Y + + + + + libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + ../ffmpeg/Windows10/x64/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64 + + + pch.h + $(IntDir)pch.pch + ..;../ext/native;../ext/snappy;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + _DEBUG;%(PreprocessorDefinitions) + pch.h + + + copy PackageNormal.appxmanifest Package.appxmanifest /Y +mkdir Assets +copy AssetsNormal\*.* Assets /Y + + + + + libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + ../ffmpeg/Windows10/x64/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64 + + + pch.h + $(IntDir)pch.pch + ..;../ext/native;../ext/snappy;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + NDEBUG;%(PreprocessorDefinitions) + pch.h + + + copy PackageNormal.appxmanifest Package.appxmanifest /Y +mkdir Assets +copy AssetsNormal\*.* Assets /Y + + + + + libavcodec.a;libavformat.a;libavutil.a;libswresample.a;libswscale.a;d2d1.lib; d3d11.lib; dxgi.lib; windowscodecs.lib; dwrite.lib; %(AdditionalDependencies) + ../ffmpeg/Windows10/x64/lib;%(AdditionalLibraryDirectories); $(VCInstallDir)\lib\store\amd64; $(VCInstallDir)\lib\amd64 + + + pch.h + $(IntDir)pch.pch + ..;../ext/native;../ext/snappy;$(ProjectDir);$(IntermediateOutputPath);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + 4453;28204 + GOLD;NDEBUG;%(PreprocessorDefinitions) + pch.h + + + copy PackageGold.appxmanifest Package.appxmanifest /Y +mkdir Assets +copy AssetsGold\*.* Assets /Y + + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + Designer + Document + + + true + + + true + Document + + + true + + + true + + + true + + + true + + + true + + + + + + {acb316ca-3ecb-48e5-be0a-91e72d5b0f12} + + + {40b76674-02de-40ef-889b-fad1489685e7} + + + {d326891e-ece4-4b94-b5e7-8aa0a8e8ecbc} + + + {5d271429-c288-4534-98af-94475d940058} + + + {2f911c05-b341-4291-8bf5-09edecbdd5f5} + + + {935028af-b850-4ad7-a00e-7ba84fb97d05} + + + {2b2d16bd-1d37-46af-a3f8-552900951b26} + + + {5fac15bd-7397-4512-99d5-66cdc03af5b7} + + + {ddf90203-0aae-4f38-b589-2e9637658ce6} + + + + + true + + + + + + + + + + + + \ No newline at end of file diff --git a/UWP/UWP.vcxproj.filters b/UWP/UWP.vcxproj.filters new file mode 100644 index 0000000000..18938e7ad7 --- /dev/null +++ b/UWP/UWP.vcxproj.filters @@ -0,0 +1,113 @@ + + + + + 0d070030-beb5-4f48-99a0-b1777297a468 + + + a5564d79-b131-4b27-9f5f-d80671731d94 + bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + + Common + + + Common + + + Common + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + {ef87b390-608f-4c6d-a0ad-88963875ed11} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Assets + + + Content + + + Content + + + Content + + + Content + + + Content + + + + + + + + + Content + + + Content + + + Content + + + Content + + + Content + + + + + Content + + + \ No newline at end of file diff --git a/UWP/UWPHost.cpp b/UWP/UWPHost.cpp new file mode 100644 index 0000000000..b7281b95ad --- /dev/null +++ b/UWP/UWPHost.cpp @@ -0,0 +1,189 @@ +// Copyright (c) 2012- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// 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 "file/file_util.h" +#include "base/NativeApp.h" +#include "input/input_state.h" + +#include "Common/StringUtils.h" +#include "Core/Core.h" +#include "Core/Config.h" +#include "Core/CoreParameter.h" +#include "Core/System.h" +#include "Core/Debugger/SymbolMap.h" + +#include "UI/OnScreenDisplay.h" + +#include "Windows/XinputDevice.h" +#include "Windows/DSoundStream.h" + +#include "UWP/XAudioSoundStream.h" +#include "UWP/UWPHost.h" + +UWPHost::UWPHost() { + + // add first XInput device to respond + input.push_back(std::shared_ptr(new XinputDevice())); +} + +UWPHost::~UWPHost() { + +} + +void UWPHost::SetConsolePosition() { +} + +void UWPHost::UpdateConsolePosition() { +} + +bool UWPHost::InitGraphics(std::string *error_message, GraphicsContext **ctx) { + // Done elsewhere + return true; +} + +void UWPHost::ShutdownGraphics() { + // Done elsewhere +} + +void UWPHost::SetWindowTitle(const char *message) { + // Should really be done differently +} + +void UWPHost::InitSound() { +} + +void UWPHost::UpdateSound() { +} + +void UWPHost::ShutdownSound() { +} + +void UWPHost::UpdateUI() { +} + +void UWPHost::UpdateMemView() { +} + +void UWPHost::UpdateDisassembly() { +} + +void UWPHost::SetDebugMode(bool mode) { +} + +void UWPHost::PollControllers() { + bool doPad = true; + for (auto iter = this->input.begin(); iter != this->input.end(); iter++) + { + auto device = *iter; + if (!doPad && device->IsPad()) + continue; + if (device->UpdateState() == InputDevice::UPDATESTATE_SKIP_PAD) + doPad = false; + } + + /* + g_mouseDeltaX *= 0.9f; + g_mouseDeltaY *= 0.9f; + + // TODO: Tweak! + float scaleFactor = g_dpi_scale * 0.01f; + + float mx = std::max(-1.0f, std::min(1.0f, g_mouseDeltaX * scaleFactor)); + float my = std::max(-1.0f, std::min(1.0f, g_mouseDeltaY * scaleFactor)); + AxisInput axisX, axisY; + axisX.axisId = JOYSTICK_AXIS_MOUSE_REL_X; + axisX.deviceId = DEVICE_ID_MOUSE; + axisX.value = mx; + axisY.axisId = JOYSTICK_AXIS_MOUSE_REL_Y; + axisY.deviceId = DEVICE_ID_MOUSE; + axisY.value = my; + */ +} + +void UWPHost::BootDone() { + g_symbolMap->SortSymbols(); + + SetDebugMode(false); + Core_EnableStepping(false); +} + +static std::string SymbolMapFilename(const char *currentFilename, char* ext) { + FileInfo info; + + std::string result = currentFilename; + + // can't fail, definitely exists if it gets this far + getFileInfo(currentFilename, &info); + if (info.isDirectory) { +#ifdef _WIN32 + char* slash = "\\"; +#else + char* slash = "/"; +#endif + if (!endsWith(result, slash)) + result += slash; + + return result + ".ppsspp-symbols" + ext; + } else { + size_t dot = result.rfind('.'); + if (dot == result.npos) + return result + ext; + + result.replace(dot, result.npos, ext); + return result; + } +} + +bool UWPHost::AttemptLoadSymbolMap() { + bool result1 = g_symbolMap->LoadSymbolMap(SymbolMapFilename(PSP_CoreParameter().fileToStart.c_str(), ".ppmap").c_str()); + // Load the old-style map file. + if (!result1) + result1 = g_symbolMap->LoadSymbolMap(SymbolMapFilename(PSP_CoreParameter().fileToStart.c_str(), ".map").c_str()); + bool result2 = g_symbolMap->LoadNocashSym(SymbolMapFilename(PSP_CoreParameter().fileToStart.c_str(), ".sym").c_str()); + return result1 || result2; +} + +void UWPHost::SaveSymbolMap() { + g_symbolMap->SaveSymbolMap(SymbolMapFilename(PSP_CoreParameter().fileToStart.c_str(), ".ppmap").c_str()); +} + +bool UWPHost::IsDebuggingEnabled() { + return false; +} + +bool UWPHost::CanCreateShortcut() { + return false; // Turn on when below function fixed +} + +bool UWPHost::CreateDesktopShortcut(std::string argumentPath, std::string gameTitle) { + // TODO: not working correctly + return false; +} + +void UWPHost::GoFullscreen(bool viewFullscreen) { + // TODO +} + +void UWPHost::ToggleDebugConsoleVisibility() { + // N/A +} + +void UWPHost::NotifyUserMessage(const std::string &message, float duration, u32 color, const char *id) { + osm.Show(message, duration, color, -1, true, id); +} diff --git a/UWP/UWPHost.h b/UWP/UWPHost.h new file mode 100644 index 0000000000..75353b5cc3 --- /dev/null +++ b/UWP/UWPHost.h @@ -0,0 +1,56 @@ +#pragma once + +#include "Core/Host.h" + +#include +#include + +#include "Windows/InputDevice.h" + +class UWPHost : public Host { +public: + UWPHost(); + ~UWPHost(); + + void UpdateMemView() override; + void UpdateDisassembly() override; + void UpdateUI() override; + void SetDebugMode(bool mode) override; + + // If returns false, will return a null context + bool InitGraphics(std::string *error_message, GraphicsContext **ctx) override; + void PollControllers() override; + void ShutdownGraphics() override; + + void InitSound() override; + void UpdateSound() override; + void ShutdownSound() override; + + bool IsDebuggingEnabled() override; + void BootDone() override; + bool AttemptLoadSymbolMap() override; + void SaveSymbolMap() override; + void SetWindowTitle(const char *message) override; + + bool GPUDebuggingActive() override { return false; } + void GPUNotifyCommand(u32 pc) override {} + void GPUNotifyDisplay(u32 framebuf, u32 stride, int format) override {} + void GPUNotifyDraw() override {} + void GPUNotifyTextureAttachment(u32 addr) override {} + void ToggleDebugConsoleVisibility() override; + + bool CanCreateShortcut() override; + bool CreateDesktopShortcut(std::string argumentPath, std::string title) override; + + void NotifyUserMessage(const std::string &message, float duration = 1.0f, u32 color = 0x00FFFFFF, const char *id = nullptr) override; + + void GoFullscreen(bool) override; + + GraphicsContext *GetGraphicsContext() { return nullptr; } + +private: + void SetConsolePosition(); + void UpdateConsolePosition(); + + std::list> input; +}; diff --git a/UWP/UWPUtil.h b/UWP/UWPUtil.h new file mode 100644 index 0000000000..de80bba6a7 --- /dev/null +++ b/UWP/UWPUtil.h @@ -0,0 +1,12 @@ +#pragma once + +#include "util/text/utf8.h" + +inline Platform::String ^ToPlatformString(std::string str) { + return ref new Platform::String(ConvertUTF8ToWString(str).c_str()); +} + +inline std::string FromPlatformString(Platform::String ^str) { + std::wstring wstr(str->Data()); + return ConvertWStringToUTF8(wstr); +} \ No newline at end of file diff --git a/UWP/UWP_TemporaryKey.pfx b/UWP/UWP_TemporaryKey.pfx new file mode 100644 index 0000000000..cdcf39f7d0 Binary files /dev/null and b/UWP/UWP_TemporaryKey.pfx differ diff --git a/UWP/XAudioSoundStream.cpp b/UWP/XAudioSoundStream.cpp new file mode 100644 index 0000000000..ad82c1e93f --- /dev/null +++ b/UWP/XAudioSoundStream.cpp @@ -0,0 +1,190 @@ +#include "pch.h" +#include + +#include "thread/threadutil.h" +#include "XAudioSoundStream.h" + +#include + +#define BUFSIZE 0x80000U + +class XAudioBackend : public WindowsAudioBackend { +public: + XAudioBackend(); + ~XAudioBackend() override; + + bool Init(HWND window, StreamCallback callback, int sampleRate ) override; // If fails, can safely delete the object + void Update() override; + int GetSampleRate() override { return sampleRate_; } + +private: + inline int ModBufferSize( int x ) { return ( x + BUFSIZE ) % BUFSIZE; } + bool RunSound(); + bool CreateBuffer(); + bool WriteDataToBuffer( char* soundData, DWORD soundBytes ); + void PollLoop(); + + StreamCallback callback_; + + IXAudio2* xaudioDevice; + IXAudio2MasteringVoice* xaudioMaster; + IXAudio2SourceVoice* xaudioVoice; + + int sampleRate_; + + char realtimeBuffer_[ BUFSIZE ]; + unsigned cursor_; + + HANDLE thread_; + HANDLE exitEvent_; + + bool exit = false; +}; + +// TODO: Get rid of this +static XAudioBackend *g_dsound; + +inline int RoundDown128( int x ) { + return x & ( ~127 ); +} + +bool XAudioBackend::CreateBuffer() { + if FAILED( xaudioDevice->CreateMasteringVoice( &xaudioMaster, 2, sampleRate_, 0, 0, NULL ) ) + return false; + + WAVEFORMATEX waveFormat; + waveFormat.cbSize = sizeof( waveFormat ); + waveFormat.nAvgBytesPerSec = sampleRate_ * 4; + waveFormat.nBlockAlign = 4; + waveFormat.nChannels = 2; + waveFormat.nSamplesPerSec = sampleRate_; + waveFormat.wBitsPerSample = 16; + waveFormat.wFormatTag = WAVE_FORMAT_PCM; + + if FAILED( xaudioDevice->CreateSourceVoice( &xaudioVoice, &waveFormat, 0, XAUDIO2_DEFAULT_FREQ_RATIO, nullptr, nullptr, nullptr ) ) + return false; + + return true; +} + +bool XAudioBackend::RunSound() { + if FAILED( XAudio2Create( &xaudioDevice, 0, XAUDIO2_DEFAULT_PROCESSOR ) ) { + xaudioDevice = NULL; + return false; + } + + XAUDIO2_DEBUG_CONFIGURATION dbgCfg; + ZeroMemory( &dbgCfg, sizeof( dbgCfg ) ); + dbgCfg.TraceMask = XAUDIO2_LOG_WARNINGS | XAUDIO2_LOG_DETAIL; + //dbgCfg.BreakMask = XAUDIO2_LOG_ERRORS; + xaudioDevice->SetDebugConfiguration( &dbgCfg ); + + if ( !CreateBuffer() ) { + xaudioDevice->Release(); + xaudioDevice = NULL; + return false; + } + + cursor_ = 0; + + if FAILED( xaudioVoice->Start( 0, XAUDIO2_COMMIT_NOW ) ) { + xaudioDevice->Release(); + xaudioDevice = NULL; + return false; + } + + thread_ = (HANDLE)_beginthreadex( 0, 0, []( void* param ) + { + setCurrentThreadName("XAudio2"); + XAudioBackend *backend = (XAudioBackend *)param; + backend->PollLoop(); + return 0U; + }, ( void * )this, 0, 0 ); + SetThreadPriority( thread_, THREAD_PRIORITY_ABOVE_NORMAL ); + + return true; +} + +XAudioBackend::XAudioBackend() : xaudioDevice( nullptr ) { + exitEvent_ = CreateEvent( nullptr, true, true, L"" ); +} + +XAudioBackend::~XAudioBackend() { + if ( !xaudioDevice ) + return; + + if ( !xaudioVoice ) + return; + + exit = true; + WaitForSingleObject( exitEvent_, INFINITE ); + CloseHandle( exitEvent_ ); + + xaudioDevice->Release(); +} + +bool XAudioBackend::Init(HWND window, StreamCallback _callback, int sampleRate ) { + callback_ = _callback; + sampleRate_ = sampleRate; + return RunSound(); +} + +void XAudioBackend::Update() { +} + +bool XAudioBackend::WriteDataToBuffer( char* soundData, DWORD soundBytes ) { + XAUDIO2_BUFFER xaudioBuffer; + ZeroMemory( &xaudioBuffer, sizeof( xaudioBuffer ) ); + xaudioBuffer.pAudioData = (const BYTE*)soundData; + xaudioBuffer.AudioBytes = soundBytes; + + if FAILED( xaudioVoice->SubmitSourceBuffer( &xaudioBuffer, NULL ) ) + return false; + + return true; +} + +void XAudioBackend::PollLoop() +{ + ResetEvent( exitEvent_ ); + + while ( !exit ) + { + XAUDIO2_VOICE_STATE state; + xaudioVoice->GetState( &state ); + + if ( state.BuffersQueued < 1 ) + { + int a = 0; + a++; + } + + unsigned bytesRequired = ( sampleRate_ * 4 ) / 100; + + while ( bytesRequired ) + { + unsigned bytesLeftInBuffer = BUFSIZE - cursor_; + unsigned readCount = std::min( bytesRequired, bytesLeftInBuffer ); + + int numBytesRendered = 4 * ( *callback_ )( (short*)&realtimeBuffer_[ cursor_ ], readCount / 4, 16, sampleRate_, 2 ); + + WriteDataToBuffer( &realtimeBuffer_[ cursor_ ], numBytesRendered ); + cursor_ += numBytesRendered; + if ( cursor_ >= BUFSIZE ) + { + cursor_ = 0; + bytesLeftInBuffer = BUFSIZE; + } + + bytesRequired -= numBytesRendered; + } + + Sleep( 2 ); + } + + SetEvent( exitEvent_ ); +} + +WindowsAudioBackend *CreateAudioBackend( AudioBackendType type ) { + return new XAudioBackend(); +} \ No newline at end of file diff --git a/UWP/XAudioSoundStream.h b/UWP/XAudioSoundStream.h new file mode 100644 index 0000000000..35b26f0abf --- /dev/null +++ b/UWP/XAudioSoundStream.h @@ -0,0 +1,8 @@ +#pragma once + +#include "Common/CommonWindows.h" +#include "Core/Config.h" +#include "Windows/DSoundStream.h" + +// Factory +WindowsAudioBackend *CreateAudioBackend(AudioBackendType type); diff --git a/UWP/glslang_UWP/glslang_UWP.vcxproj b/UWP/glslang_UWP/glslang_UWP.vcxproj new file mode 100644 index 0000000000..44b73b2814 --- /dev/null +++ b/UWP/glslang_UWP/glslang_UWP.vcxproj @@ -0,0 +1,410 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + UWP Gold + ARM + + + UWP Gold + Win32 + + + UWP Gold + x64 + + + + {d326891e-ece4-4b94-b5e7-8aa0a8e8ecbc} + StaticLibrary + glslang_UWP + en-US + 14.0 + true + Windows Store + 10.0.10586.0 + 10.0.10240.0 + 10.0 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Use + false + true + pch.h + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + Use + false + true + pch.h + _CRT_SECURE_NO_WARNINGS;NOMINMAX;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/UWP/glslang_UWP/glslang_UWP.vcxproj.filters b/UWP/glslang_UWP/glslang_UWP.vcxproj.filters new file mode 100644 index 0000000000..70bbd5a997 --- /dev/null +++ b/UWP/glslang_UWP/glslang_UWP.vcxproj.filters @@ -0,0 +1,333 @@ + + + + + {bc1f9d62-48dc-424b-aae9-238ea7e9797a} + + + {da2d19d2-ae8e-4073-8fdc-edbb89f56938} + + + {b6bf83f2-1717-4cc4-88db-27b4a11d839b} + + + {352266d8-ae41-428f-bf18-c5a2398e40f1} + + + {682c51df-54f0-4589-af43-7fd4ee2b94f2} + + + {cdd1b028-654a-444d-aa4a-8833277a6cc9} + + + {d3ab5902-2265-45b3-98b2-125c3ca2b3d1} + + + {d8291bf6-2377-4155-8649-42d850d0f925} + + + {0e44acc8-78b5-4d5b-88e3-4a68435e3aec} + + + + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent\Preprocessor + + + glslang\MachineIndependent\Preprocessor + + + glslang\MachineIndependent\Preprocessor + + + glslang\MachineIndependent\Preprocessor + + + glslang\MachineIndependent\Preprocessor + + + glslang\MachineIndependent\Preprocessor + + + glslang\MachineIndependent\Preprocessor + + + glslang\GenericCodegen + + + glslang\GenericCodegen + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + hlsl + + + hlsl + + + hlsl + + + hlsl + + + hlsl + + + hlsl + + + hlsl + + + glslang\OSDependent + + + OGLCompilersDLL + + + + + + + glslang\Include + + + glslang\Include + + + glslang\Include + + + glslang\Include + + + glslang\Include + + + glslang\Include + + + glslang\Include + + + glslang\Include + + + glslang\Include + + + glslang\Include + + + glslang\Include + + + glslang\Include + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent + + + glslang\MachineIndependent\Preprocessor + + + glslang\MachineIndependent\Preprocessor + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + SPIRV + + + hlsl + + + hlsl + + + hlsl + + + hlsl + + + hlsl + + + hlsl + + + hlsl + + + hlsl + + + OGLCompilersDLL + + + \ No newline at end of file diff --git a/UWP/glslang_UWP/pch.cpp b/UWP/glslang_UWP/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/UWP/glslang_UWP/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/UWP/glslang_UWP/pch.h b/UWP/glslang_UWP/pch.h new file mode 100644 index 0000000000..be721813fc --- /dev/null +++ b/UWP/glslang_UWP/pch.h @@ -0,0 +1,4 @@ +#pragma once + +#include "targetver.h" + diff --git a/UWP/glslang_UWP/targetver.h b/UWP/glslang_UWP/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/UWP/glslang_UWP/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/UWP/imgconv.sh b/UWP/imgconv.sh new file mode 100644 index 0000000000..b59772d260 --- /dev/null +++ b/UWP/imgconv.sh @@ -0,0 +1,27 @@ +CONVERT=/c/batch/convert.exe +ICON=../source_assets/image/icon_regular.png +ASSET_DIR=AssetsNormal + +mkdir -p $ASSET_DIR +$CONVERT ${ICON} -resize 48x48 $ASSET_DIR/LockScreenLogo.scale-200.png +$CONVERT ${ICON} -resize 88x88 $ASSET_DIR/Square44x44Logo.scale-200.png +$CONVERT ${ICON} -resize 24x24 $ASSET_DIR/Square44x44Logo.targetsize-24_altform-unplated.png +$CONVERT ${ICON} -resize 300x300 $ASSET_DIR/Square150x150Logo.scale-200.png +$CONVERT ${ICON} -resize 50x50 $ASSET_DIR/StoreLogo.png +$CONVERT ${ICON} -resize 1240x600 -background none -gravity center -extent 1240x600 $ASSET_DIR/SplashScreen.scale-200.png + + + +ICON=../source_assets/image/icon_gold.png +ASSET_DIR=AssetsGold + +mkdir -p $ASSET_DIR +$CONVERT ${ICON} -resize 48x48 $ASSET_DIR/LockScreenLogo.scale-200.png +$CONVERT ${ICON} -resize 88x88 $ASSET_DIR/Square44x44Logo.scale-200.png +$CONVERT ${ICON} -resize 24x24 $ASSET_DIR/Square44x44Logo.targetsize-24_altform-unplated.png +$CONVERT ${ICON} -resize 300x300 $ASSET_DIR/Square150x150Logo.scale-200.png +$CONVERT ${ICON} -resize 50x50 $ASSET_DIR/StoreLogo.png +$CONVERT ${ICON} -resize 1240x600 -background none -gravity center -extent 1240x600 $ASSET_DIR/SplashScreen.scale-200.png + + + diff --git a/UWP/libkirk_UWP/libkirk_UWP.vcxproj b/UWP/libkirk_UWP/libkirk_UWP.vcxproj new file mode 100644 index 0000000000..48113e0c0b --- /dev/null +++ b/UWP/libkirk_UWP/libkirk_UWP.vcxproj @@ -0,0 +1,319 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + UWP Gold + ARM + + + UWP Gold + Win32 + + + UWP Gold + x64 + + + + {2f911c05-b341-4291-8bf5-09edecbdd5f5} + StaticLibrary + libkirk_UWP + en-US + 14.0 + true + Windows Store + 10.0.10586.0 + 10.0.10240.0 + 10.0 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + NotUsing + false + true + + + _UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + + + _UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + + + _UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + + + _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + + + _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + + + _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + + + _UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + + + _UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + + + _UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UWP/libkirk_UWP/libkirk_UWP.vcxproj.filters b/UWP/libkirk_UWP/libkirk_UWP.vcxproj.filters new file mode 100644 index 0000000000..9c2472aed0 --- /dev/null +++ b/UWP/libkirk_UWP/libkirk_UWP.vcxproj.filters @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UWP/libkirk_UWP/pch.cpp b/UWP/libkirk_UWP/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/UWP/libkirk_UWP/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/UWP/libkirk_UWP/pch.h b/UWP/libkirk_UWP/pch.h new file mode 100644 index 0000000000..529bbb17fe --- /dev/null +++ b/UWP/libkirk_UWP/pch.h @@ -0,0 +1,9 @@ +#pragma once + +#include "targetver.h" + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#include diff --git a/UWP/libkirk_UWP/targetver.h b/UWP/libkirk_UWP/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/UWP/libkirk_UWP/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/UWP/pch.cpp b/UWP/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/UWP/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/UWP/pch.h b/UWP/pch.h new file mode 100644 index 0000000000..95b1c658cf --- /dev/null +++ b/UWP/pch.h @@ -0,0 +1,17 @@ +#pragma once + +#define NOMINMAX + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include \ No newline at end of file diff --git a/UWP/zlib_UWP/targetver.h b/UWP/zlib_UWP/targetver.h new file mode 100644 index 0000000000..a66ecb00f1 --- /dev/null +++ b/UWP/zlib_UWP/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/UWP/zlib_UWP/zlib_UWP.vcxproj b/UWP/zlib_UWP/zlib_UWP.vcxproj new file mode 100644 index 0000000000..7d858a7cc5 --- /dev/null +++ b/UWP/zlib_UWP/zlib_UWP.vcxproj @@ -0,0 +1,325 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + UWP Gold + ARM + + + UWP Gold + Win32 + + + UWP Gold + x64 + + + + {ddf90203-0aae-4f38-b589-2e9637658ce6} + StaticLibrary + zlib_UWP + en-US + 14.0 + true + Windows Store + 10.0.10586.0 + 10.0.10240.0 + 10.0 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + false + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + NotUsing + false + true + _CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + _CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + _CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + _CRT_SECURE_NO_WARNINGS;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + _CRT_SECURE_NO_WARNINGS;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + _CRT_SECURE_NO_WARNINGS;_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1;%(ClCompile.PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + _CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + _CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + NotUsing + false + true + _CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) + + + Console + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {acb316ca-3ecb-48e5-be0a-91e72d5b0f12} + + + {40b76674-02de-40ef-889b-fad1489685e7} + + + + + + \ No newline at end of file diff --git a/UWP/zlib_UWP/zlib_UWP.vcxproj.filters b/UWP/zlib_UWP/zlib_UWP.vcxproj.filters new file mode 100644 index 0000000000..42a70a4313 --- /dev/null +++ b/UWP/zlib_UWP/zlib_UWP.vcxproj.filters @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Windows/EmuThread.cpp b/Windows/EmuThread.cpp index b57f7af6aa..0f3743721c 100644 --- a/Windows/EmuThread.cpp +++ b/Windows/EmuThread.cpp @@ -1,5 +1,3 @@ -// NOTE: Apologies for the quality of this code, this is really from pre-opensource Dolphin - that is, 2003. - #include #include "base/timeutil.h" @@ -26,6 +24,7 @@ #include #include #include + #pragma intrinsic(_InterlockedExchange) static std::mutex emuThreadLock; diff --git a/Windows/GPU/D3D11Context.cpp b/Windows/GPU/D3D11Context.cpp index e391082772..1f297cf81d 100644 --- a/Windows/GPU/D3D11Context.cpp +++ b/Windows/GPU/D3D11Context.cpp @@ -26,6 +26,7 @@ D3D11Context::~D3D11Context() { void D3D11Context::SwapBuffers() { swapChain_->Present(0, 0); + draw_->HandleEvent(Draw::Event::PRESENTED, 0, 0, nullptr, nullptr); // Might be a good idea. // context_->ClearState(); diff --git a/Windows/PPSSPP.sln b/Windows/PPSSPP.sln index ed6f8d09d4..13abef5350 100644 --- a/Windows/PPSSPP.sln +++ b/Windows/PPSSPP.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPSSPPWindows", "PPSSPP.vcxproj", "{567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}" ProjectSection(ProjectDependencies) = postProject @@ -83,8 +83,6 @@ Global Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 - Tests|Win32 = Tests|Win32 - Tests|x64 = Tests|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -95,10 +93,6 @@ Global {567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}.Release|Win32.Build.0 = Release|Win32 {567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}.Release|x64.ActiveCfg = Release|x64 {567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}.Release|x64.Build.0 = Release|x64 - {567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}.Tests|Win32.ActiveCfg = Release|Win32 - {567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}.Tests|Win32.Build.0 = Release|Win32 - {567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}.Tests|x64.ActiveCfg = Release|x64 - {567AF8DB-42C1-4D08-96CD-D70A2DFEFC6B}.Tests|x64.Build.0 = Release|x64 {3FCDBAE2-5103-4350-9A8E-848CE9C73195}.Debug|Win32.ActiveCfg = Debug|Win32 {3FCDBAE2-5103-4350-9A8E-848CE9C73195}.Debug|Win32.Build.0 = Debug|Win32 {3FCDBAE2-5103-4350-9A8E-848CE9C73195}.Debug|x64.ActiveCfg = Debug|x64 @@ -107,34 +101,24 @@ Global {3FCDBAE2-5103-4350-9A8E-848CE9C73195}.Release|Win32.Build.0 = Release|Win32 {3FCDBAE2-5103-4350-9A8E-848CE9C73195}.Release|x64.ActiveCfg = Release|x64 {3FCDBAE2-5103-4350-9A8E-848CE9C73195}.Release|x64.Build.0 = Release|x64 - {3FCDBAE2-5103-4350-9A8E-848CE9C73195}.Tests|Win32.ActiveCfg = Release|Win32 - {3FCDBAE2-5103-4350-9A8E-848CE9C73195}.Tests|Win32.Build.0 = Release|Win32 - {3FCDBAE2-5103-4350-9A8E-848CE9C73195}.Tests|x64.ActiveCfg = Release|x64 - {3FCDBAE2-5103-4350-9A8E-848CE9C73195}.Tests|x64.Build.0 = Release|x64 {F761046E-6C38-4428-A5F1-38391A37BB34}.Debug|Win32.ActiveCfg = Debug|Win32 {F761046E-6C38-4428-A5F1-38391A37BB34}.Debug|Win32.Build.0 = Debug|Win32 {F761046E-6C38-4428-A5F1-38391A37BB34}.Debug|x64.ActiveCfg = Debug|x64 {F761046E-6C38-4428-A5F1-38391A37BB34}.Debug|x64.Build.0 = Debug|x64 + {F761046E-6C38-4428-A5F1-38391A37BB34}.Release|ARM.ActiveCfg = Release|Win32 {F761046E-6C38-4428-A5F1-38391A37BB34}.Release|Win32.ActiveCfg = Release|Win32 {F761046E-6C38-4428-A5F1-38391A37BB34}.Release|Win32.Build.0 = Release|Win32 {F761046E-6C38-4428-A5F1-38391A37BB34}.Release|x64.ActiveCfg = Release|x64 {F761046E-6C38-4428-A5F1-38391A37BB34}.Release|x64.Build.0 = Release|x64 - {F761046E-6C38-4428-A5F1-38391A37BB34}.Tests|Win32.ActiveCfg = Release|Win32 - {F761046E-6C38-4428-A5F1-38391A37BB34}.Tests|Win32.Build.0 = Release|Win32 - {F761046E-6C38-4428-A5F1-38391A37BB34}.Tests|x64.ActiveCfg = Release|x64 - {F761046E-6C38-4428-A5F1-38391A37BB34}.Tests|x64.Build.0 = Release|x64 {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Debug|Win32.ActiveCfg = Debug|Win32 {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Debug|Win32.Build.0 = Debug|Win32 {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Debug|x64.ActiveCfg = Debug|x64 {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Debug|x64.Build.0 = Debug|x64 + {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Release|ARM.ActiveCfg = Release|Win32 {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Release|Win32.ActiveCfg = Release|Win32 {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Release|Win32.Build.0 = Release|Win32 {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Release|x64.ActiveCfg = Release|x64 {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Release|x64.Build.0 = Release|x64 - {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Tests|Win32.ActiveCfg = Release|Win32 - {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Tests|Win32.Build.0 = Release|Win32 - {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Tests|x64.ActiveCfg = Release|x64 - {457F45D2-556F-47BC-A31D-AFF0D15BEAED}.Tests|x64.Build.0 = Release|x64 {533F1D30-D04D-47CC-AD71-20F658907E36}.Debug|Win32.ActiveCfg = Debug|Win32 {533F1D30-D04D-47CC-AD71-20F658907E36}.Debug|Win32.Build.0 = Debug|Win32 {533F1D30-D04D-47CC-AD71-20F658907E36}.Debug|x64.ActiveCfg = Debug|x64 @@ -143,10 +127,6 @@ Global {533F1D30-D04D-47CC-AD71-20F658907E36}.Release|Win32.Build.0 = Release|Win32 {533F1D30-D04D-47CC-AD71-20F658907E36}.Release|x64.ActiveCfg = Release|x64 {533F1D30-D04D-47CC-AD71-20F658907E36}.Release|x64.Build.0 = Release|x64 - {533F1D30-D04D-47CC-AD71-20F658907E36}.Tests|Win32.ActiveCfg = Release|Win32 - {533F1D30-D04D-47CC-AD71-20F658907E36}.Tests|Win32.Build.0 = Release|Win32 - {533F1D30-D04D-47CC-AD71-20F658907E36}.Tests|x64.ActiveCfg = Release|x64 - {533F1D30-D04D-47CC-AD71-20F658907E36}.Tests|x64.Build.0 = Release|x64 {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|Win32.ActiveCfg = Debug|Win32 {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|Win32.Build.0 = Debug|Win32 {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Debug|x64.ActiveCfg = Debug|x64 @@ -155,10 +135,6 @@ Global {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|Win32.Build.0 = Release|Win32 {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|x64.ActiveCfg = Release|x64 {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Release|x64.Build.0 = Release|x64 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Tests|Win32.ActiveCfg = Release|Win32 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Tests|Win32.Build.0 = Release|Win32 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Tests|x64.ActiveCfg = Release|x64 - {C4DF647E-80EA-4111-A0A8-218B1B711E18}.Tests|x64.Build.0 = Release|x64 {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Debug|Win32.ActiveCfg = Debug|Win32 {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Debug|Win32.Build.0 = Debug|Win32 {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Debug|x64.ActiveCfg = Debug|x64 @@ -167,10 +143,6 @@ Global {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Release|Win32.Build.0 = Release|Win32 {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Release|x64.ActiveCfg = Release|x64 {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Release|x64.Build.0 = Release|x64 - {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Tests|Win32.ActiveCfg = Release|Win32 - {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Tests|Win32.Build.0 = Release|Win32 - {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Tests|x64.ActiveCfg = Release|x64 - {EE9BD869-CAA3-447D-8328-294D90DE2C1F}.Tests|x64.Build.0 = Release|x64 {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}.Debug|Win32.ActiveCfg = Debug|Win32 {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}.Debug|Win32.Build.0 = Debug|Win32 {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}.Debug|x64.ActiveCfg = Debug|x64 @@ -179,10 +151,6 @@ Global {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}.Release|Win32.Build.0 = Release|Win32 {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}.Release|x64.ActiveCfg = Release|x64 {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}.Release|x64.Build.0 = Release|x64 - {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}.Tests|Win32.ActiveCfg = Release|Win32 - {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}.Tests|Win32.Build.0 = Release|Win32 - {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}.Tests|x64.ActiveCfg = Release|x64 - {3BAAE095-E0AB-4B0E-B5DF-CE39C8AE31DE}.Tests|x64.Build.0 = Release|x64 {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Debug|Win32.ActiveCfg = Debug|Win32 {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Debug|Win32.Build.0 = Debug|Win32 {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Debug|x64.ActiveCfg = Debug|x64 @@ -191,10 +159,6 @@ Global {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Release|Win32.Build.0 = Release|Win32 {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Release|x64.ActiveCfg = Release|x64 {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Release|x64.Build.0 = Release|x64 - {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Tests|Win32.ActiveCfg = Release|Win32 - {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Tests|Win32.Build.0 = Release|Win32 - {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Tests|x64.ActiveCfg = Release|x64 - {37CBC214-7CE7-4655-B619-F7CEE16E3313}.Tests|x64.Build.0 = Release|x64 {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Debug|Win32.ActiveCfg = Debug|Win32 {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Debug|Win32.Build.0 = Debug|Win32 {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Debug|x64.ActiveCfg = Debug|x64 @@ -203,10 +167,6 @@ Global {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Release|Win32.Build.0 = Release|Win32 {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Release|x64.ActiveCfg = Release|x64 {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Release|x64.Build.0 = Release|x64 - {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Tests|Win32.ActiveCfg = Release|Win32 - {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Tests|Win32.Build.0 = Release|Win32 - {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Tests|x64.ActiveCfg = Release|x64 - {004B8D11-2BE3-4BD9-AB40-2BE04CF2096F}.Tests|x64.Build.0 = Release|x64 {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}.Debug|Win32.ActiveCfg = Debug|Win32 {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}.Debug|Win32.Build.0 = Debug|Win32 {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}.Debug|x64.ActiveCfg = Debug|x64 @@ -215,10 +175,6 @@ Global {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}.Release|Win32.Build.0 = Release|Win32 {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}.Release|x64.ActiveCfg = Release|x64 {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}.Release|x64.Build.0 = Release|x64 - {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}.Tests|Win32.ActiveCfg = Tests|Win32 - {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}.Tests|Win32.Build.0 = Tests|Win32 - {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}.Tests|x64.ActiveCfg = Tests|x64 - {129E5E2B-39C1-4D84-96FE-DFD22DBB4A25}.Tests|x64.Build.0 = Tests|x64 {EDFA2E87-8AC1-4853-95D4-D7594FF81947}.Debug|Win32.ActiveCfg = Debug|Win32 {EDFA2E87-8AC1-4853-95D4-D7594FF81947}.Debug|Win32.Build.0 = Debug|Win32 {EDFA2E87-8AC1-4853-95D4-D7594FF81947}.Debug|x64.ActiveCfg = Debug|x64 @@ -227,10 +183,6 @@ Global {EDFA2E87-8AC1-4853-95D4-D7594FF81947}.Release|Win32.Build.0 = Release|Win32 {EDFA2E87-8AC1-4853-95D4-D7594FF81947}.Release|x64.ActiveCfg = Release|x64 {EDFA2E87-8AC1-4853-95D4-D7594FF81947}.Release|x64.Build.0 = Release|x64 - {EDFA2E87-8AC1-4853-95D4-D7594FF81947}.Tests|Win32.ActiveCfg = Release|Win32 - {EDFA2E87-8AC1-4853-95D4-D7594FF81947}.Tests|Win32.Build.0 = Release|Win32 - {EDFA2E87-8AC1-4853-95D4-D7594FF81947}.Tests|x64.ActiveCfg = Release|x64 - {EDFA2E87-8AC1-4853-95D4-D7594FF81947}.Tests|x64.Build.0 = Release|x64 {4328A62C-F1E9-47ED-B816-A1A81DAF4363}.Debug|Win32.ActiveCfg = Debug|Win32 {4328A62C-F1E9-47ED-B816-A1A81DAF4363}.Debug|Win32.Build.0 = Debug|Win32 {4328A62C-F1E9-47ED-B816-A1A81DAF4363}.Debug|x64.ActiveCfg = Debug|x64 @@ -239,10 +191,6 @@ Global {4328A62C-F1E9-47ED-B816-A1A81DAF4363}.Release|Win32.Build.0 = Release|Win32 {4328A62C-F1E9-47ED-B816-A1A81DAF4363}.Release|x64.ActiveCfg = Release|x64 {4328A62C-F1E9-47ED-B816-A1A81DAF4363}.Release|x64.Build.0 = Release|x64 - {4328A62C-F1E9-47ED-B816-A1A81DAF4363}.Tests|Win32.ActiveCfg = Release|Win32 - {4328A62C-F1E9-47ED-B816-A1A81DAF4363}.Tests|Win32.Build.0 = Release|Win32 - {4328A62C-F1E9-47ED-B816-A1A81DAF4363}.Tests|x64.ActiveCfg = Release|x64 - {4328A62C-F1E9-47ED-B816-A1A81DAF4363}.Tests|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Windows/XinputDevice.cpp b/Windows/XinputDevice.cpp index 2dda4f159d..1604022de2 100644 --- a/Windows/XinputDevice.cpp +++ b/Windows/XinputDevice.cpp @@ -1,4 +1,6 @@ -#include +#include "ppsspp_config.h" + +#include #include #include "base/NativeApp.h" @@ -11,6 +13,8 @@ // Utilities to dynamically load XInput. Adapted from SDL. +#if !PPSSPP_PLATFORM(UWP) + typedef DWORD (WINAPI *XInputGetState_t) (DWORD dwUserIndex, XINPUT_STATE* pState); typedef DWORD (WINAPI *XInputSetState_t) (DWORD dwUserIndex, XINPUT_VIBRATION* pVibration); typedef DWORD (WINAPI *XInputGetCapabilities_t) (DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES* pCapabilities); @@ -66,6 +70,14 @@ static void UnloadXInputDLL() { } } +#else +static int LoadXInputDLL() { return 0; } +static void UnloadXInputDLL() {} +#define PPSSPP_XInputGetState XInputGetState +#define PPSSPP_XInputSetState XInputSetState +#define PPSSPP_XInputGetCapabilities XInputGetCapabilities +#endif + #ifndef XUSER_MAX_COUNT #define XUSER_MAX_COUNT 4 #endif @@ -126,7 +138,7 @@ inline float LinearMapf(float val, float a0, float a1, float b0, float b1) { } static Stick NormalizedDeadzoneFilter(short x, short y, float dz, int idzm, float idz, float st) { - Stick s(x, y, 1.0 / 32767.0f); + Stick s(x, y, 1.0f / 32767.0f); float magnitude = sqrtf(s.x * s.x + s.y * s.y); if (magnitude > dz) { @@ -182,8 +194,8 @@ static Stick NormalizedDeadzoneFilter(short x, short y, float dz, int idzm, floa } bool NormalizedDeadzoneDiffers(short x1, short y1, short x2, short y2, const float dz) { - Stick s1(x1, y1, 1.0 / 32767.0f); - Stick s2(x2, y2, 1.0 / 32767.0f); + Stick s1(x1, y1, 1.0f / 32767.0f); + Stick s2(x2, y2, 1.0f / 32767.0f); float magnitude1 = sqrtf(s1.x * s1.x + s1.y * s1.y); float magnitude2 = sqrtf(s2.x * s2.x + s2.y * s2.y); @@ -201,8 +213,10 @@ bool NormalizedDeadzoneDiffers(u8 x1, u8 x2, const u8 thresh) { } int XinputDevice::UpdateState() { +#if !PPSSPP_PLATFORM(UWP) if (!s_pXInputDLL) return 0; +#endif bool anySuccess = false; for (int i = 0; i < XUSER_MAX_COUNT; i++) { diff --git a/Windows/main.cpp b/Windows/main.cpp index d37b3491e0..bf77d68fcb 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -212,6 +212,10 @@ int System_GetPropertyInt(SystemProperty prop) { return DEVICE_TYPE_DESKTOP; case SYSPROP_DISPLAY_DPI: return ScreenDPI(); + case SYSPROP_HAS_FILE_BROWSER: + return true; + case SYSPROP_HAS_BACK_BUTTON: + return 1; default: return -1; } diff --git a/Windows/stdafx.h b/Windows/stdafx.h index 4bae55eb37..8d896ecfb5 100644 --- a/Windows/stdafx.h +++ b/Windows/stdafx.h @@ -19,16 +19,13 @@ #pragma warning(disable:4996) -// #define WIN32_LEAN_AND_MEAN // WinSock2 MUST be included before !!! #include -//#ifdef WINDOWS - #undef _WIN32_WINNT #if _MSC_VER < 1700 -#define _WIN32_WINNT 0x501 // Compile for XP on Visual Studio 2010 and below +#error You need a newer version of Visual Studio #else #define _WIN32_WINNT 0x600 // Compile for Vista on Visual Studio 2012 and above #endif @@ -41,27 +38,17 @@ #undef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1 -//#define UNICODE #if defined _M_IX86 - #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") - -#elif defined _M_IA64 - -#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") - #elif defined _M_X64 - #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") - #else - #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") - #endif #include "Common/CommonWindows.h" + #include #include #include @@ -76,9 +63,3 @@ #include #include "Common/Log.h" - -//#else - - -//#endif - diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp index 239e687647..8296b1acce 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp @@ -443,6 +443,8 @@ int System_GetPropertyInt(SystemProperty prop) { return (int)(display_hz * 1000.0); case SYSPROP_SUPPORTS_PERMISSIONS: return androidVersion >= 23; // 6.0 Marshmallow introduced run time permissions. + case SYSPROP_HAS_BACK_BUTTON: + return 1; default: return -1; } diff --git a/ext/native/base/NativeApp.h b/ext/native/base/NativeApp.h index c52e1347ed..6de2e92ed2 100644 --- a/ext/native/base/NativeApp.h +++ b/ext/native/base/NativeApp.h @@ -152,6 +152,9 @@ enum SystemProperty { SYSPROP_CLIPBOARD_TEXT, SYSPROP_GPUDRIVER_VERSION, + SYSPROP_HAS_FILE_BROWSER, + SYSPROP_HAS_BACK_BUTTON, + // Available as Int: SYSPROP_SYSTEMVERSION, SYSPROP_DISPLAY_XRES, diff --git a/ext/native/base/PCMain.cpp b/ext/native/base/PCMain.cpp index fa47e7abfc..ad856bf75b 100644 --- a/ext/native/base/PCMain.cpp +++ b/ext/native/base/PCMain.cpp @@ -339,6 +339,8 @@ int System_GetPropertyInt(SystemProperty prop) { #else return DEVICE_TYPE_DESKTOP; #endif + case SYSPROP_HAS_BACK_BUTTON: + return 1; default: return -1; } diff --git a/ext/native/base/QtMain.cpp b/ext/native/base/QtMain.cpp index 10f651e62b..d59e18b251 100644 --- a/ext/native/base/QtMain.cpp +++ b/ext/native/base/QtMain.cpp @@ -77,6 +77,8 @@ int System_GetPropertyInt(SystemProperty prop) { #else return DEVICE_TYPE_DESKTOP; #endif + case SYSPROP_HAS_BACK_BUTTON: + return 1; default: return -1; } diff --git a/ext/native/base/timeutil.cpp b/ext/native/base/timeutil.cpp index 8a8c5065d7..6d10fc62f2 100644 --- a/ext/native/base/timeutil.cpp +++ b/ext/native/base/timeutil.cpp @@ -111,9 +111,7 @@ int time_now_ms() { void sleep_ms(int ms) { #ifdef _WIN32 -#ifndef METRO Sleep(ms); -#endif #else usleep(ms * 1000); #endif diff --git a/ext/native/ext/vjson/json.cpp b/ext/native/ext/vjson/json.cpp index 654c37954d..7203cb577b 100644 --- a/ext/native/ext/vjson/json.cpp +++ b/ext/native/ext/vjson/json.cpp @@ -286,6 +286,8 @@ void json_append(json_value *lhs, json_value *rhs) } } +#undef ERROR + #define ERROR(it, desc)\ *error_pos = it;\ *error_desc = (char *)desc;\ diff --git a/ext/native/file/zip_read.cpp b/ext/native/file/zip_read.cpp index 9174e489de..4f8dc2b82d 100644 --- a/ext/native/file/zip_read.cpp +++ b/ext/native/file/zip_read.cpp @@ -345,7 +345,7 @@ static bool IsLocalPath(const char *path) { uint8_t *VFSReadFile(const char *filename, size_t *size) { if (IsLocalPath(filename)) { // Local path, not VFS. - ILOG("Not a VFS path: %s . Reading local file.", filename); + // ILOG("Not a VFS path: %s . Reading local file.", filename); return ReadLocalFile(filename, size); } @@ -374,7 +374,7 @@ uint8_t *VFSReadFile(const char *filename, size_t *size) { bool VFSGetFileListing(const char *path, std::vector *listing, const char *filter) { if (IsLocalPath(path)) { // Local path, not VFS. - ILOG("Not a VFS path: %s . Reading local directory.", path); + // ILOG("Not a VFS path: %s . Reading local directory.", path); getFilesInDir(path, listing, filter); return true; } @@ -401,7 +401,7 @@ bool VFSGetFileListing(const char *path, std::vector *listing, const c bool VFSGetFileInfo(const char *path, FileInfo *info) { if (IsLocalPath(path)) { // Local path, not VFS. - ILOG("Not a VFS path: %s . Getting local file info.", path); + // ILOG("Not a VFS path: %s . Getting local file info.", path); return getFileInfo(path, info); } diff --git a/ext/native/thin3d/thin3d.h b/ext/native/thin3d/thin3d.h index e45ec9eefc..3722dc4bcd 100644 --- a/ext/native/thin3d/thin3d.h +++ b/ext/native/thin3d/thin3d.h @@ -351,11 +351,16 @@ enum UpdateBufferFlags { }; enum class Event { - // These happen on D3D resize + // These happen on D3D resize. Only the backbuffer needs to be resized. LOST_BACKBUFFER, GOT_BACKBUFFER, + + // These are a bit more serious... + LOST_DEVICE, + GOT_DEVICE, + RESIZED, - PRESENT_REQUESTED, + PRESENTED, }; struct FramebufferDesc { diff --git a/ext/native/thin3d/thin3d_d3d11.cpp b/ext/native/thin3d/thin3d_d3d11.cpp index f8f8ce9346..1043a93fcb 100644 --- a/ext/native/thin3d/thin3d_d3d11.cpp +++ b/ext/native/thin3d/thin3d_d3d11.cpp @@ -302,6 +302,11 @@ void D3D11DrawContext::HandleEvent(Event ev, int width, int height, void *param1 curRTHeight_ = height; break; } + case Event::PRESENTED: + // Make sure that we don't eliminate the next time the render target is set. + curRenderTargetView_ = nullptr; + curDepthStencilView_ = nullptr; + break; } } @@ -1280,6 +1285,7 @@ bool D3D11DrawContext::BlitFramebuffer(Framebuffer *srcfb, int srcX1, int srcY1, // These functions should be self explanatory. void D3D11DrawContext::BindFramebufferAsRenderTarget(Framebuffer *fbo) { + // TODO: deviceContext1 can actually discard. Useful on Windows Mobile. D3D11Framebuffer *fb = (D3D11Framebuffer *)fbo; if (curRenderTargetView_ == fb->colorRTView && curDepthStencilView_ == fb->depthStencilRTView) { return; @@ -1336,4 +1342,4 @@ DrawContext *T3DCreateD3D11Context(ID3D11Device *device, ID3D11DeviceContext *co return new D3D11DrawContext(device, context, device1, context1, featureLevel, hWnd); } -} // namespace Draw \ No newline at end of file +} // namespace Draw diff --git a/ext/native/ui/ui_context.cpp b/ext/native/ui/ui_context.cpp index f287c63f50..c4e0b06c67 100644 --- a/ext/native/ui/ui_context.cpp +++ b/ext/native/ui/ui_context.cpp @@ -1,3 +1,4 @@ +#include "ppsspp_config.h" #include "base/display.h" #include "ui/ui.h" #include "ui/view.h" @@ -27,7 +28,7 @@ void UIContext::Init(Draw::DrawContext *thin3d, Draw::Pipeline *uipipe, Draw::Pi ui_pipeline_notex_ = uipipenotex; uidrawbuffer_ = uidrawbuffer; uidrawbufferTop_ = uidrawbufferTop; -#if defined(_WIN32) || defined(USING_QT_UI) +#if (defined(_WIN32) && !PPSSPP_PLATFORM(UWP)) || defined(USING_QT_UI) textDrawer_ = new TextDrawer(thin3d); #else textDrawer_ = nullptr; diff --git a/ffmpeg b/ffmpeg index 0757f14d86..a2e98d7ba4 160000 --- a/ffmpeg +++ b/ffmpeg @@ -1 +1 @@ -Subproject commit 0757f14d86f1574c02d7f7b9b1c7cd10aad79f75 +Subproject commit a2e98d7ba4c7c5cac08608732c3058cb46e3e0ef diff --git a/ios/main.mm b/ios/main.mm index ceffaceca8..97a99d2d0b 100644 --- a/ios/main.mm +++ b/ios/main.mm @@ -66,6 +66,8 @@ int System_GetPropertyInt(SystemProperty prop) { return 60000; case SYSPROP_DEVICE_TYPE: return DEVICE_TYPE_MOBILE; + case SYSPROP_HAS_BACK_BUTTON: + return 0; default: return -1; } diff --git a/source_assets/image/icon_gold.png b/source_assets/image/icon_gold.png new file mode 100644 index 0000000000..0cd33db631 Binary files /dev/null and b/source_assets/image/icon_gold.png differ diff --git a/source_assets/image/icon_regular.png b/source_assets/image/icon_regular.png new file mode 100644 index 0000000000..676223cd02 Binary files /dev/null and b/source_assets/image/icon_regular.png differ