mirror of https://github.com/stella-emu/stella.git
Fix blitter reinitialization, always call Blitter::free on surface reload
This commit is contained in:
parent
cc72f12574
commit
33172f34e4
|
@ -185,6 +185,7 @@ void FBSurfaceSDL2::free()
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void FBSurfaceSDL2::reload()
|
void FBSurfaceSDL2::reload()
|
||||||
{
|
{
|
||||||
|
free();
|
||||||
reinitializeBlitter();
|
reinitializeBlitter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,6 +196,7 @@ void FBSurfaceSDL2::resize(uInt32 width, uInt32 height)
|
||||||
|
|
||||||
if(mySurface)
|
if(mySurface)
|
||||||
SDL_FreeSurface(mySurface);
|
SDL_FreeSurface(mySurface);
|
||||||
|
|
||||||
free();
|
free();
|
||||||
|
|
||||||
createSurface(width, height, nullptr);
|
createSurface(width, height, nullptr);
|
||||||
|
|
|
@ -44,7 +44,7 @@ void BilinearBlitter::reinitialize(
|
||||||
SDL_Surface* staticData
|
SDL_Surface* staticData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
myRecreateTextures = !(
|
myRecreateTextures = myRecreateTextures || !(
|
||||||
mySrcRect.w == srcRect.w &&
|
mySrcRect.w == srcRect.w &&
|
||||||
mySrcRect.h == srcRect.h &&
|
mySrcRect.h == srcRect.h &&
|
||||||
myDstRect.w == destRect.w &&
|
myDstRect.w == destRect.w &&
|
||||||
|
|
|
@ -69,7 +69,7 @@ void HqBlitter::reinitialize(
|
||||||
SDL_Surface* staticData
|
SDL_Surface* staticData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
myRecreateTextures = !(
|
myRecreateTextures = myRecreateTextures || !(
|
||||||
mySrcRect.w == srcRect.w &&
|
mySrcRect.w == srcRect.w &&
|
||||||
mySrcRect.h == srcRect.h &&
|
mySrcRect.h == srcRect.h &&
|
||||||
myDstRect.w == destRect.w &&
|
myDstRect.w == destRect.w &&
|
||||||
|
|
Loading…
Reference in New Issue