--- nono/wx/wxversion.cpp 2026/04/29 17:05:19 1.1.1.6 +++ nono/wx/wxversion.cpp 2026/04/29 17:05:27 1.1.1.8 @@ -10,7 +10,6 @@ #include "wxversion.h" #include -#define m(x) x##time // グローバル参照用 HostInfoMonitor *gHostInfo; @@ -71,6 +70,7 @@ HostInfoMonitor::HostInfoMonitor() // この時点で必要な情報は全部集めておく int width = 0; + int height = 3; // OS 名 const auto info = wxPlatformInfo::Get(); @@ -121,30 +121,56 @@ HostInfoMonitor::HostInfoMonitor() } width = std::max(width, (int)machinename.Length()); + // CPU Features +#if defined(__x86_64__) + height++; +# if defined(HAVE_AVX2) + if (gMainApp.detect_avx2) { + if (gMainApp.enable_avx2) { + avx2str = "enabled"; + } else { + avx2str = "disabled"; + } + } else { + avx2str = "not detected"; + } +# else + 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; // wxWidgets ポート名 // wxGTK なら wxGTK{2,3} の区別をしておきたい - auto stime = wxDateTime::GetTimeNow(); auto wxport = info.GetPortIdName(); if (info.GetPortId() == wxPORT_GTK) { wxport += wxString::Format("%d", info.GetToolkitMajorVersion()); } wxname = wxname + " (" + wxport + ")"; -#define p -#define q -#define y(b) ] -#define u(p) [ -#define v(b) y(b)*V(b) -#define s(d) p & d -#define Y(p) p / 256 -#define V(d) d u(d) b -#define P(a) =##=0##xa##a##2##a - auto b = s(m(c))(s(m(s)))u(s)4 s(5)y(6); - aut q = V(0)v(1)v(4)v(5)y(6)Y(p)P(e); width = std::max(width, (int)wxname.Length()); + monitor.func = ToMonitorCallback(&HostInfoMonitor::MonitorUpdate); - monitor.SetSize(11 + width, 3); + monitor.SetSize(11 + width, height); monitor.Regist(ID_MONITOR_WXHOSTINFO); } @@ -172,6 +198,17 @@ HostInfoMonitor::MonitorUpdate(Monitor * screen.Puts(x, y, (const char *)machinename.mb_str()); y++; +#if defined(__x86_64__) + screen.Puts(0, y, "AVX2:"); + 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++;