gsdx:windows: Fix screenshot/GS dump path issues

Fixes an issue with screenshots/GS dumps not saving if the path contains
characters not present in the current codepage.
This commit is contained in:
Jonathan Li 2018-07-14 00:56:49 +01:00
parent c9dbd4118b
commit 286e7293fa
4 changed files with 4 additions and 3 deletions

View File

@ -26,7 +26,7 @@ GSDumpBase::GSDumpBase(const std::string& fn)
: m_frames(0) : m_frames(0)
, m_extra_frames(2) , m_extra_frames(2)
{ {
m_gs = fopen(fn.c_str(), "wb"); m_gs = px_fopen(fn, "wb");
if (!m_gs) if (!m_gs)
fprintf(stderr, "GSDump: Error failed to open %s\n", fn.c_str()); fprintf(stderr, "GSDump: Error failed to open %s\n", fn.c_str());
} }

View File

@ -52,7 +52,7 @@ namespace GSPng {
const int offset = first_image ? 0 : pixel[fmt].bytes_per_pixel_out; const int offset = first_image ? 0 : pixel[fmt].bytes_per_pixel_out;
const int bytes_per_pixel_out = first_image ? pixel[fmt].bytes_per_pixel_out : bytes_per_pixel_in - offset; const int bytes_per_pixel_out = first_image ? pixel[fmt].bytes_per_pixel_out : bytes_per_pixel_in - offset;
FILE *fp = fopen(file.c_str(), "wb"); FILE *fp = px_fopen(file, "wb");
if (fp == nullptr) if (fp == nullptr)
return false; return false;

View File

@ -51,6 +51,7 @@
#endif #endif
#include <PluginCompatibility.h>
#ifdef ENABLE_OPENCL #ifdef ENABLE_OPENCL

View File

@ -13,7 +13,7 @@
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4456;4458;4996;4995;4324;4100;4101;4201;4556;4127;4512;%(DisableSpecificWarnings)</DisableSpecificWarnings> <DisableSpecificWarnings>4456;4458;4996;4995;4324;4100;4101;4201;4556;4127;4512;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(VTUNE_AMPLIFIER_XE_2015_DIR)include;$(ProjectDir);$(SolutionDir)3rdparty\baseclasses;$(SolutionDir)3rdparty;$(SolutionDir)3rdparty\freetype\include;$(SolutionDir)3rdparty\libpng;$(SolutionDir)3rdparty\opencl;$(SolutionDir)3rdparty\xz\xz\src\liblzma\api;$(SolutionDir)3rdparty\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(VTUNE_AMPLIFIER_XE_2015_DIR)include;$(ProjectDir);$(SolutionDir)common\include;$(SolutionDir)3rdparty\baseclasses;$(SolutionDir)3rdparty;$(SolutionDir)3rdparty\freetype\include;$(SolutionDir)3rdparty\libpng;$(SolutionDir)3rdparty\opencl;$(SolutionDir)3rdparty\xz\xz\src\liblzma\api;$(SolutionDir)3rdparty\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile> </ClCompile>