mirror of https://github.com/stella-emu/stella.git
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
This commit is contained in:
parent
4409e55894
commit
ad83d21a69
|
@ -45,7 +45,7 @@ bool PNGLibrary::readImage(const FrameBuffer& fb, FBSurface& surface)
|
||||||
png_uint_32 iwidth, iheight, ipitch;
|
png_uint_32 iwidth, iheight, ipitch;
|
||||||
uInt8* buffer = NULL;
|
uInt8* buffer = NULL;
|
||||||
int bit_depth, color_type, interlace_type;
|
int bit_depth, color_type, interlace_type;
|
||||||
string err_message;
|
const char* err_message;
|
||||||
|
|
||||||
ifstream* in = new ifstream(myFilename.c_str(), ios_base::binary);
|
ifstream* in = new ifstream(myFilename.c_str(), ios_base::binary);
|
||||||
if(!in || !in->is_open())
|
if(!in || !in->is_open())
|
||||||
|
@ -118,7 +118,7 @@ error:
|
||||||
in->close();
|
in->close();
|
||||||
delete[] buffer;
|
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
|
// but since Stella only generates snapshots at up to 10x, we should
|
||||||
// be fine for a while ...
|
// be fine for a while ...
|
||||||
uInt32 izoom = uInt32(ceil(iwidth/320.0)),
|
uInt32 izoom = uInt32(ceil(iwidth/320.0)),
|
||||||
szoom = surface.getWidth()/320.0;
|
szoom = surface.getWidth()/320;
|
||||||
|
|
||||||
// Set the surface size
|
// Set the surface size
|
||||||
uInt32 sw = iwidth / izoom * szoom,
|
uInt32 sw = iwidth / izoom * szoom,
|
||||||
|
|
Loading…
Reference in New Issue