Fixing fallbacks for set timeout.. Apparently opera 12 doesn't even have bloody requestAnimationFrame lol

This commit is contained in:
underscorediscovery
2013-07-01 04:41:12 -02:30
parent d41516293c
commit e579289c3b
2 changed files with 5 additions and 2 deletions

View File

@@ -81,6 +81,7 @@ class Main {
//Called by lime //Called by lime
public function render() { public function render() {
trace('wtf');
//Set the viewport for GL //Set the viewport for GL
GL.viewport( 0, 0, lib.config.width, lib.config.height ); GL.viewport( 0, 0, lib.config.width, lib.config.height );

View File

@@ -161,7 +161,7 @@ class RenderHandler {
canvas_position = { x:curleft, y:curtop }; canvas_position = { x:curleft, y:curtop };
} }
public function _requestAnimFrame(callback) { public function _requestAnimFrame(callback:Dynamic) {
if(browser == BrowserLike.chrome) { if(browser == BrowserLike.chrome) {
@@ -190,7 +190,9 @@ class RenderHandler {
} else { //opera } else { //opera
js.Browser.window.setTimeout(cast callback, 16); js.Browser.window.setTimeout(function(){
callback();
}, 16);
} //no RAF? fall back to setTimeout for now } //no RAF? fall back to setTimeout for now
} }