fix(overlay): timezone crash (#946)

This commit is contained in:
Yimura 2023-02-04 23:08:53 +01:00 committed by GitHub
parent 7f37def248
commit 4c45d40df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -25,8 +25,8 @@ namespace big
if (CNetworkPlayerMgr *network_player_mgr = gta_util::get_network_player_mgr(); g.window.ingame_overlay.show_players)
ImGui::Text(std::format("Players: {}/{}", network_player_mgr->m_player_count, network_player_mgr->m_player_limit).c_str());
if (g.window.ingame_overlay.show_time)
ImGui::Text(std::format("Time: {:%d-%m-%Y %H:%M:%OS}", std::chrono::current_zone()->to_local(std::chrono::system_clock::now())).c_str());
//if (g.window.ingame_overlay.show_time)
// ImGui::Text(std::format("Time: {:%d-%m-%Y %H:%M:%OS}", std::chrono::current_zone()->to_local(std::chrono::system_clock::now())).c_str());
if (auto replay_interface = *g_pointers->m_replay_interface; g.window.ingame_overlay.show_replay_interface)
{

View File

@ -30,6 +30,8 @@ namespace big
ImGui::Checkbox("Show FPS", &g.window.ingame_overlay.show_fps);
ImGui::Checkbox("Show Players", &g.window.ingame_overlay.show_players);
ImGui::Checkbox("Show Time", &g.window.ingame_overlay.show_time);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Show time is currently disabled as it caused problems for some users.");
ImGui::EndGroup();
ImGui::SameLine();