Merge branch 'master' into jgrpp
# Conflicts: # src/console_cmds.cpp # src/landscape.cpp # src/linkgraph/linkgraphschedule.cpp # src/openttd.cpp # src/roadveh_cmd.cpp # src/toolbar_gui.cpp # src/train_cmd.cpp # src/vehicle.cpp # src/viewport.cpp # src/window_type.h
This commit is contained in:
@@ -2034,6 +2034,37 @@ static void IConsoleDebugLibRegister()
|
||||
}
|
||||
#endif
|
||||
|
||||
DEF_CONSOLE_CMD(ConFramerate)
|
||||
{
|
||||
extern void ConPrintFramerate(); // framerate_gui.cpp
|
||||
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Show frame rate and game speed information");
|
||||
return true;
|
||||
}
|
||||
|
||||
ConPrintFramerate();
|
||||
return true;
|
||||
}
|
||||
|
||||
DEF_CONSOLE_CMD(ConFramerateWindow)
|
||||
{
|
||||
extern void ShowFramerateWindow();
|
||||
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Open the frame rate window");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_network_dedicated) {
|
||||
IConsoleError("Can not open frame rate window on a dedicated server");
|
||||
return false;
|
||||
}
|
||||
|
||||
ShowFramerateWindow();
|
||||
return true;
|
||||
}
|
||||
|
||||
/*******************************
|
||||
* console command registration
|
||||
*******************************/
|
||||
@@ -2165,6 +2196,9 @@ void IConsoleStdLibRegister()
|
||||
#ifdef _DEBUG
|
||||
IConsoleDebugLibRegister();
|
||||
#endif
|
||||
IConsoleCmdRegister("fps", ConFramerate);
|
||||
IConsoleCmdRegister("fps_wnd", ConFramerateWindow);
|
||||
|
||||
IConsoleCmdRegister("dump_command_log", ConDumpCommandLog, nullptr, true);
|
||||
IConsoleCmdRegister("dump_inflation", ConDumpInflation, nullptr, true);
|
||||
IConsoleCmdRegister("dump_cpdp_stats", ConDumpCpdpStats, nullptr, true);
|
||||
|
Reference in New Issue
Block a user