mirror of https://github.com/AxioDL/metaforce.git
Serialize CVarManager on shutdown; add build type to About
This commit is contained in:
parent
996eadfb4f
commit
3bb81f7fed
|
@ -302,6 +302,7 @@ public:
|
||||||
if (m_window) {
|
if (m_window) {
|
||||||
m_window->getCommandQueue()->stopRenderer();
|
m_window->getCommandQueue()->stopRenderer();
|
||||||
}
|
}
|
||||||
|
m_cvarManager.serialize();
|
||||||
m_voiceEngine.reset();
|
m_voiceEngine.reset();
|
||||||
m_amuseAllocWrapper.reset();
|
m_amuseAllocWrapper.reset();
|
||||||
CDvdFile::Shutdown();
|
CDvdFile::Shutdown();
|
||||||
|
|
|
@ -330,7 +330,13 @@ void ImGuiConsole::ShowAboutWindow() {
|
||||||
ImVec2 center = ImGui::GetMainViewport()->GetCenter();
|
ImVec2 center = ImGui::GetMainViewport()->GetCenter();
|
||||||
ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
|
ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
|
||||||
|
|
||||||
if (ImGui::Begin("About", &m_showAboutWindow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse)) {
|
ImVec4& windowBg = ImGui::GetStyle().Colors[ImGuiCol_WindowBg];
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_TitleBg, windowBg);
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_TitleBgActive, windowBg);
|
||||||
|
|
||||||
|
if (ImGui::Begin("About", &m_showAboutWindow,
|
||||||
|
ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoNav |
|
||||||
|
ImGuiWindowFlags_NoSavedSettings)) {
|
||||||
float iconSize = 256.f;
|
float iconSize = 256.f;
|
||||||
ImGui::SameLine(ImGui::GetWindowSize().x / 2 - iconSize + (iconSize / 2));
|
ImGui::SameLine(ImGui::GetWindowSize().x / 2 - iconSize + (iconSize / 2));
|
||||||
ImGui::Image(ImGuiUserTextureID_MetaforceIcon, ImVec2{iconSize, iconSize});
|
ImGui::Image(ImGuiUserTextureID_MetaforceIcon, ImVec2{iconSize, iconSize});
|
||||||
|
@ -350,36 +356,51 @@ void ImGuiConsole::ShowAboutWindow() {
|
||||||
if (ImGui::BeginTable("Version Info", 2, ImGuiTableFlags_BordersInnerV)) {
|
if (ImGui::BeginTable("Version Info", 2, ImGuiTableFlags_BordersInnerV)) {
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
if (ImGui::TableNextColumn()) {
|
if (ImGui::TableNextColumn()) {
|
||||||
ImGui::TextUnformatted("Branch");
|
ImGuiStringViewText("Branch");
|
||||||
}
|
}
|
||||||
if (ImGui::TableNextColumn()) {
|
if (ImGui::TableNextColumn()) {
|
||||||
ImGui::TextUnformatted(METAFORCE_WC_BRANCH);
|
ImGuiStringViewText(METAFORCE_WC_BRANCH);
|
||||||
}
|
}
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
if (ImGui::TableNextColumn()) {
|
if (ImGui::TableNextColumn()) {
|
||||||
ImGui::TextUnformatted("Revision");
|
ImGuiStringViewText("Revision");
|
||||||
}
|
}
|
||||||
if (ImGui::TableNextColumn()) {
|
if (ImGui::TableNextColumn()) {
|
||||||
ImGui::TextUnformatted(METAFORCE_WC_REVISION);
|
ImGuiStringViewText(METAFORCE_WC_REVISION);
|
||||||
}
|
}
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
if (ImGui::TableNextColumn()) {
|
if (ImGui::TableNextColumn()) {
|
||||||
ImGui::TextUnformatted("Date");
|
ImGuiStringViewText("Build");
|
||||||
}
|
}
|
||||||
if (ImGui::TableNextColumn()) {
|
if (ImGui::TableNextColumn()) {
|
||||||
ImGui::TextUnformatted(METAFORCE_WC_DATE);
|
ImGuiStringViewText(METAFORCE_DLPACKAGE);
|
||||||
}
|
}
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
if (ImGui::TableNextColumn()) {
|
if (ImGui::TableNextColumn()) {
|
||||||
ImGui::TextUnformatted("Build name");
|
ImGuiStringViewText("Date");
|
||||||
}
|
}
|
||||||
if (ImGui::TableNextColumn()) {
|
if (ImGui::TableNextColumn()) {
|
||||||
ImGui::TextUnformatted(METAFORCE_DLPACKAGE);
|
ImGuiStringViewText(METAFORCE_WC_DATE);
|
||||||
|
}
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
if (ImGui::TableNextColumn()) {
|
||||||
|
ImGuiStringViewText("Type");
|
||||||
|
}
|
||||||
|
if (ImGui::TableNextColumn()) {
|
||||||
|
ImGuiStringViewText(METAFORCE_BUILD_TYPE);
|
||||||
|
}
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
if (ImGui::TableNextColumn()) {
|
||||||
|
ImGuiStringViewText("Game");
|
||||||
|
}
|
||||||
|
if (ImGui::TableNextColumn()) {
|
||||||
|
ImGuiStringViewText(g_Main->GetVersionString());
|
||||||
}
|
}
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
ImGui::PopStyleColor(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGuiConsole::ShowDebugOverlay() {
|
void ImGuiConsole::ShowDebugOverlay() {
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#define METAFORCE_WC_BRANCH "@METAFORCE_WC_BRANCH@"
|
#define METAFORCE_WC_BRANCH "@METAFORCE_WC_BRANCH@"
|
||||||
#define METAFORCE_WC_REVISION "@METAFORCE_WC_REVISION@"
|
#define METAFORCE_WC_REVISION "@METAFORCE_WC_REVISION@"
|
||||||
#define METAFORCE_WC_DATE "@METAFORCE_WC_DATE@"
|
#define METAFORCE_WC_DATE "@METAFORCE_WC_DATE@"
|
||||||
|
#define METAFORCE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
|
||||||
|
|
||||||
#if defined(__x86_64__) || defined(_M_AMD64)
|
#if defined(__x86_64__) || defined(_M_AMD64)
|
||||||
#define METAFORCE_DLPACKAGE "metaforce-@METAFORCE_WC_DESCRIBE@-@PLATFORM_NAME@-x86_64-@METAFORCE_VECTOR_ISA@"
|
#define METAFORCE_DLPACKAGE "metaforce-@METAFORCE_WC_DESCRIBE@-@PLATFORM_NAME@-x86_64-@METAFORCE_VECTOR_ISA@"
|
||||||
|
|
Loading…
Reference in New Issue