Fix nanojpeg in Visual Studio.

This commit is contained in:
Stephen Anthony 2022-08-16 21:57:57 -02:30
parent f5d6760f0d
commit 6e4710750f
4 changed files with 2 additions and 9 deletions

View File

@ -43,7 +43,7 @@ void JPGLibrary::loadImage(const string& filename, FBSurface& surface,
std::ifstream in(filename, std::ios_base::binary | std::ios::ate);
if(!in.is_open())
loadImageERROR("No image found");
size_t size = in.tellg();
const size_t size = in.tellg();
in.clear();
in.seekg(0);

View File

@ -37,6 +37,7 @@
#pragma GCC diagnostic pop
#elif defined(BSPF_WINDOWS)
#pragma warning(push, 0)
#pragma warning(disable : 4706)
#include "nanojpeg.c"
#pragma warning(pop)
#else

View File

@ -939,7 +939,6 @@
<ClCompile Include="..\gui\ToolTip.cxx" />
<ClCompile Include="..\gui\UndoHandler.cxx" />
<ClCompile Include="..\gui\WhatsNewDialog.cxx" />
<ClCompile Include="..\nanojpeg\nanojpeg.c" />
<ClCompile Include="..\sqlite\source\sqlite3.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|Win32'">CompileAsC</CompileAs>
@ -2170,7 +2169,6 @@
<ClInclude Include="..\libpng\pnginfo.h" />
<ClInclude Include="..\libpng\pnglibconf.h" />
<ClInclude Include="..\libpng\pngstruct.h" />
<ClInclude Include="..\nanojpeg\nanojpeg.h" />
<ClInclude Include="..\nanojpeg\nanojpeg_lib.hxx" />
<ClInclude Include="..\sqlite\source\sqlite3.h" />
<ClInclude Include="..\sqlite\sqlite3.h" />

View File

@ -1155,9 +1155,6 @@
<ClCompile Include="..\common\JPGLibrary.cxx">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\nanojpeg\nanojpeg.c">
<Filter>Header Files\nanojpeg</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\common\bspf.hxx">
@ -2393,9 +2390,6 @@
<ClInclude Include="..\nanojpeg\nanojpeg_lib.hxx">
<Filter>Header Files\nanojpeg</Filter>
</ClInclude>
<ClInclude Include="..\nanojpeg\nanojpeg.h">
<Filter>Header Files\nanojpeg</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="stella.ico">