Multi-window fix
This commit is contained in:
@@ -252,6 +252,12 @@ class Application extends Module {
|
|||||||
windowByID.remove (window.id);
|
windowByID.remove (window.id);
|
||||||
window.close ();
|
window.close ();
|
||||||
|
|
||||||
|
if (window.renderer != null) {
|
||||||
|
|
||||||
|
removeRenderer (window.renderer);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (this.window == window) {
|
if (this.window == window) {
|
||||||
|
|
||||||
this.window = null;
|
this.window = null;
|
||||||
|
|||||||
@@ -127,7 +127,11 @@ class Module implements IModule {
|
|||||||
|
|
||||||
@:noCompletion public function removeWindow (window:Window):Void {
|
@:noCompletion public function removeWindow (window:Window):Void {
|
||||||
|
|
||||||
|
if (window != null && __windows.indexOf (window) > -1) {
|
||||||
|
|
||||||
|
__windows.remove (window);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -217,10 +217,12 @@ namespace lime {
|
|||||||
|
|
||||||
SDL_RenderReadPixels (sdlRenderer, &bounds, SDL_PIXELFORMAT_ABGR8888, buffer->data->Data (), buffer->Stride ());
|
SDL_RenderReadPixels (sdlRenderer, &bounds, SDL_PIXELFORMAT_ABGR8888, buffer->data->Data (), buffer->Stride ());
|
||||||
|
|
||||||
for (unsigned char *it=buffer->data->Data()+3; it<(buffer->data->Data()+buffer->data->Length());it+=4) {
|
for (unsigned char *it=buffer->data->Data () + 3; it < (buffer->data->Data () + buffer->data->Length ()); it += 4) {
|
||||||
|
|
||||||
*it = 0xff;
|
*it = 0xff;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user