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:
parent
de80a63ae6
commit
3bcb193cb9
1 changed files with 2 additions and 2 deletions
|
@ -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"}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue