Updated VS project file for recent patch from SpiceWare, and fixed some minor compile errors for VS 2013.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2924 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2014-06-13 22:43:54 +00:00
parent 815e0b2d33
commit f7254488dc
3 changed files with 16 additions and 4 deletions

View File

@ -139,7 +139,7 @@ void PNGLibrary::saveImage(const string& filename, const Properties& props)
const GUI::Rect& imageR = myFB.imageRect();
png_uint_32 width = imageR.width(), height = imageR.height();
png_bytep image = new png_byte[width * height * 4];
png_bytep row_pointers[height];
png_bytep* row_pointers = new png_bytep[height];
ofstream out(filename.c_str(), ios_base::binary);
if(!out.is_open())
@ -187,7 +187,7 @@ void PNGLibrary::saveImage(const string& filename, const Properties& props)
// Set up pointers into "image" byte array
for(png_uint_32 k = 0; k < height; ++k)
row_pointers[k] = image + k*width*4;
row_pointers[k] = (png_bytep) (image + k*width*4);
// Write the entire image in one go
png_write_image(png_ptr, row_pointers);
@ -201,6 +201,8 @@ done:
png_destroy_write_struct(&png_ptr, &info_ptr);
if(image)
delete[] image;
if (row_pointers)
delete[] row_pointers;
if(err_message)
throw err_message;
}
@ -216,7 +218,7 @@ void PNGLibrary::saveImage(const string& filename, const TIA& tia,
const char* err_message = NULL;
png_uint_32 tiaw = tia.width(), width = tiaw*2, height = tia.height();
png_bytep image = new png_byte[width * height * 3];
png_bytep row_pointers[height];
png_bytep* row_pointers = new png_bytep[height];
uInt8 r, g, b;
uInt8* buf_ptr = image;
@ -279,7 +281,9 @@ done:
png_destroy_write_struct(&png_ptr, &info_ptr);
if(image)
delete[] image;
if(err_message)
if (row_pointers)
delete[] row_pointers;
if (err_message)
throw err_message;
}

View File

@ -261,6 +261,7 @@
<ClCompile Include="..\debugger\gui\CartFAWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartFEWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartMCWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartRamWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartSBWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartUAWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartX07Widget.cxx" />
@ -512,6 +513,7 @@
<ClInclude Include="..\debugger\gui\CartFAWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartFEWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartMCWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartRamWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartSBWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartUAWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartX07Widget.hxx" />

View File

@ -759,6 +759,9 @@
<ClCompile Include="..\emucore\CartDASH.cxx">
<Filter>Source Files\emucore</Filter>
</ClCompile>
<ClCompile Include="..\debugger\gui\CartRamWidget.cxx">
<Filter>Source Files\debugger</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\common\Array.hxx">
@ -1532,6 +1535,9 @@
<ClInclude Include="..\emucore\CartDASH.hxx">
<Filter>Header Files\emucore</Filter>
</ClInclude>
<ClInclude Include="..\debugger\gui\CartRamWidget.hxx">
<Filter>Header Files\debugger</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="stella.ico">