diff --git a/GPU/Common/DepalettizeShaderCommon.cpp b/GPU/Common/DepalettizeShaderCommon.cpp index 29f68ce078..6b6125cf1d 100644 --- a/GPU/Common/DepalettizeShaderCommon.cpp +++ b/GPU/Common/DepalettizeShaderCommon.cpp @@ -15,15 +15,17 @@ // Official git repository and contact information can be found at // https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. -#include +#include +#include "gfx_es2/gpu_features.h" + +#include "GPU/Common/ShaderId.h" +#include "GPU/Common/ShaderCommon.h" #include "Common/Log.h" #include "Core/Reporting.h" #include "GPU/GPUState.h" -#include "ext/native/gfx/GLStateCache.h" #include "GPU/Common/DepalettizeShaderCommon.h" - #define WRITE p+=sprintf // TODO: Add a compute shader path. Complete waste of time to set up a graphics state. diff --git a/GPU/Common/GPUStateUtils.h b/GPU/Common/GPUStateUtils.h index efde683459..e6b231d8e1 100644 --- a/GPU/Common/GPUStateUtils.h +++ b/GPU/Common/GPUStateUtils.h @@ -1,5 +1,7 @@ #pragma once +#include "Common/CommonTypes.h" + #include "GPU/ge_constants.h" // TODO: Replace enums and structs with same from thin3d.h, for convenient mapping. diff --git a/GPU/Common/SplineCommon.cpp b/GPU/Common/SplineCommon.cpp index 2da30a2031..f9fae37606 100644 --- a/GPU/Common/SplineCommon.cpp +++ b/GPU/Common/SplineCommon.cpp @@ -1023,7 +1023,7 @@ void DrawEngineCommon::SubmitBezier(const void *control_points, const void *indi // Bezier patches share less control points than spline patches. Otherwise they are pretty much the same (except bezier don't support the open/close thing) int num_patches_u = (count_u - 1) / 3; int num_patches_v = (count_v - 1) / 3; - BezierPatch *patches; + BezierPatch *patches = nullptr; if (g_Config.bHardwareTessellation && g_Config.bHardwareTransform && !g_Config.bSoftwareRendering) { for (int idx = 0; idx < count_u * count_v; idx++) { SimpleVertex *point = simplified_control_points + (indices ? idxConv.convert(idx) : idx); diff --git a/GPU/D3D11/StencilBufferD3D11.cpp b/GPU/D3D11/StencilBufferD3D11.cpp index e585dd4792..59998c8842 100644 --- a/GPU/D3D11/StencilBufferD3D11.cpp +++ b/GPU/D3D11/StencilBufferD3D11.cpp @@ -19,7 +19,6 @@ #include "base/logging.h" -#include "gfx/d3d9_state.h" #include "ext/native/thin3d/thin3d.h" #include "Core/Reporting.h" #include "GPU/D3D11/FramebufferManagerD3D11.h" diff --git a/GPU/Directx9/PixelShaderGeneratorDX9.cpp b/GPU/Directx9/PixelShaderGeneratorDX9.cpp index a90bfa3872..c5a1b81952 100644 --- a/GPU/Directx9/PixelShaderGeneratorDX9.cpp +++ b/GPU/Directx9/PixelShaderGeneratorDX9.cpp @@ -19,7 +19,6 @@ #include "Core/Reporting.h" #include "Core/Config.h" -#include "gfx/d3d9_shader.h" #include "GPU/Directx9/PixelShaderGeneratorDX9.h" #include "GPU/ge_constants.h" #include "GPU/Common/GPUStateUtils.h" diff --git a/ext/native/base/timeutil.cpp b/ext/native/base/timeutil.cpp index f1f7d6d30a..8a8c5065d7 100644 --- a/ext/native/base/timeutil.cpp +++ b/ext/native/base/timeutil.cpp @@ -1,18 +1,17 @@ +#include + #include "base/basictypes.h" #include "base/logging.h" #include "base/timeutil.h" -// For NV time functions. Ugly! -#include "gfx/gl_common.h" -#include "gfx_es2/gpu_features.h" - #ifdef _WIN32 #include #else +#include "gfx/gl_common.h" +#include "gfx_es2/gpu_features.h" #include #include #endif -#include static double curtime = 0; static float curtime_f = 0; diff --git a/ext/native/file/file_util.cpp b/ext/native/file/file_util.cpp index 58b75fab28..ea5dcdc8bc 100644 --- a/ext/native/file/file_util.cpp +++ b/ext/native/file/file_util.cpp @@ -1,3 +1,5 @@ +#include "ppsspp_config.h" + #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include @@ -215,12 +217,7 @@ size_t getFilesInDir(const char *directory, std::vector *files, const #ifdef _WIN32 // Find the first file in the directory. WIN32_FIND_DATA ffd; -#ifdef UNICODE - - HANDLE hFind = FindFirstFile((ConvertUTF8ToWString(directory) + L"\\*").c_str(), &ffd); -#else - HANDLE hFind = FindFirstFile((std::string(directory) + "\\*").c_str(), &ffd); -#endif + HANDLE hFind = FindFirstFileEx((ConvertUTF8ToWString(directory) + L"\\*").c_str(), FindExInfoStandard, &ffd, FindExSearchNameMatch, NULL, 0); if (hFind == INVALID_HANDLE_VALUE) { FindClose(hFind); return 0; @@ -296,6 +293,9 @@ size_t getFilesInDir(const char *directory, std::vector *files, const // Returns a vector with the device names std::vector getWindowsDrives() { +#if PPSSPP_PLATFORM(UWP) + return std::vector(); // TODO UWP http://stackoverflow.com/questions/37404405/how-to-get-logical-drives-names-in-windows-10 +#else std::vector drives; const DWORD buffsize = GetLogicalDriveStrings(0, NULL); @@ -315,5 +315,6 @@ std::vector getWindowsDrives() } } return drives; +#endif } #endif diff --git a/ext/native/gfx_es2/draw_buffer.cpp b/ext/native/gfx_es2/draw_buffer.cpp index 7cbf5d9ba0..594cf7eb5e 100644 --- a/ext/native/gfx_es2/draw_buffer.cpp +++ b/ext/native/gfx_es2/draw_buffer.cpp @@ -9,10 +9,8 @@ #include "math/math_util.h" #include "gfx/texture_atlas.h" #include "gfx/gl_debug_log.h" -#include "gfx/gl_common.h" #include "gfx_es2/draw_buffer.h" #include "gfx_es2/draw_text.h" -#include "gfx_es2/glsl_program.h" #include "util/text/utf8.h" #include "util/text/wrap_text.h" diff --git a/ext/native/gfx_es2/gpu_features.cpp b/ext/native/gfx_es2/gpu_features.cpp index f020e1a422..ca4e48faff 100644 --- a/ext/native/gfx_es2/gpu_features.cpp +++ b/ext/native/gfx_es2/gpu_features.cpp @@ -5,7 +5,7 @@ #include "gfx/gl_common.h" #include "gfx_es2/gpu_features.h" -#ifdef _WIN32 +#if defined(_WIN32) #include "GL/wglew.h" #endif diff --git a/ext/native/thin3d/thin3d_d3d11.cpp b/ext/native/thin3d/thin3d_d3d11.cpp index f44961f9ce..596a49338b 100644 --- a/ext/native/thin3d/thin3d_d3d11.cpp +++ b/ext/native/thin3d/thin3d_d3d11.cpp @@ -1,3 +1,5 @@ +#include "ppsspp_config.h" + #include "thin3d/thin3d.h" #include "thin3d/d3d11_loader.h" #include "math/dataconv.h" @@ -168,10 +170,16 @@ private: }; static void GetRes(HWND hWnd, int &xres, int &yres) { +#if PPSSPP_PLATFORM(UWP) + // TEMPORARY TODO UWP + xres = 1024; + yres = 768; +#else RECT rc; GetClientRect(hWnd, &rc); xres = rc.right - rc.left; yres = rc.bottom - rc.top; +#endif } D3D11DrawContext::D3D11DrawContext(ID3D11Device *device, ID3D11DeviceContext *deviceContext, ID3D11Device1 *device1, ID3D11DeviceContext1 *deviceContext1, HWND hWnd)