From: PilzAdam Date: Wed, 25 Dec 2013 02:52:42 +0000 (+0100) Subject: Remove FPS from window title X-Git-Tag: 0.4.9~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4b31a38ae9b2d2019ddf75d09c1fdfd67f512067;p=oweals%2Fminetest.git Remove FPS from window title This doubles performance on some window managers (WTF?!) --- diff --git a/src/game.cpp b/src/game.cpp index 8cf7da1e1..33668fb44 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1479,6 +1479,11 @@ void the_game( bool use_weather = g_settings->getBool("weather"); + core::stringw str = L"Minetest ["; + str += driver->getName(); + str += "]"; + device->setWindowCaption(str.c_str()); + for(;;) { if(device->run() == false || kill == true) @@ -2990,10 +2995,13 @@ void the_game( scenetime_avg = scenetime_avg * 0.95 + (float)scenetime*0.05; static float endscenetime_avg = 0; endscenetime_avg = endscenetime_avg * 0.95 + (float)endscenetime*0.05;*/ - + + u16 fps = (1.0/dtime_avg1); + std::ostringstream os(std::ios_base::binary); os<getName(); - str += "] FPS="; - str += fps; - - device->setWindowCaption(str.c_str()); - lastFPS = fps; - } - /* Log times and stuff for visualization */