enables or disables the in-game profiler data collection * * The profiler is a real-time tool that shows the numbers of milliseconds spent * in each scope per frame as well as counters. The profiler is very useful for * tracking down performance and resource problems. * * @name profiler.enable * @param enabled [type:boolean] true to enable, false to disable * * @examples * ```lua * -- S
| 432 | * ``` |
| 433 | */ |
| 434 | static int EnableProfiler(lua_State* L) |
| 435 | { |
| 436 | DM_LUA_STACK_CHECK(L, 0); |
| 437 | |
| 438 | if (!lua_isboolean(L, 1)) |
| 439 | { |
| 440 | return DM_LUA_ERROR("Invalid parameter, expected a boolean but got a %s", lua_typename(L, lua_type(L, 1))) |
| 441 | } |
| 442 | |
| 443 | dmProfiler::SetEnabled(lua_toboolean(L, 1)); |
| 444 | return 0; |
| 445 | } |
| 446 | |
| 447 | /*# enables or disables the on-screen profiler ui |
| 448 | * Creates and shows or hides and destroys the on-sceen profiler ui |
nothing calls this directly
no test coverage detected