mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
Merge pull request #14143 from unknownbrackets/warnings
Fix various Windows warnings found on mingw
This commit is contained in:
43 files changed
+133
-87
No files matched your search
+1
-3
@@ -1912,9 +1912,7 @@ if(USE_MINIUPNPC)
|
||||
endif()
|
||||
if (WIN32)
|
||||
set_source_files_properties(${MINIUPNPC_SOURCES} PROPERTIES COMPILE_DEFINITIONS "MINIUPNP_STATICLIB;MINIUPNP_EXPORTS")
|
||||
find_library(WINSOCK2_LIBRARY NAMES ws2_32 WS2_32 Ws2_32)
|
||||
find_library(IPHLPAPI_LIBRARY NAMES iphlpapi)
|
||||
set(LDLIBS ${WINSOCK2_LIBRARY} ${IPHLPAPI_LIBRARY} ${LDLIBS})
|
||||
set(LDLIBS ws2_32 iphlpapi ${LDLIBS})
|
||||
#elseif (CMAKE_SYSTEM_NAME STREQUAL "Solaris")
|
||||
# find_library (SOCKET_LIBRARY NAMES socket)
|
||||
# find_library (NSL_LIBRARY NAMES nsl)
|
||||
|
||||
+21
-14
@@ -26,6 +26,7 @@
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory.h>
|
||||
#include <set>
|
||||
|
||||
@@ -34,10 +35,9 @@
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/StringUtils.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
#if defined(_WIN32)
|
||||
#include "Common/CommonWindows.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#define _interlockedbittestandset workaround_ms_header_bug_platform_sdk6_set
|
||||
#define _interlockedbittestandreset workaround_ms_header_bug_platform_sdk6_reset
|
||||
#define _interlockedbittestandset64 workaround_ms_header_bug_platform_sdk6_set64
|
||||
@@ -55,21 +55,27 @@ void do_cpuid(u32 regs[4], u32 cpuid_leaf) {
|
||||
__cpuid((int *)regs, cpuid_leaf);
|
||||
}
|
||||
|
||||
#ifdef __MINGW32__
|
||||
static uint64_t do_xgetbv(unsigned int index) {
|
||||
unsigned int eax, edx;
|
||||
// This is xgetbv directly, so we can avoid compilers warning we need runtime checks.
|
||||
asm(".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c"(index));
|
||||
return ((uint64_t)edx << 32) | eax;
|
||||
}
|
||||
#else
|
||||
#define do_xgetbv _xgetbv
|
||||
#endif
|
||||
|
||||
#else // _WIN32
|
||||
|
||||
#ifdef _M_SSE
|
||||
#include <emmintrin.h>
|
||||
|
||||
#define _XCR_XFEATURE_ENABLED_MASK 0
|
||||
static unsigned long long _xgetbv(unsigned int index)
|
||||
{
|
||||
static uint64_t do_xgetbv(unsigned int index) {
|
||||
unsigned int eax, edx;
|
||||
__asm__ __volatile__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(index));
|
||||
return ((unsigned long long)edx << 32) | eax;
|
||||
return ((uint64_t)edx << 32) | eax;
|
||||
}
|
||||
|
||||
#else
|
||||
#define _XCR_XFEATURE_ENABLED_MASK 0
|
||||
#endif // _M_SSE
|
||||
|
||||
#if !defined(MIPS)
|
||||
@@ -98,6 +104,9 @@ void do_cpuid(u32 regs[4], u32 cpuid_leaf)
|
||||
|
||||
#endif // !win32
|
||||
|
||||
#ifndef _XCR_XFEATURE_ENABLED_MASK
|
||||
#define _XCR_XFEATURE_ENABLED_MASK 0
|
||||
#endif
|
||||
|
||||
CPUInfo cpu_info;
|
||||
|
||||
@@ -215,10 +224,8 @@ void CPUInfo::Detect() {
|
||||
// - Is the XSAVE bit set in CPUID? ( >>26)
|
||||
// - Is the OSXSAVE bit set in CPUID? ( >>27)
|
||||
// - XGETBV result has the XCR bit set.
|
||||
if (((cpu_id[2] >> 28) & 1) && ((cpu_id[2] >> 27) & 1) && ((cpu_id[2] >> 26) & 1))
|
||||
{
|
||||
if ((_xgetbv(_XCR_XFEATURE_ENABLED_MASK) & 0x6) == 0x6)
|
||||
{
|
||||
if (((cpu_id[2] >> 28) & 1) && ((cpu_id[2] >> 27) & 1) && ((cpu_id[2] >> 26) & 1)) {
|
||||
if ((do_xgetbv(_XCR_XFEATURE_ENABLED_MASK) & 0x6) == 0x6) {
|
||||
bAVX = true;
|
||||
if ((cpu_id[2] >> 12) & 1)
|
||||
bFMA3 = true;
|
||||
|
||||
@@ -24,7 +24,14 @@
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <unistd.h>
|
||||
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
|
||||
#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
|
||||
#endif
|
||||
#endif
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <memory>
|
||||
|
||||
#include "Common/Log.h"
|
||||
@@ -238,7 +245,7 @@ bool IsDirectory(const std::string &filename)
|
||||
std::wstring copy = ConvertUTF8ToWString(fn);
|
||||
WIN32_FILE_ATTRIBUTE_DATA 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());
|
||||
WARN_LOG(COMMON, "GetFileAttributes failed on %s: %08x", fn.c_str(), (uint32_t)GetLastError());
|
||||
return false;
|
||||
}
|
||||
DWORD result = data.dwFileAttributes;
|
||||
@@ -304,7 +311,7 @@ bool CreateDir(const std::string &path)
|
||||
WARN_LOG(COMMON, "CreateDir: CreateDirectory failed on %s: already exists", path.c_str());
|
||||
return true;
|
||||
}
|
||||
ERROR_LOG(COMMON, "CreateDir: CreateDirectory failed on %s: %i", path.c_str(), error);
|
||||
ERROR_LOG(COMMON, "CreateDir: CreateDirectory failed on %s: %08x", path.c_str(), (uint32_t)error);
|
||||
return false;
|
||||
#else
|
||||
if (mkdir(fn.c_str(), 0755) == 0)
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
#include "Common/Log.h"
|
||||
|
||||
#include <cfloat>
|
||||
#include <D3DCommon.h>
|
||||
#include <D3Dcommon.h>
|
||||
#include <d3d11.h>
|
||||
#include <d3d11_1.h>
|
||||
#include <d3dcompiler.h>
|
||||
#include <D3Dcompiler.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#undef __uuidof
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
void CopyFramebufferImage(Framebuffer *src, int level, int x, int y, int z, Framebuffer *dst, int dstLevel, int dstX, int dstY, int dstZ, int width, int height, int depth, int channelBits, const char *tag) override;
|
||||
bool BlitFramebuffer(Framebuffer *src, int srcX1, int srcY1, int srcX2, int srcY2, Framebuffer *dst, int dstX1, int dstY1, int dstX2, int dstY2, int channelBits, FBBlitFilter filter, const char *tag) override;
|
||||
bool CopyFramebufferToMemorySync(Framebuffer *src, int channelBits, int x, int y, int w, int h, Draw::DataFormat format, void *pixels, int pixelStride, const char *tag);
|
||||
bool CopyFramebufferToMemorySync(Framebuffer *src, int channelBits, int x, int y, int w, int h, Draw::DataFormat format, void *pixels, int pixelStride, const char *tag) override;
|
||||
|
||||
// These functions should be self explanatory.
|
||||
void BindFramebufferAsRenderTarget(Framebuffer *fbo, const RenderPassInfo &rp, const char *tag) override;
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
void Draw(int vertexCount, int offset) override;
|
||||
void DrawIndexed(int vertexCount, int offset) override;
|
||||
void DrawUP(const void *vdata, int vertexCount) override;
|
||||
void Clear(int mask, uint32_t colorval, float depthVal, int stencilVal);
|
||||
void Clear(int mask, uint32_t colorval, float depthVal, int stencilVal) override;
|
||||
|
||||
void BeginFrame() override;
|
||||
|
||||
|
||||
@@ -564,7 +564,7 @@ public:
|
||||
void Draw(int vertexCount, int offset) override;
|
||||
void DrawIndexed(int vertexCount, int offset) override;
|
||||
void DrawUP(const void *vdata, int vertexCount) override;
|
||||
void Clear(int mask, uint32_t colorval, float depthVal, int stencilVal);
|
||||
void Clear(int mask, uint32_t colorval, float depthVal, int stencilVal) override;
|
||||
|
||||
uint64_t GetNativeObject(NativeObject obj) override {
|
||||
switch (obj) {
|
||||
|
||||
@@ -7,12 +7,8 @@
|
||||
// Separated this stuff into its own file so we don't get Windows.h included if all we want is the thin3d declarations.
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#include <d3dcommon.h>
|
||||
#include "Common/CommonWindows.h"
|
||||
#include <D3Dcommon.h>
|
||||
struct IDirect3DDevice9;
|
||||
struct IDirect3D9;
|
||||
struct IDirect3DDevice9Ex;
|
||||
|
||||
+1
-1
@@ -1,6 +1,5 @@
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include <ctime>
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
@@ -18,6 +17,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <ctime>
|
||||
|
||||
static double curtime = 0;
|
||||
|
||||
|
||||
@@ -16,9 +16,13 @@
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <unistd.h>
|
||||
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
|
||||
#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <ctime>
|
||||
#include <thread>
|
||||
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
|
||||
@@ -17,7 +17,15 @@
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <unistd.h>
|
||||
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
|
||||
#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <ctime>
|
||||
#include <limits>
|
||||
|
||||
#include "Common/Data/Text/I18n.h"
|
||||
@@ -41,6 +49,7 @@
|
||||
#ifdef _WIN32
|
||||
#include "Common/CommonWindows.h"
|
||||
#include <sys/stat.h>
|
||||
#undef FILE_OPEN
|
||||
#else
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
@@ -622,7 +631,7 @@ int DirectoryFileSystem::OpenFile(std::string filename, FileAccess access, const
|
||||
err = ReplayApplyDisk(ReplayAction::FILE_OPEN, err, CoreTiming::GetGlobalTimeUs());
|
||||
if (err != 0) {
|
||||
#ifdef _WIN32
|
||||
ERROR_LOG(FILESYS, "DirectoryFileSystem::OpenFile: FAILED, %i - access = %i", GetLastError(), (int)access);
|
||||
ERROR_LOG(FILESYS, "DirectoryFileSystem::OpenFile: FAILED, %i - access = %i", (int)GetLastError(), (int)access);
|
||||
#else
|
||||
ERROR_LOG(FILESYS, "DirectoryFileSystem::OpenFile: FAILED, %i - access = %i", errno, (int)access);
|
||||
#endif
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
#ifdef __MINGW32__
|
||||
#include <unistd.h>
|
||||
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
|
||||
#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
|
||||
#endif
|
||||
#endif
|
||||
#include <ctime>
|
||||
|
||||
#include "Common/File/FileUtil.h"
|
||||
#include "Common/StringUtils.h"
|
||||
@@ -365,7 +372,7 @@ int VirtualDiscFileSystem::OpenFile(std::string filename, FileAccess access, con
|
||||
|
||||
if (!success) {
|
||||
#ifdef _WIN32
|
||||
ERROR_LOG(FILESYS, "VirtualDiscFileSystem::OpenFile: FAILED, %i", GetLastError());
|
||||
ERROR_LOG(FILESYS, "VirtualDiscFileSystem::OpenFile: FAILED, %i", (int)GetLastError());
|
||||
#else
|
||||
ERROR_LOG(FILESYS, "VirtualDiscFileSystem::OpenFile: FAILED");
|
||||
#endif
|
||||
@@ -391,7 +398,7 @@ int VirtualDiscFileSystem::OpenFile(std::string filename, FileAccess access, con
|
||||
|
||||
if (!success) {
|
||||
#ifdef _WIN32
|
||||
ERROR_LOG(FILESYS, "VirtualDiscFileSystem::OpenFile: FAILED, %i - access = %i", GetLastError(), (int)access);
|
||||
ERROR_LOG(FILESYS, "VirtualDiscFileSystem::OpenFile: FAILED, %i - access = %i", (int)GetLastError(), (int)access);
|
||||
#else
|
||||
ERROR_LOG(FILESYS, "VirtualDiscFileSystem::OpenFile: FAILED, access = %i", (int)access);
|
||||
#endif
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
// This bool is the key to having the HD remasters work.
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
// All credit goes to him!
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <WinSock2.h>
|
||||
#include "Common/CommonWindows.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <sys/types.h>
|
||||
// Net stuff
|
||||
#if defined(_WIN32)
|
||||
#include <WinSock2.h>
|
||||
#include <WS2tcpip.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <WinSock2.h>
|
||||
#include "Common/CommonWindows.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/FunctionWrappers.h"
|
||||
#include "Core/HLE/proAdhoc.h"
|
||||
#include "Core/HLE/sceOpenPSID.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include <Core/HLE/proAdhoc.h>
|
||||
|
||||
SceOpenPSID dummyOpenPSID = { 0x10, 0x02, 0xA3, 0x44, 0x13, 0xF5, 0x93, 0xB0, 0xCC, 0x6E, 0xD1, 0x32, 0x27, 0x85, 0x0F, 0x9D };
|
||||
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WIN32_CAMERA
|
||||
#ifndef NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include "Common/CommonWindows.h"
|
||||
#include "Windows/CaptureDevice.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <ctime>
|
||||
|
||||
#include "Common/System/System.h"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WIN32_MICROPHONE
|
||||
#define NOMINMAX
|
||||
#include "Common/CommonWindows.h"
|
||||
#include "Windows/CaptureDevice.h"
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -64,7 +64,7 @@ static bool UpdateInstanceCounter(void (*callback)(volatile InstanceInfo *)) {
|
||||
sizeof(InstanceInfo));
|
||||
|
||||
if (!buf) {
|
||||
ERROR_LOG(SCENET, "Could not map view of file %s (%d).", ID_SHM_NAME, GetLastError());
|
||||
ERROR_LOG(SCENET, "Could not map view of file %s (%08x)", ID_SHM_NAME, (uint32_t)GetLastError());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ void InitInstanceCounter() {
|
||||
|
||||
DWORD lasterr = GetLastError();
|
||||
if (!hIDMapFile) {
|
||||
ERROR_LOG(SCENET, "Could not create %s file mapping object (%d).", ID_SHM_NAME, lasterr);
|
||||
ERROR_LOG(SCENET, "Could not create %s file mapping object (%08x)", ID_SHM_NAME, (uint32_t)lasterr);
|
||||
PPSSPP_ID = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <unistd.h>
|
||||
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
|
||||
#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <vector>
|
||||
|
||||
@@ -940,8 +940,8 @@ FramebufferMatchInfo TextureCacheCommon::MatchFramebuffer(
|
||||
}
|
||||
|
||||
// This is either normal or we failed to generate a shader to depalettize
|
||||
if (framebuffer->format == entry.format || matchingClutFormat) {
|
||||
if (framebuffer->format != entry.format) {
|
||||
if ((int)framebuffer->format == (int)entry.format || matchingClutFormat) {
|
||||
if ((int)framebuffer->format != (int)entry.format) {
|
||||
WARN_LOG_ONCE(diffFormat2, G3D, "Texturing from framebuffer with different formats %s != %s at %08x",
|
||||
GeTextureFormatToString(entry.format), GeBufferFormatToString(framebuffer->format), fb_address);
|
||||
return fbInfo;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#include <d3d11.h>
|
||||
#include <d3dcompiler.h>
|
||||
#include <D3Dcompiler.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
|
||||
@@ -697,7 +697,7 @@ void TextureCacheD3D11::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &
|
||||
size_t bufSize = sizeof(u32) * (mapRowPitch / bpp) * h;
|
||||
mapData = (u32 *)AllocateAlignedMemory(bufSize, 16);
|
||||
if (!mapData) {
|
||||
ERROR_LOG(G3D, "Ran out of RAM trying to allocate a temporary texture upload buffer (alloc size: %d, %dx%d)", bufSize, mapRowPitch / sizeof(u32), h);
|
||||
ERROR_LOG(G3D, "Ran out of RAM trying to allocate a temporary texture upload buffer (alloc size: %lld, %dx%d)", (unsigned long long)bufSize, mapRowPitch / (int)sizeof(u32), h);
|
||||
return;
|
||||
}
|
||||
pixelData = (u32 *)mapData;
|
||||
|
||||
@@ -213,7 +213,7 @@ static const D3DVERTEXELEMENT9 g_FramebufferVertexElements[] = {
|
||||
dxstate.stencilMask.set(0xFF);
|
||||
HRESULT hr = device_->DrawPrimitiveUP(D3DPT_TRIANGLEFAN, 2, coord, 5 * sizeof(float));
|
||||
if (FAILED(hr)) {
|
||||
ERROR_LOG_REPORT(G3D, "DrawActiveTexture() failed: %08x", hr);
|
||||
ERROR_LOG_REPORT(G3D, "DrawActiveTexture() failed: %08x", (uint32_t)hr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ static const D3DVERTEXELEMENT9 g_FramebufferVertexElements[] = {
|
||||
ConvertFromBGRA8888(Memory::GetPointer(fb_address + dstByteOffset), (u8 *)locked.pBits, vfb->fb_stride, locked.Pitch / 4, w, h, vfb->format);
|
||||
offscreen->UnlockRect();
|
||||
} else {
|
||||
ERROR_LOG_REPORT(G3D, "Unable to lock rect from %08x: %d,%d %dx%d of %dx%d", fb_address, rect.left, rect.top, rect.right, rect.bottom, vfb->renderWidth, vfb->renderHeight);
|
||||
ERROR_LOG_REPORT(G3D, "Unable to lock rect from %08x: %d,%d %dx%d of %dx%d", fb_address, (int)rect.left, (int)rect.top, (int)rect.right, (int)rect.bottom, vfb->renderWidth, vfb->renderHeight);
|
||||
}
|
||||
} else {
|
||||
ERROR_LOG_REPORT(G3D, "Unable to download render target data from %08x", fb_address);
|
||||
@@ -428,7 +428,7 @@ static const D3DVERTEXELEMENT9 g_FramebufferVertexElements[] = {
|
||||
|
||||
tex->UnlockRect(0);
|
||||
} else {
|
||||
ERROR_LOG_REPORT(G3D, "Unable to lock rect from depth %08x: %d,%d %dx%d of %dx%d", vfb->fb_address, rect.left, rect.top, rect.right, rect.bottom, vfb->renderWidth, vfb->renderHeight);
|
||||
ERROR_LOG_REPORT(G3D, "Unable to lock rect from depth %08x: %d,%d %dx%d of %dx%d", vfb->fb_address, (int)rect.left, (int)rect.top, (int)rect.right, (int)rect.bottom, vfb->renderWidth, vfb->renderHeight);
|
||||
}
|
||||
} else {
|
||||
ERROR_LOG_REPORT(G3D, "Unable to download render target depth from %08x", vfb->fb_address);
|
||||
|
||||
@@ -44,13 +44,13 @@ public:
|
||||
void SetDrawEngine(DrawEngineDX9 *td);
|
||||
void DrawActiveTexture(float x, float y, float w, float h, float destW, float destH, float u0, float v0, float u1, float v1, int uvRotation, int flags) override;
|
||||
|
||||
void DestroyAllFBOs();
|
||||
void DestroyAllFBOs() override;
|
||||
|
||||
void EndFrame();
|
||||
|
||||
virtual bool NotifyStencilUpload(u32 addr, int size, StencilUpload flags = StencilUpload::NEEDS_CLEAR) override;
|
||||
|
||||
bool GetFramebuffer(u32 fb_address, int fb_stride, GEBufferFormat format, GPUDebugBuffer &buffer, int maxRes);
|
||||
bool GetFramebuffer(u32 fb_address, int fb_stride, GEBufferFormat format, GPUDebugBuffer &buffer, int maxRes) override;
|
||||
bool GetDepthbuffer(u32 fb_address, int fb_stride, u32 z_address, int z_stride, GPUDebugBuffer &buffer) override;
|
||||
bool GetStencilbuffer(u32 fb_address, int fb_stride, GPUDebugBuffer &buffer) override;
|
||||
bool GetOutputFramebuffer(GPUDebugBuffer &buffer) override;
|
||||
|
||||
@@ -244,7 +244,7 @@ bool FramebufferManagerDX9::NotifyStencilUpload(u32 addr, int size, StencilUploa
|
||||
}
|
||||
HRESULT hr = device_->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, coord, 5 * sizeof(float));
|
||||
if (FAILED(hr)) {
|
||||
ERROR_LOG_REPORT(G3D, "Failed to draw stencil bit %x: %08x", i, hr);
|
||||
ERROR_LOG_REPORT(G3D, "Failed to draw stencil bit %x: %08x", i, (uint32_t)hr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -315,7 +315,7 @@ public:
|
||||
device_->SetViewport(&vp);
|
||||
HRESULT hr = device_->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, verts_, (3 + 2) * sizeof(float));
|
||||
if (FAILED(hr)) {
|
||||
ERROR_LOG_REPORT(G3D, "Depal render failed: %08x", hr);
|
||||
ERROR_LOG_REPORT(G3D, "Depal render failed: %08x", (uint32_t)hr);
|
||||
}
|
||||
|
||||
dxstate.Restore();
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
#include "WindowsAudio.h"
|
||||
#include <mmreg.h>
|
||||
#include <dsound.h>
|
||||
|
||||
struct IDirectSound8;
|
||||
struct IDirectSoundBuffer;
|
||||
|
||||
class DSoundAudioBackend : public WindowsAudioBackend {
|
||||
public:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "Core/Config.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Windows/Resource.h"
|
||||
#include "Windows/resource.h"
|
||||
#include "Windows/InputBox.h"
|
||||
|
||||
#include "Core/Debugger/Breakpoints.h"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "Windows/W32Util/DialogManager.h"
|
||||
#include "Windows/W32Util/TabControl.h"
|
||||
#include "Windows/Debugger/CtrlDisasmView.h"
|
||||
#include "Windows/Debugger/CtrlDisAsmView.h"
|
||||
#include "Windows/Debugger/Debugger_Lists.h"
|
||||
#include "Windows/Debugger/CPURegsInterface.h"
|
||||
#include "Core/MIPS/MIPSDebugInterface.h"
|
||||
|
||||
@@ -32,23 +32,23 @@ CVFPUDlg::CVFPUDlg(HINSTANCE _hInstance, HWND _hParent, DebugInterface *cpu_) :
|
||||
ZeroMemory (&tcItem,sizeof (tcItem));
|
||||
tcItem.mask = TCIF_TEXT;
|
||||
tcItem.dwState = 0;
|
||||
tcItem.pszText = L"Float";
|
||||
tcItem.pszText = (LPTSTR)L"Float";
|
||||
tcItem.cchTextMax = (int)wcslen(tcItem.pszText)+1;
|
||||
tcItem.iImage = 0;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
tcItem.pszText = L"HalfFloat";
|
||||
tcItem.pszText = (LPTSTR)L"HalfFloat";
|
||||
tcItem.cchTextMax = (int)wcslen(tcItem.pszText)+1;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
tcItem.pszText = L"Hex";
|
||||
tcItem.pszText = (LPTSTR)L"Hex";
|
||||
tcItem.cchTextMax = (int)wcslen(tcItem.pszText)+1;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
tcItem.pszText = L"Bytes";
|
||||
tcItem.pszText = (LPTSTR)L"Bytes";
|
||||
tcItem.cchTextMax = (int)wcslen(tcItem.pszText)+1;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
tcItem.pszText = L"Shorts";
|
||||
tcItem.pszText = (LPTSTR)L"Shorts";
|
||||
tcItem.cchTextMax = (int)wcslen(tcItem.pszText)+1;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
tcItem.pszText = L"Ints";
|
||||
tcItem.pszText = (LPTSTR)L"Ints";
|
||||
tcItem.cchTextMax = (int)wcslen(tcItem.pszText)+1;
|
||||
TabCtrl_InsertItem(tabs, TabCtrl_GetItemCount(tabs),&tcItem);
|
||||
mode=0;
|
||||
|
||||
@@ -19,15 +19,15 @@
|
||||
#include <limits.h>
|
||||
#include <algorithm>
|
||||
#include <mmsystem.h>
|
||||
#include <XInput.h>
|
||||
|
||||
#include "Core/HLE/sceCtrl.h"
|
||||
#include "DinputDevice.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Common/Input/InputState.h"
|
||||
#include "Common/System/NativeApp.h"
|
||||
#include "Common/Input/KeyCodes.h"
|
||||
#include "Common/System/NativeApp.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Core/HLE/sceCtrl.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Xinput.h"
|
||||
#include "Windows/DinputDevice.h"
|
||||
#pragma comment(lib,"dinput8.lib")
|
||||
|
||||
#ifdef min
|
||||
|
||||
@@ -202,7 +202,7 @@ void MainThreadFunc() {
|
||||
std::string full_error = StringFromFormat("%s\n\n%s", genericError, error_string.c_str());
|
||||
std::wstring title = ConvertUTF8ToWString(err->T("GenericGraphicsError", "Graphics Error"));
|
||||
bool yes = IDYES == MessageBox(0, ConvertUTF8ToWString(full_error).c_str(), title.c_str(), MB_ICONERROR | MB_YESNO);
|
||||
ERROR_LOG(BOOT, full_error.c_str());
|
||||
ERROR_LOG(BOOT, "%s", full_error.c_str());
|
||||
|
||||
if (yes) {
|
||||
// Change the config to the alternative and restart.
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#include <algorithm>
|
||||
#include <tchar.h>
|
||||
#include "Common/System/Display.h"
|
||||
#include "Windows/GEDebugger/CtrlDisplayListView.h"
|
||||
#include "Windows/GEDebugger/GEDebugger.h"
|
||||
#include "Windows/InputBox.h"
|
||||
#include "Windows/Main.h"
|
||||
#include "Windows/main.h"
|
||||
#include "Core/Config.h"
|
||||
#include "GPU/Debugger/Breakpoints.h"
|
||||
#include "GPU/GPUState.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
const PTCHAR CtrlDisplayListView::windowClass = _T("CtrlDisplayListView");
|
||||
LPCTSTR CtrlDisplayListView::windowClass = _T("CtrlDisplayListView");
|
||||
|
||||
const int POPUP_SUBMENU_ID_DISPLAYLISTVIEW = 8;
|
||||
extern HMENU g_hPopupMenus;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include "Common/CommonWindows.h"
|
||||
#include "GPU/Common/GPUDebugInterface.h"
|
||||
#include <algorithm>
|
||||
|
||||
class CtrlDisplayListView
|
||||
{
|
||||
HWND wnd;
|
||||
RECT rect;
|
||||
static const PTCHAR windowClass;
|
||||
static LPCTSTR windowClass;
|
||||
DisplayList list;
|
||||
|
||||
HFONT font;
|
||||
@@ -85,4 +85,4 @@ public:
|
||||
|
||||
void scrollAddressIntoView();
|
||||
bool curAddressIsVisible();
|
||||
};
|
||||
};
|
||||
@@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include <cmath>
|
||||
#include <functional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
@@ -109,7 +109,7 @@ void SimpleGLWindow::SetupGL() {
|
||||
pfd.cDepthBits = 16;
|
||||
pfd.iLayerType = PFD_MAIN_PLANE;
|
||||
|
||||
#define ENFORCE(x, msg) { if (!(x)) { ERROR_LOG(COMMON, "SimpleGLWindow: %s (%08x)", msg, GetLastError()); return; } }
|
||||
#define ENFORCE(x, msg) { if (!(x)) { ERROR_LOG(COMMON, "SimpleGLWindow: %s (%08x)", msg, (uint32_t)GetLastError()); return; } }
|
||||
|
||||
ENFORCE(hDC_ = GetDC(hWnd_), "Unable to create DC.");
|
||||
ENFORCE(pixelFormat = ChoosePixelFormat(hDC_, &pfd), "Unable to match pixel format.");
|
||||
|
||||
@@ -108,7 +108,7 @@ bool D3D9Context::Init(HINSTANCE hInst, HWND wnd, std::string *error_message) {
|
||||
}
|
||||
|
||||
if (FAILED(d3d_->GetDeviceCaps(adapterId_, D3DDEVTYPE_HAL, &d3dCaps))) {
|
||||
*error_message = "GetDeviceCaps failed (???)";
|
||||
*error_message = "GetDeviceCaps failed (?)";
|
||||
d3d_->Release();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
void Resize() override;
|
||||
void Poll() override;
|
||||
|
||||
void *GetAPIContext();
|
||||
void *GetAPIContext() override;
|
||||
|
||||
Draw::DrawContext *GetDrawContext() override { return draw_; }
|
||||
private:
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
|
||||
class InputDevice {
|
||||
public:
|
||||
virtual ~InputDevice() {
|
||||
}
|
||||
|
||||
enum { UPDATESTATE_SKIP_PAD = 0x1234};
|
||||
virtual int UpdateState() = 0;
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
// Callback methods for device-event notifications.
|
||||
|
||||
HRESULT STDMETHODCALLTYPE OnDefaultDeviceChanged(EDataFlow flow, ERole role, LPCWSTR pwstrDeviceId) {
|
||||
HRESULT STDMETHODCALLTYPE OnDefaultDeviceChanged(EDataFlow flow, ERole role, LPCWSTR pwstrDeviceId) override {
|
||||
std::lock_guard<std::mutex> guard(lock_);
|
||||
|
||||
if (flow != eRender || role != eMultimedia) {
|
||||
@@ -109,30 +109,30 @@ public:
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE OnDeviceAdded(LPCWSTR pwstrDeviceId) {
|
||||
HRESULT STDMETHODCALLTYPE OnDeviceAdded(LPCWSTR pwstrDeviceId) override {
|
||||
// Ignore.
|
||||
return S_OK;
|
||||
};
|
||||
|
||||
HRESULT STDMETHODCALLTYPE OnDeviceRemoved(LPCWSTR pwstrDeviceId) {
|
||||
HRESULT STDMETHODCALLTYPE OnDeviceRemoved(LPCWSTR pwstrDeviceId) override {
|
||||
// Ignore.
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE OnDeviceStateChanged(LPCWSTR pwstrDeviceId, DWORD dwNewState) {
|
||||
HRESULT STDMETHODCALLTYPE OnDeviceStateChanged(LPCWSTR pwstrDeviceId, DWORD dwNewState) override {
|
||||
// Ignore.
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE OnPropertyValueChanged(LPCWSTR pwstrDeviceId, const PROPERTYKEY key) {
|
||||
HRESULT STDMETHODCALLTYPE OnPropertyValueChanged(LPCWSTR pwstrDeviceId, const PROPERTYKEY key) override {
|
||||
INFO_LOG(SCEAUDIO, "Changed audio device property "
|
||||
"{%8.8x-%4.4x-%4.4x-%2.2x%2.2x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x}#%d",
|
||||
key.fmtid.Data1, key.fmtid.Data2, key.fmtid.Data3,
|
||||
(uint32_t)key.fmtid.Data1, key.fmtid.Data2, key.fmtid.Data3,
|
||||
key.fmtid.Data4[0], key.fmtid.Data4[1],
|
||||
key.fmtid.Data4[2], key.fmtid.Data4[3],
|
||||
key.fmtid.Data4[4], key.fmtid.Data4[5],
|
||||
key.fmtid.Data4[6], key.fmtid.Data4[7],
|
||||
key.pid);
|
||||
(int)key.pid);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
// For shell links
|
||||
#include "windows.h"
|
||||
#include "Common/CommonWindows.h"
|
||||
#include "winnls.h"
|
||||
#include "shobjidl.h"
|
||||
#include "objbase.h"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "InputDevice.h"
|
||||
#include "Xinput.h"
|
||||
#include <XInput.h>
|
||||
#include "Core/HLE/sceCtrl.h"
|
||||
#include "Windows/InputDevice.h"
|
||||
|
||||
class XinputDevice final : public InputDevice {
|
||||
public:
|
||||
|
||||
Reference in new issue
Block a user