don't send mouse events when execution is paused
This commit is contained in:
parent
5c4023f17d
commit
d28c77faa2
|
@ -32,6 +32,17 @@ function MouseAdapter(bus, screen_container)
|
|||
this.enabled = enabled;
|
||||
}, this);
|
||||
|
||||
// TODO: Should probably not use bus for this
|
||||
this.is_running = false;
|
||||
this.bus.register("emulator-stopped", function()
|
||||
{
|
||||
this.is_running = false;
|
||||
}, this);
|
||||
this.bus.register("emulator-started", function()
|
||||
{
|
||||
this.is_running = true;
|
||||
}, this);
|
||||
|
||||
this.destroy = function()
|
||||
{
|
||||
if(typeof window === "undefined")
|
||||
|
@ -145,6 +156,11 @@ function MouseAdapter(bus, screen_container)
|
|||
return;
|
||||
}
|
||||
|
||||
if(!mouse.is_running)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var delta_x = 0;
|
||||
var delta_y = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue