tilemap and lightmap resize fix
This commit is contained in:
parent
24bc4c644e
commit
999176c19b
|
|
@ -67,7 +67,7 @@ struct LightMapPrivate{
|
||||||
updateSrcRectCon();
|
updateSrcRectCon();
|
||||||
|
|
||||||
prepareCon = shState->graphicsSignals.prepareDraw.Connect(*this, &LightMapPrivate::prepare);
|
prepareCon = shState->graphicsSignals.prepareDraw.Connect(*this, &LightMapPrivate::prepare);
|
||||||
bitmapUpdateConnection = shState->windowSignals.resized.Connect([&](int w, int h){
|
bitmapUpdateConnection = shState->graphicsSignals.resized.Connect([&](int w, int h){
|
||||||
shState->rubyDispatcher().invoke([&, w, h]{
|
shState->rubyDispatcher().invoke([&, w, h]{
|
||||||
bitmap = new Bitmap(w, h);
|
bitmap = new Bitmap(w, h);
|
||||||
bitmap->ensureNonMega();
|
bitmap->ensureNonMega();
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,7 @@ struct TilemapPrivate {
|
||||||
elem.zlayers[i] = new ZLayer(this, viewport);
|
elem.zlayers[i] = new ZLayer(this, viewport);
|
||||||
|
|
||||||
prepareCon = shState->graphicsSignals.prepareDraw.Connect(*this, &TilemapPrivate::prepare);
|
prepareCon = shState->graphicsSignals.prepareDraw.Connect(*this, &TilemapPrivate::prepare);
|
||||||
viewpUpdateConnection = shState->windowSignals.resized.Connect([&](int w, int h){
|
viewpUpdateConnection = shState->graphicsSignals.resized.Connect([&](int w, int h){
|
||||||
shState->rubyDispatcher().invoke([&, w, h]{
|
shState->rubyDispatcher().invoke([&, w, h]{
|
||||||
if (this->viewport->isDisposed()){
|
if (this->viewport->isDisposed()){
|
||||||
Debug() << "Warning: resize updating of disposed tilemap, disconnecting";
|
Debug() << "Warning: resize updating of disposed tilemap, disconnecting";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue