diff --git a/sae/amiga.js b/sae/amiga.js index 259ec40..cb6935e 100644 --- a/sae/amiga.js +++ b/sae/amiga.js @@ -587,8 +587,17 @@ function ScriptedAmigaEmulator() { }; this.mute = function(mute) { - this.audio.mute(mute); - return SAEE_None; + if (this.running) { + this.audio.mute(mute); + if (mute) + SAEF_log("sae.mute() audio muted"); + else + SAEF_log("sae.mute() playing audio"); + return SAEE_None; + } else { + SAEF_warn("sae.mute() emulation not running"); + return SAEE_NotRunning; + } }; this.keyPress = function(e, down) { diff --git a/sae/config.js b/sae/config.js index add5ab5..a403252 100644 --- a/sae/config.js +++ b/sae/config.js @@ -575,6 +575,7 @@ function SAEO_Config() { id: "", enabled: false, //driver: 0, + hideCursor: false, scandoubler: false, //gfx_scandoubler framerate: 0, //gfx_framerate @@ -1075,6 +1076,7 @@ function SAEO_Configuration() { p.video.id = "video"; p.video.enabled = true; + p.video.hideCursor = true; p.video.scandoubler = false; p.video.framerate = 1; p.video.hresolution = SAEC_Config_Video_HResolution_HiRes; diff --git a/sae/input.js b/sae/input.js index 8574ec9..5bdcafa 100644 --- a/sae/input.js +++ b/sae/input.js @@ -47,15 +47,19 @@ function SAEO_Mouse() { }; this.mouseover = function(e) { - //SAER.video.hideCursor(1); + if (SAEV_config.video.hideCursor) + SAER.video.hideCursor(true); + this.mousemove(e); lx = cx; ly = cy; }; this.mouseout = function(e) { - //SAER.video.hideCursor(0); this.mouseup(e); + + if (SAEV_config.video.hideCursor) + SAER.video.hideCursor(false); }; this.mousemove = function(e) { diff --git a/sae/video.js b/sae/video.js index 936ebab..87601b1 100644 --- a/sae/video.js +++ b/sae/video.js @@ -2017,6 +2017,11 @@ function SAEO_Video() { DirectDraw_ReleaseDC(hdc); }*/ + this.hideCursor = function(hide) { + if (hAmigaWnd !== null && hAmigaWnd.shown) + hAmigaWnd.canvas.style.cursor = hide ? "none" : "auto"; + } + /*-----------------------------------------------------------------------*/ //var flushymin = 0, flushymax = 0;