threads
This commit is contained in:
@@ -304,6 +304,7 @@ auto Screen::getActiveShaderName() const -> const char* {
|
||||
}
|
||||
|
||||
void Screen::updateRenderInfo() {
|
||||
static const Uint32 start_ticks = SDL_GetTicks();
|
||||
std::string driver = gpu_driver_.empty() ? "sdl" : toLower(gpu_driver_);
|
||||
std::string info = std::to_string(fps_.last_value) + " fps - " + driver;
|
||||
|
||||
@@ -314,6 +315,15 @@ void Screen::updateRenderInfo() {
|
||||
if (Options::video.supersampling) info += " (ss)";
|
||||
}
|
||||
|
||||
// Temps de joc: m:ss.cc
|
||||
Uint32 elapsed = SDL_GetTicks() - start_ticks;
|
||||
int minutes = elapsed / 60000;
|
||||
int seconds = (elapsed / 1000) % 60;
|
||||
int centis = (elapsed / 10) % 100;
|
||||
char time_buf[32];
|
||||
snprintf(time_buf, sizeof(time_buf), " - %d:%02d.%02d", minutes, seconds, centis);
|
||||
info += time_buf;
|
||||
|
||||
Overlay::setRenderInfoText(info.c_str());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user