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

@@ -9,4 +9,4 @@
#include "xenia/apu/apu_flags.h"
DEFINE_bool(mute, false, "Mutes all audio output.");
DEFINE_bool(mute, false, "Mutes all audio output.", "Audio")

View File

@@ -10,8 +10,7 @@
#ifndef XENIA_APU_APU_FLAGS_H_
#define XENIA_APU_APU_FLAGS_H_
#include <gflags/gflags.h>
DECLARE_bool(mute);
#include "xenia/base/cvar.h"
DECLARE_bool(mute)
#endif // XENIA_APU_APU_FLAGS_H_

View File

@@ -10,6 +10,4 @@
#ifndef XENIA_APU_NOP_NOP_APU_FLAGS_H_
#define XENIA_APU_NOP_NOP_APU_FLAGS_H_
#include <gflags/gflags.h>
#endif // XENIA_APU_NOP_NOP_APU_FLAGS_H_

View File

@@ -10,6 +10,4 @@
#ifndef XENIA_APU_XAUDIO2_XAUDIO2_APU_FLAGS_H_
#define XENIA_APU_XAUDIO2_XAUDIO2_APU_FLAGS_H_
#include <gflags/gflags.h>
#endif // XENIA_APU_XAUDIO2_XAUDIO2_APU_FLAGS_H_

View File

@@ -151,7 +151,7 @@ bool XAudio2AudioDriver::Initialize() {
return false;
}
if (FLAGS_mute) {
if (cvars::mute) {
pcm_voice_->SetVolume(0.0f);
}

View File

@@ -9,9 +9,8 @@
#include "xenia/apu/xma_decoder.h"
#include <gflags/gflags.h>
#include "xenia/apu/xma_context.h"
#include "xenia/base/cvar.h"
#include "xenia/base/logging.h"
#include "xenia/base/math.h"
#include "xenia/base/profiling.h"
@@ -49,7 +48,8 @@ extern "C" {
// do this, it's likely they are either passing the context to XAudio or
// using the XMA* functions.
DEFINE_bool(libav_verbose, false, "Verbose libav output (debug and above)");
DEFINE_bool(libav_verbose, false, "Verbose libav output (debug and above)",
"Audio");
namespace xe {
namespace apu {
@@ -60,7 +60,7 @@ XmaDecoder::XmaDecoder(cpu::Processor* processor)
XmaDecoder::~XmaDecoder() = default;
void av_log_callback(void* avcl, int level, const char* fmt, va_list va) {
if (!FLAGS_libav_verbose && level > AV_LOG_WARNING) {
if (!cvars::libav_verbose && level > AV_LOG_WARNING) {
return;
}