Fixing fallbacks for set timeout.. Apparently opera 12 doesn't even have bloody requestAnimationFrame lol
This commit is contained in:
@@ -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 );
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user