Replace all gflag implementations with cvar implementations

This commit is contained in:
Jonathan Goyvaerts
2019-04-17 21:49:29 +02:00
parent a01908aa15
commit c1af632562
74 changed files with 345 additions and 375 deletions

View File

@@ -113,7 +113,7 @@ X_STATUS GraphicsSystem::Setup(cpu::Processor* processor,
vsync_worker_running_ = true;
vsync_worker_thread_ = kernel::object_ref<kernel::XHostThread>(
new kernel::XHostThread(kernel_state_, 128 * 1024, 0, [this]() {
uint64_t vsync_duration = FLAGS_vsync ? 16 : 1;
uint64_t vsync_duration = cvars::vsync ? 16 : 1;
uint64_t last_frame_time = Clock::QueryGuestTickCount();
while (vsync_worker_running_) {
uint64_t current_time = Clock::QueryGuestTickCount();
@@ -132,7 +132,7 @@ X_STATUS GraphicsSystem::Setup(cpu::Processor* processor,
vsync_worker_thread_->set_name("GraphicsSystem Vsync");
vsync_worker_thread_->Create();
if (FLAGS_trace_gpu_stream) {
if (cvars::trace_gpu_stream) {
BeginTracing();
}
@@ -270,11 +270,12 @@ void GraphicsSystem::ClearCaches() {
}
void GraphicsSystem::RequestFrameTrace() {
command_processor_->RequestFrameTrace(xe::to_wstring(FLAGS_trace_gpu_prefix));
command_processor_->RequestFrameTrace(
xe::to_wstring(cvars::trace_gpu_prefix));
}
void GraphicsSystem::BeginTracing() {
command_processor_->BeginTracing(xe::to_wstring(FLAGS_trace_gpu_prefix));
command_processor_->BeginTracing(xe::to_wstring(cvars::trace_gpu_prefix));
}
void GraphicsSystem::EndTracing() { command_processor_->EndTracing(); }