From 812c1bc941faf0672baa019f947d869cd6c1de1d Mon Sep 17 00:00:00 2001 From: stephena Date: Tue, 20 Jan 2009 21:58:50 +0000 Subject: [PATCH] Updated Win32 project files for recent TIA restructuring. Fixed crash in displaying snapshot images. Strange that I didn't spot that one in Linux. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1649 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/gui/RomInfoWidget.cxx | 7 +++---- stella/src/win32/Stella.vcproj | 16 ++++++++-------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/stella/src/gui/RomInfoWidget.cxx b/stella/src/gui/RomInfoWidget.cxx index ffa985c42..0b1e1e133 100644 --- a/stella/src/gui/RomInfoWidget.cxx +++ b/stella/src/gui/RomInfoWidget.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: RomInfoWidget.cxx,v 1.17 2009-01-16 16:38:06 stephena Exp $ +// $Id: RomInfoWidget.cxx,v 1.18 2009-01-20 21:58:50 stephena Exp $ //============================================================================ #include @@ -289,8 +289,7 @@ bool RomInfoWidget::parseIDATChunk(FBSurface* surface, int width, int height, mySurface->setHeight(sh); // Decompress the image, and scale it correctly - uInt32 ipitch = width * 3 + 1, // bytes per line of the actual PNG image - spitch = sw * 3; // bytes per line of the surface/line + uInt32 ipitch = width * 3 + 1; // bytes per line of the actual PNG image uLongf bufsize = ipitch * height; uInt8* buffer = new uInt8[bufsize]; uInt32* line = new uInt32[ipitch]; @@ -323,7 +322,7 @@ bool RomInfoWidget::parseIDATChunk(FBSurface* surface, int width, int height, // Then fill the surface with those bytes uInt32 ystride = myZoomLevel; while(ystride--) - surface->drawPixels(line, 0, srow++, spitch); + surface->drawPixels(line, 0, srow++, sw); } delete[] buffer; delete[] line; diff --git a/stella/src/win32/Stella.vcproj b/stella/src/win32/Stella.vcproj index 3e387f9b8..daeed5be0 100755 --- a/stella/src/win32/Stella.vcproj +++ b/stella/src/win32/Stella.vcproj @@ -581,10 +581,6 @@ RelativePath="..\emucore\MediaFactory.cxx" > - - @@ -645,6 +641,10 @@ RelativePath="..\emucore\TIASnd.cxx" > + + @@ -1191,10 +1191,6 @@ RelativePath="..\emucore\MediaFactory.hxx" > - - @@ -1263,6 +1259,10 @@ RelativePath="..\emucore\TIASnd.hxx" > + +