bool wxsResource::ReadConfig(const TiXmlElement* Node) { m_ResourceName = cbC2U(Node->Attribute("name")); m_Language = wxsCodeMarks::Id(cbC2U(Node->Attribute("language"))); if ( GetResourceName().empty() ) return false; return OnReadConfig(Node); }
void OneTweakConfig::ReadConfig() { _MESSAGE(__FUNCTION__); inifilename = FullPathFromPath("OneTweak.ini"); CSimpleIniA ini; ini.LoadFile(inifilename.c_str()); version = ini.GetLongValue("Version", "Config"); if (version != CONFIG_VERSION) { SaveConfig(&ini); } borderless.enabled = ini.GetBoolValue("Global", "BorderlessWindow"); double_cursor_fix.enabled = ini.GetBoolValue("Global", "DoubleCursorFix"); priority.enabled = ini.GetBoolValue("Global", "Priority"); if (priority.enabled) { DWORD id_fg = ini.GetLongValue("Priority", "Foreground"); DWORD id_bg = ini.GetLongValue("Priority", "Background"); priority.high = PriorityIdToClass(id_fg); priority.low = PriorityIdToClass(id_bg); } if (borderless.enabled) { borderless.active = ini.GetBoolValue("BorderlessWindow", "Active"); borderless.flags = ini.GetLongValue("BorderlessWindow", "StyleFlags"); borderless.flagsEx = ini.GetLongValue("BorderlessWindow", "StyleFlagsEx"); borderless.posX = ini.GetLongValue("BorderlessWindow", "WindowPosX"); borderless.posY = ini.GetLongValue("BorderlessWindow", "WindowPosY"); borderless.WindowWidth = ini.GetLongValue("BorderlessWindow", "WindowWidth"); borderless.WindowHeight = ini.GetLongValue("BorderlessWindow", "WindowHeight"); borderless.RenderWidth = ini.GetLongValue("BorderlessWindow", "RenderWidth"); borderless.RenderHeight = ini.GetLongValue("BorderlessWindow", "RenderHeight"); } directinput.nonexclusive = ini.GetBoolValue("DirectInput", "NonExclusive"); OnReadConfig(&ini); }