MCPcopy Create free account
hub / github.com/bbbradsmith/nsfplay / Reset

Method Reset

nsfplug_ui/PresetManager.cpp:19–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17};
18
19void PresetManager::Reset(const CString &filepath)
20{
21 path = filepath;
22
23 char buf[128*64+2];
24 GetPrivateProfileSectionNames(buf,128*64+2,path);
25
26 CString name;
27 char *p = buf;
28 std::set<CString> sects;
29
30 while(1)
31 {
32 name = "";
33
34 while(*p!='\0')
35 name.AppendChar(*p++);
36 p++;
37
38 if(name == "") break;
39
40 if(name.Left(6)=="PRESET")
41 sects.insert(name);
42 }
43
44 presetSect2Name.clear();
45 presetName2Sect.clear();
46
47 std::set<CString>::iterator it;
48 for(it=sects.begin();it!=sects.end();it++)
49 {
50 GetPrivateProfileString((*it),"NAME","ERROR",buf,128,path);
51 presetName2Sect[(CString)buf]=(*it);
52 presetSect2Name[(*it)] = (CString)buf;
53 }
54}
55
56bool
57PresetManager::CreatePreset( xgm::NSFPlayerConfigIni *cfg, const CString &name )

Callers

nothing calls this directly

Calls 3

insertMethod · 0.80
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected