DeveloperConfigGroup.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /** (c) Nullsoft, Inc. C O N F I D E N T I A L
  2. ** Filename:
  3. ** Project:
  4. ** Description:
  5. ** Author: Ben Allison [email protected]
  6. ** Created:
  7. **/
  8. #include "main.h"
  9. #include "DeveloperConfigGroup.h"
  10. #include "../Agave/Config/ifc_configitem.h"
  11. #include "WinampAttributes.h"
  12. class MaskBoolConfigItem : public ifc_configitem
  13. {
  14. public:
  15. MaskBoolConfigItem(int _mask) : mask(_mask) {}
  16. bool GetBool()
  17. {
  18. return !!(config_no_visseh&mask);
  19. }
  20. protected:
  21. RECVS_DISPATCH;
  22. private:
  23. int mask;
  24. };
  25. #define CBCLASS MaskBoolConfigItem
  26. START_DISPATCH;
  27. CB(IFC_CONFIGITEM_GETBOOL, GetBool)
  28. END_DISPATCH;
  29. #undef CBCLASS
  30. static MaskBoolConfigItem sehVisItem(1), sehDSPItem(2), sehGenItem(4), sehIEItem(8);
  31. ifc_configitem *DeveloperConfigGroup::GetItem(const wchar_t *name)
  32. {
  33. if (!wcscmp(name, L"no_visseh"))
  34. return &sehVisItem;
  35. else if (!wcscmp(name, L"no_dspseh"))
  36. return &sehDSPItem;
  37. else if (!wcscmp(name, L"no_genseh"))
  38. return &sehGenItem;
  39. else if (!wcscmp(name, L"no_ieseh"))
  40. return &sehIEItem;
  41. return 0;
  42. }
  43. #define CBCLASS DeveloperConfigGroup
  44. START_DISPATCH;
  45. CB(IFC_CONFIGGROUP_GETITEM, GetItem)
  46. CB(IFC_CONFIGGROUP_GETGUID, GetGUID)
  47. END_DISPATCH;
  48. #undef CBCLASS