aboutsummaryrefslogtreecommitdiff
path: root/Src/Winamp/DeveloperConfigGroup.cpp
blob: 84e6a2ebd8fef653fd9237017d703c0e28a9d93f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/** (c) Nullsoft, Inc.         C O N F I D E N T I A L
 ** Filename: 
 ** Project:
 ** Description:
 ** Author: Ben Allison benski@nullsoft.com
 ** Created:
 **/
#include "main.h"
#include "DeveloperConfigGroup.h"

#include "../Agave/Config/ifc_configitem.h"
#include "WinampAttributes.h"

class MaskBoolConfigItem : public ifc_configitem
{
public:
	MaskBoolConfigItem(int _mask) : mask(_mask) {}
	bool GetBool()
	{
		return !!(config_no_visseh&mask);
	}
protected:
	RECVS_DISPATCH;

private:
	int mask;
};

#define CBCLASS MaskBoolConfigItem
START_DISPATCH;
CB(IFC_CONFIGITEM_GETBOOL, GetBool)
END_DISPATCH;
#undef CBCLASS

static MaskBoolConfigItem sehVisItem(1), sehDSPItem(2), sehGenItem(4), sehIEItem(8);

ifc_configitem *DeveloperConfigGroup::GetItem(const wchar_t *name)
{
	if (!wcscmp(name, L"no_visseh"))
		return &sehVisItem;
	else if (!wcscmp(name, L"no_dspseh"))
		return &sehDSPItem;
	else if (!wcscmp(name, L"no_genseh"))
		return &sehGenItem;
	else if (!wcscmp(name, L"no_ieseh"))
		return &sehIEItem;

	return 0;
}


#define CBCLASS DeveloperConfigGroup
START_DISPATCH;
CB(IFC_CONFIGGROUP_GETITEM, GetItem)
CB(IFC_CONFIGGROUP_GETGUID, GetGUID)
END_DISPATCH;
#undef CBCLASS