1
0
Fork 0

Fix symbol lookup issue via a caller() hack. Not sure what the

underlying problem is, but this allows fpsDisplay() to be called both
as a command handler and as a function.
This commit is contained in:
andy 2007-03-29 19:32:59 +00:00
parent de80a63ae6
commit 3bcb193cb9

View file

@ -85,8 +85,8 @@ settimer(INIT, 1);
##
# Show/hide the fps display dialog.
#
fpsDisplay = func(v = nil) {
var w = v != nil ? v : cmdarg().getBoolValue();
fpsDisplay = func {
var w = (caller(0)[0]["arg"] == nil) ? cmdarg().getBoolValue() : arg[0];
fgcommand(w ? "dialog-show" : "dialog-close", props.Node.new({"dialog-name": "fps"}));
}