--- nono/lib/mainapp.cpp 2026/04/29 17:05:52 1.1.1.23 +++ nono/lib/mainapp.cpp 2026/04/29 17:05:56 1.1.1.24 @@ -330,6 +330,15 @@ MainApp::Init1a(int ac, char *av[], std: return EXIT_FAILURE; } + // 0.1 機種が確定したので、機種依存の設定値変更。 + if (opt_perf) { + // --perf なら余計な I/O を避けるため HostCOM をオフにしておきたい。 + // ただし virt-* はデフォルトが console なのでそれはオフにしたくない。 + if (gMainApp.IsVIRT68K() == false) { + gConfig->Update("hostcom0-driver=none", "--perf"); + } + } + // 1. VM 作成 switch (vmtype) { case VMType::X68030: @@ -627,8 +636,10 @@ MainApp::ParseOpt(int ac, char *av[]) case OPT_perf: // パフォーマンス確認用。(Config::Update() 側で展開する) + opt_perf = true; config_options.emplace_back("--perf", ""); log_to_console = true; + AddLogopt("all=-1,syncer=0"); break; case OPT_show_config: @@ -1129,21 +1140,25 @@ MainApp::SetLogopt1(const std::string& i return true; } - // "" なら "*" 全部に展開する。 -#define EXPAND(key) do { \ - if (name == key) { \ - for (auto obj : gMainApp.GetObjects()) { \ - if (strncasecmp(obj->GetName().c_str(), key, strlen(key)) == 0) \ - obj->SetLogLevel(level); \ - } \ - return true; \ - } \ -} while (0) - EXPAND("bankram"); - EXPAND("fdd"); - EXPAND("gfpic"); - EXPAND("hostcom"); - EXPAND("hostnet"); + // "" なら"*" 全部に展開する。 + static const std::vector expandkeys { + "bankram", + "fdd", + "gfpic", + "hostcom", + "hostnet", + }; + for (const auto key : expandkeys) { + if (name == key) { + for (auto obj : gMainApp.GetObjects()) { + const auto& objname = obj->GetName(); + if (strncasecmp(objname.c_str(), key, strlen(key)) == 0) { + obj->SetLogLevel(level); + } + } + return true; + } + } // エイリアスリストを作る using aliaslist_t = std::vector>;