aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Blanc <guillaumeblanc.sc@gmail.com>2014-06-04 14:15:04 +0200
committerGuillaume Blanc <guillaumeblanc.sc@gmail.com>2014-06-04 14:15:04 +0200
commit7431f7cb01c6f3ac912bfad3cbb304b27eaa8022 (patch)
tree19b5fc1926029470ee709ef03a6daf0d0e4eefcb
parent32a90388114947983c3ec0c6eef1ef82f1fe47f1 (diff)
On calls to glfwSetWindowSizeCallback, calls the provided callback function, as described by glfw documentation: When a callback function is set, it will be called with the current window size before this function returns.
-rw-r--r--src/library_glfw.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/library_glfw.js b/src/library_glfw.js
index 98adee34..04dd4a0a 100644
--- a/src/library_glfw.js
+++ b/src/library_glfw.js
@@ -417,6 +417,9 @@ var LibraryGLFW = {
glfwSetWindowSizeCallback: function(cbfun) {
GLFW.resizeFunc = cbfun;
+ if (GLFW.resizeFunc) {
+ Runtime.dynCall('vii', GLFW.resizeFunc, [Module['canvas'].width, Module['canvas'].height]);
+ }
},
glfwSetWindowCloseCallback: function(cbfun) {