From ad83d21a69f320f59ab421788d98c0d6d3868ac1 Mon Sep 17 00:00:00 2001 From: stephena Date: Tue, 15 Jun 2010 18:49:25 +0000 Subject: [PATCH] Fixed issue in Windows; PNG messages thrown from the exception handler weren't being handled correctly. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2053 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/common/PNGLibrary.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/PNGLibrary.cxx b/src/common/PNGLibrary.cxx index 5da26df03..884741e5c 100644 --- a/src/common/PNGLibrary.cxx +++ b/src/common/PNGLibrary.cxx @@ -45,7 +45,7 @@ bool PNGLibrary::readImage(const FrameBuffer& fb, FBSurface& surface) png_uint_32 iwidth, iheight, ipitch; uInt8* buffer = NULL; int bit_depth, color_type, interlace_type; - string err_message; + const char* err_message; ifstream* in = new ifstream(myFilename.c_str(), ios_base::binary); if(!in || !in->is_open()) @@ -118,7 +118,7 @@ error: in->close(); delete[] buffer; - throw err_message.c_str(); + throw err_message; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -134,7 +134,7 @@ void PNGLibrary::scaleImagetoSurface(uInt32 iwidth, uInt32 iheight, uInt8* buffe // but since Stella only generates snapshots at up to 10x, we should // be fine for a while ... uInt32 izoom = uInt32(ceil(iwidth/320.0)), - szoom = surface.getWidth()/320.0; + szoom = surface.getWidth()/320; // Set the surface size uInt32 sw = iwidth / izoom * szoom,