mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Add ability to set libpbd debug options via PBD_DEBUG environment var
This commit is contained in:
parent
9eb8b73b43
commit
d360bc3906
1 changed files with 16 additions and 0 deletions
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#include <fcntl.h>
|
||||
|
|
@ -43,6 +44,19 @@ static bool libpbd_initialized = false;
|
|||
|
||||
}
|
||||
|
||||
void
|
||||
set_debug_options_from_env ()
|
||||
{
|
||||
bool set;
|
||||
std::string options;
|
||||
|
||||
options = Glib::getenv ("PBD_DEBUG", set);
|
||||
if (set) {
|
||||
std::cerr << "PBD_DEBUG=" << options << std::endl;
|
||||
PBD::parse_debug_options (options.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
PBD::init ()
|
||||
{
|
||||
|
|
@ -66,6 +80,8 @@ PBD::init ()
|
|||
|
||||
setup_libpbd_enums ();
|
||||
|
||||
set_debug_options_from_env ();
|
||||
|
||||
libpbd_initialized = true;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue