/win32/shellext/ThgDebug.cpp

https://bitbucket.org/tortoisehg/hgtk/ · C++ · 22 lines · 12 code · 4 blank · 6 comment · 3 complexity · a8cb78983371fa528b1652bfb75b12ed MD5 · raw file

  1. // Copyright (C) 2009 Adrian Buehlmann
  2. //
  3. // This program is free software: you can redistribute it and/or modify
  4. // it under the terms of the GNU General Public License as published by
  5. // the Free Software Foundation, either version 2 of the License, or
  6. // (at your option) any later version.
  7. #include "ThgDebug.h"
  8. #include "RegistryConfig.h"
  9. bool ThgDebug::regDebugShellExt()
  10. {
  11. std::string val;
  12. return GetRegistryConfig("DebugShellExt", val) != 0 && val == "1";
  13. }
  14. bool ThgDebug::enabled()
  15. {
  16. static bool e = regDebugShellExt();
  17. return e;
  18. }