Added VLDebugFlags

This commit is contained in:
Matthias Neeracher 2007-08-18 16:12:51 +00:00
parent c9d56d01b2
commit a8a0d07295
2 changed files with 46 additions and 0 deletions

22
Sources/VLDebugFlags.cpp Normal file
View File

@ -0,0 +1,22 @@
//
// File: VLDebugFlags.cpp - Runtime debugging flags
//
// Author(s):
//
// (MN) Matthias Neeracher
//
// Copyright © 2007 Matthias Neeracher
//
#include "VLDebugFlags.h"
#include <stdlib.h>
uint32_t VLDebugFlags::sFlags = 0;
void VLDebugFlags::Update()
{
const char * dbg = getenv("VOCALEASEL_DEBUG");
if (dbg)
sFlags = atoi(dbg);
}

24
Sources/VLDebugFlags.h Normal file
View File

@ -0,0 +1,24 @@
//
// File: VLDebugFlags.h - Runtime debugging flags
//
// Author(s):
//
// (MN) Matthias Neeracher
//
// Copyright © 2007 Matthias Neeracher
//
#include <stdint.h>
class VLDebugFlags {
public:
static void Update();
static bool ShowDebugMenu() { return sFlags & 1; }
private:
static uint32_t sFlags;
};
// Local Variables:
// mode:C++
// End: