diff options
author | jonas echterhoff <jonas@unity3d.com> | 2014-03-04 21:56:50 +0100 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-03-05 10:54:25 -0800 |
commit | 6ce994ec4ce9b90c16736c5a52b7e7fab4cea5a4 (patch) | |
tree | e9f74169d6d4573dcfa1594c502ec7c9e5d7d990 | |
parent | e7e062844b085f838e25da3e1e5fc5d0a6959449 (diff) |
Allow going fullscreen in response to mousedown events
-rw-r--r-- | src/library_sdl.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index 0755a9cc..b50073be 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -450,9 +450,9 @@ var LibrarySDL = { // keyup. This isn't perfect, but it enables SDL_WM_ToggleFullScreen // to work as the result of a keypress (which is an extremely // common use case). - if (event.type === 'keydown') { + if (event.type === 'keydown' || event.type === 'mousedown') { SDL.canRequestFullscreen = true; - } else if (event.type === 'keyup') { + } else if (event.type === 'keyup' || event.type === 'mouseup') { if (SDL.isRequestingFullscreen) { Module['requestFullScreen'](true, true); SDL.isRequestingFullscreen = false; |