aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Riss <Michael.Riss@gmx.de>2013-02-20 20:07:06 +0100
committerMichael Riss <Michael.Riss@gmx.de>2013-03-06 10:43:17 +0100
commit65d005e3a28efbdf5f9ecfee21500243964e421e (patch)
treef9a5709b296f300fdcf533c589d69d63a6edcce7
parentb6032ff72c81c4768ece98f9c31708af95b96863 (diff)
Further improvement of the full screen support:
- SDL_WM_ToggleFullScreen now delivers correct return values, reflecting that for a SDL program it's impossible to switch to full screen mode in the browser environment Signed-off-by: Michael Riss <Michael.Riss@gmx.de>
-rw-r--r--src/library_sdl.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js
index 99189d8a..5033b27e 100644
--- a/src/library_sdl.js
+++ b/src/library_sdl.js
@@ -1096,7 +1096,12 @@ var LibrarySDL = {
SDL_WM_GrabInput: function() {},
SDL_WM_ToggleFullScreen: function(surf) {
- Module['canvas'].cancelFullScreen();
+ if (Browser.isFullScreen) {
+ Module['canvas'].cancelFullScreen();
+ return 1;
+ } else {
+ return 0;
+ }
},
// SDL_Image