--- nono/wx/wxversion.cpp 2026/04/29 17:05:23 1.1.1.7 +++ nono/wx/wxversion.cpp 2026/04/29 17:05:57 1.1.1.12 @@ -9,6 +9,8 @@ // #include "wxversion.h" +#include "hostnet.h" +#include "monitor.h" #include // グローバル参照用 @@ -36,7 +38,7 @@ WXVersionDlg::WXVersionDlg(wxWindow *par // Copyright vbox->Add(new wxStaticText(this, wxID_ANY, - "Copyright (C) 2020 nono project")); + "Copyright (C) 2020-2026 nono project")); // 空行 vbox->Add(new wxStaticText(this, wxID_ANY, "")); @@ -70,6 +72,7 @@ HostInfoMonitor::HostInfoMonitor() // この時点で必要な情報は全部集めておく int width = 0; + int height = 4; // OS 名 const auto info = wxPlatformInfo::Get(); @@ -122,6 +125,7 @@ HostInfoMonitor::HostInfoMonitor() // CPU Features #if defined(__x86_64__) + height++; # if defined(HAVE_AVX2) if (gMainApp.detect_avx2) { if (gMainApp.enable_avx2) { @@ -136,7 +140,25 @@ HostInfoMonitor::HostInfoMonitor() avx2str = "not compiled"; # endif #endif + +#if defined(__aarch64__) + height++; +# if defined(HAVE_NEON) + if (gMainApp.detect_neon) { + if (gMainApp.enable_neon) { + neonstr = "enabled"; + } else { + neonstr = "disabled"; + } + } else { + neonstr = "not detected"; + } +# else + neonstr = "not compiled"; +# endif +#endif width = std::max(width, (int)avx2str.Length()); + width = std::max(width, (int)neonstr.Length()); // wxWidgets バージョン wxname = wxVERSION_NUM_DOT_STRING_T; @@ -149,13 +171,16 @@ HostInfoMonitor::HostInfoMonitor() wxname = wxname + " (" + wxport + ")"; width = std::max(width, (int)wxname.Length()); - int height = 3; -#if defined(__x86_64__) // HAVE_AVX2 ではなく - height++; -#endif - monitor.func = ToMonitorCallback(&HostInfoMonitor::MonitorUpdate); - monitor.SetSize(11 + width, height); - monitor.Regist(ID_MONITOR_WXHOSTINFO); + // libslirp バージョン + slirpver = HostNetDevice::GetSlirpVersion(); + if (slirpver == NULL) { + slirpver = "not compiled"; + } + width = std::max(width, (int)strlen(slirpver)); + + monitor = gMonitorManager->Regist(ID_MONITOR_WXHOSTINFO, this); + monitor->SetCallback(&HostInfoMonitor::MonitorScreen); + monitor->SetSize(11 + width, height); } // デストラクタ @@ -166,7 +191,7 @@ HostInfoMonitor::~HostInfoMonitor() // モニタを更新 void -HostInfoMonitor::MonitorUpdate(Monitor *, TextScreen& screen) +HostInfoMonitor::MonitorScreen(Monitor *, TextScreen& screen) { int x = 11; int y; @@ -187,8 +212,17 @@ HostInfoMonitor::MonitorUpdate(Monitor * screen.Puts(x, y, (const char *)avx2str.mb_str()); y++; #endif +#if defined(__aarch64__) + screen.Puts(0, y, "NEON:"); + screen.Puts(x, y, (const char *)neonstr.mb_str()); + y++; +#endif screen.Puts(0, y, "wxWidgets:"); screen.Puts(x, y, (const char *)wxname.mb_str()); y++; + + screen.Puts(0, y, "libslirp:"); + screen.Puts(x, y, slirpver); + y++; }