aboutsummaryrefslogtreecommitdiff
path: root/src/library_sdl.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r--src/library_sdl.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index cadc3aee..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;
@@ -1304,7 +1304,7 @@ var LibrarySDL = {
dstData.ctx.globalAlpha = oldAlpha;
if (dst != SDL.screen) {
// XXX As in IMG_Load, for compatibility we write out |pixels|
- console.log('WARNING: copying canvas data to memory for compatibility');
+ Runtime.warnOnce('WARNING: copying canvas data to memory for compatibility');
_SDL_LockSurface(dst);
dstData.locked--; // The surface is not actually locked in this hack
}