Temporary fix for #65.
It looks like that when we use the `Simple` output module, we get weird errors when trying to load state for any game, most likely due to memory corruption. AFAIK, it seems the frame buffer is not large enough to render all components. This issues does not appear when using OpenGL, or using the Simple with any display filter available.
This commit is contained in:
parent
d585a61049
commit
c366907f64
|
@ -31,6 +31,7 @@ GameArea::GameArea()
|
|||
, rewind_time(0)
|
||||
, do_rewind(false)
|
||||
, rewind_mem(0)
|
||||
, num_rewind_states(0)
|
||||
, loaded(IMAGE_UNKNOWN)
|
||||
, basic_width(GBAWidth)
|
||||
, basic_height(GBAHeight)
|
||||
|
@ -1860,6 +1861,7 @@ void DrawingPanelBase::DrawArea(uint8_t** data)
|
|||
showSpeedTransparent);
|
||||
|
||||
free(buf);
|
||||
buf = NULL;
|
||||
} else
|
||||
panel->osdtext.clear();
|
||||
}
|
||||
|
@ -1978,9 +1980,11 @@ void DrawingPanelBase::OnSize(wxSizeEvent& ev)
|
|||
DrawingPanelBase::~DrawingPanelBase()
|
||||
{
|
||||
// pixbuf1 freed by emulator
|
||||
if (pixbuf2)
|
||||
if (pixbuf1 != pixbuf2 && pixbuf2)
|
||||
{
|
||||
free(pixbuf2);
|
||||
|
||||
pixbuf2 = NULL;
|
||||
}
|
||||
InterframeCleanup();
|
||||
|
||||
if (nthreads) {
|
||||
|
@ -2004,7 +2008,7 @@ BasicDrawingPanel::BasicDrawingPanel(wxWindow* parent, int _width, int _height)
|
|||
// 16 or 32, though
|
||||
if (gopts.filter == FF_NONE && gopts.ifb == IFB_NONE)
|
||||
// changing from 32 to 24 does not require regenerating color tables
|
||||
systemColorDepth = 24;
|
||||
systemColorDepth = 32;
|
||||
if (!did_init) DrawingPanelInit();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue