From b2f62b1982515f43332d75e7a3502bc2dd1fd7cf Mon Sep 17 00:00:00 2001 From: gibbed Date: Sat, 3 Aug 2019 22:53:58 -0500 Subject: [PATCH] Clean up cvars (rename, recategorize). --- src/xenia/app/xenia_main.cc | 14 +++++++------- src/xenia/apu/apu_flags.cc | 2 +- src/xenia/apu/xma_decoder.cc | 2 +- src/xenia/base/logging.cc | 4 ++-- src/xenia/base/profiling.cc | 2 +- src/xenia/cpu/backend/x64/x64_backend.cc | 6 +++--- src/xenia/cpu/backend/x64/x64_backend.h | 2 +- src/xenia/cpu/backend/x64/x64_emitter.cc | 6 +++--- src/xenia/debug/ui/debug_window.cc | 2 +- src/xenia/kernel/kernel_flags.cc | 2 +- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/xenia/app/xenia_main.cc b/src/xenia/app/xenia_main.cc index 2ecf3a1b2..6eb07bfc5 100644 --- a/src/xenia/app/xenia_main.cc +++ b/src/xenia/app/xenia_main.cc @@ -43,19 +43,19 @@ #include "third_party/xbyak/xbyak/xbyak_util.h" -DEFINE_string(apu, "any", "Audio system. Use: [any, nop, xaudio2]", "General"); +DEFINE_string(apu, "any", "Audio system. Use: [any, nop, xaudio2]", "APU"); DEFINE_string(gpu, "any", "Graphics system. Use: [any, d3d12, vulkan, null]", - "General"); + "GPU"); DEFINE_string(hid, "any", "Input system. Use: [any, nop, winkey, xinput]", - "General"); + "HID"); -DEFINE_bool(fullscreen, false, "Toggles fullscreen", "General"); +DEFINE_bool(fullscreen, false, "Toggles fullscreen", "GPU"); DEFINE_string(content_root, "", "Root path for content (save/etc) storage.", - "General"); + "Storage"); -DEFINE_bool(mount_scratch, false, "Enable scratch mount", "General"); -DEFINE_bool(mount_cache, false, "Enable cache mount", "General"); +DEFINE_bool(mount_scratch, false, "Enable scratch mount", "Storage"); +DEFINE_bool(mount_cache, false, "Enable cache mount", "Storage"); CmdVar(target, "", "Specifies the target .xex or .iso to execute."); DECLARE_bool(debug); diff --git a/src/xenia/apu/apu_flags.cc b/src/xenia/apu/apu_flags.cc index 63948f3a4..1be7bf509 100644 --- a/src/xenia/apu/apu_flags.cc +++ b/src/xenia/apu/apu_flags.cc @@ -9,4 +9,4 @@ #include "xenia/apu/apu_flags.h" -DEFINE_bool(mute, false, "Mutes all audio output.", "Audio") +DEFINE_bool(mute, false, "Mutes all audio output.", "APU") diff --git a/src/xenia/apu/xma_decoder.cc b/src/xenia/apu/xma_decoder.cc index 00a408c1f..8cb562acf 100644 --- a/src/xenia/apu/xma_decoder.cc +++ b/src/xenia/apu/xma_decoder.cc @@ -49,7 +49,7 @@ extern "C" { // using the XMA* functions. DEFINE_bool(libav_verbose, false, "Verbose libav output (debug and above)", - "Audio"); + "APU"); namespace xe { namespace apu { diff --git a/src/xenia/base/logging.cc b/src/xenia/base/logging.cc index bb8f57100..2c4ec4525 100644 --- a/src/xenia/base/logging.cc +++ b/src/xenia/base/logging.cc @@ -37,7 +37,7 @@ DEFINE_string( log_file, "", "Logs are written to the given file (specify stdout for command line)", "Logging"); -DEFINE_bool(log_debugprint, false, "Dump the log to DebugPrint.", "Logging"); +DEFINE_bool(log_to_debugprint, false, "Dump the log to DebugPrint.", "Logging"); DEFINE_bool(flush_log, true, "Flush log file after each log line batch.", "Logging"); DEFINE_int32( @@ -151,7 +151,7 @@ class Logger { fwrite(buf, 1, size, file_); } - if (cvars::log_debugprint) { + if (cvars::log_to_debugprint) { debugging::DebugPrint("%.*s", size, buf); } } diff --git a/src/xenia/base/profiling.cc b/src/xenia/base/profiling.cc index 64eed5312..a28f6e26b 100644 --- a/src/xenia/base/profiling.cc +++ b/src/xenia/base/profiling.cc @@ -41,7 +41,7 @@ #include "xenia/ui/microprofile_drawer.h" #endif // XE_OPTION_PROFILING_UI -DEFINE_bool(show_profiler, false, "Show profiling UI by default.", "Other"); +DEFINE_bool(show_profiler, false, "Show profiling UI by default.", "UI"); namespace xe { diff --git a/src/xenia/cpu/backend/x64/x64_backend.cc b/src/xenia/cpu/backend/x64/x64_backend.cc index 26e76bfa0..41c9832ee 100644 --- a/src/xenia/cpu/backend/x64/x64_backend.cc +++ b/src/xenia/cpu/backend/x64/x64_backend.cc @@ -27,8 +27,8 @@ #include "xenia/cpu/stack_walker.h" DEFINE_bool( - enable_haswell_instructions, true, - "Uses the AVX2/FMA/etc instructions on Haswell processors, if available.", + use_haswell_instructions, true, + "Uses the AVX2/FMA/etc instructions on Haswell processors when available.", "CPU"); namespace xe { @@ -84,7 +84,7 @@ bool X64Backend::Initialize(Processor* processor) { } // Need movbe to do advanced LOAD/STORE tricks. - if (cvars::enable_haswell_instructions) { + if (cvars::use_haswell_instructions) { machine_info_.supports_extended_load_store = cpu.has(Xbyak::util::Cpu::tMOVBE); } else { diff --git a/src/xenia/cpu/backend/x64/x64_backend.h b/src/xenia/cpu/backend/x64/x64_backend.h index 432878373..d3036e875 100644 --- a/src/xenia/cpu/backend/x64/x64_backend.h +++ b/src/xenia/cpu/backend/x64/x64_backend.h @@ -15,7 +15,7 @@ #include "xenia/base/cvar.h" #include "xenia/cpu/backend/backend.h" -DECLARE_bool(enable_haswell_instructions); +DECLARE_bool(use_haswell_instructions); namespace xe { class Exception; diff --git a/src/xenia/cpu/backend/x64/x64_emitter.cc b/src/xenia/cpu/backend/x64/x64_emitter.cc index a66cba0f4..1d85cbe5f 100644 --- a/src/xenia/cpu/backend/x64/x64_emitter.cc +++ b/src/xenia/cpu/backend/x64/x64_emitter.cc @@ -33,7 +33,7 @@ #include "xenia/cpu/symbol.h" #include "xenia/cpu/thread_state.h" -DEFINE_bool(enable_debugprint_log, false, +DEFINE_bool(debugprint_trap_log, false, "Log debugprint traps to the active debugger", "CPU"); DEFINE_bool(ignore_undefined_externs, true, "Don't exit when an undefined extern is called.", "CPU"); @@ -70,7 +70,7 @@ X64Emitter::X64Emitter(X64Backend* backend, XbyakAllocator* allocator) backend_(backend), code_cache_(backend->code_cache()), allocator_(allocator) { - if (cvars::enable_haswell_instructions) { + if (cvars::use_haswell_instructions) { feature_flags_ |= cpu_.has(Xbyak::util::Cpu::tAVX2) ? kX64EmitAVX2 : 0; feature_flags_ |= cpu_.has(Xbyak::util::Cpu::tFMA) ? kX64EmitFMA : 0; feature_flags_ |= cpu_.has(Xbyak::util::Cpu::tLZCNT) ? kX64EmitLZCNT : 0; @@ -298,7 +298,7 @@ uint64_t TrapDebugPrint(void* raw_context, uint64_t address) { // TODO(benvanik): truncate to length? XELOGD("(DebugPrint) %s", str); - if (cvars::enable_debugprint_log) { + if (cvars::debugprint_trap_log) { debugging::DebugPrint("(DebugPrint) %s", str); } diff --git a/src/xenia/debug/ui/debug_window.cc b/src/xenia/debug/ui/debug_window.cc index 98bc5bd80..8ee6b4b91 100644 --- a/src/xenia/debug/ui/debug_window.cc +++ b/src/xenia/debug/ui/debug_window.cc @@ -33,7 +33,7 @@ #include "xenia/ui/graphics_provider.h" #include "xenia/ui/imgui_drawer.h" -DEFINE_bool(imgui_debug, false, "Show ImGui debugging tools.", "Other"); +DEFINE_bool(imgui_debug, false, "Show ImGui debugging tools.", "UI"); namespace xe { namespace debug { diff --git a/src/xenia/kernel/kernel_flags.cc b/src/xenia/kernel/kernel_flags.cc index 331552950..db10c2367 100644 --- a/src/xenia/kernel/kernel_flags.cc +++ b/src/xenia/kernel/kernel_flags.cc @@ -11,6 +11,6 @@ DEFINE_bool(headless, false, "Don't display any UI, using defaults for prompts as needed.", - "Other"); + "UI"); DEFINE_bool(log_high_frequency_kernel_calls, false, "Log kernel calls with the kHighFrequency tag.", "Kernel");