| 351 | #endif |
| 352 | |
| 353 | void LoadOptions() |
| 354 | { |
| 355 | for (OptionCategoryBase *pCategory : sgOptions.GetCategories()) { |
| 356 | for (OptionEntryBase *pEntry : pCategory->GetEntries()) { |
| 357 | pEntry->LoadFromIni(pCategory->GetKey()); |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | GetIniValue("Hellfire", "SItem", sgOptions.Hellfire.szItem, sizeof(sgOptions.Hellfire.szItem), ""); |
| 362 | |
| 363 | GetIniValue("Network", "Bind Address", sgOptions.Network.szBindAddress, sizeof(sgOptions.Network.szBindAddress), "0.0.0.0"); |
| 364 | GetIniValue("Network", "Previous Game ID", sgOptions.Network.szPreviousZTGame, sizeof(sgOptions.Network.szPreviousZTGame), ""); |
| 365 | GetIniValue("Network", "Previous Host", sgOptions.Network.szPreviousHost, sizeof(sgOptions.Network.szPreviousHost), ""); |
| 366 | |
| 367 | for (size_t i = 0; i < QUICK_MESSAGE_OPTIONS; i++) |
| 368 | GetIniStringVector("NetMsg", QuickMessages[i].key, sgOptions.Chat.szHotKeyMsgs[i]); |
| 369 | |
| 370 | GetIniValue("Controller", "Mapping", sgOptions.Controller.szMapping, sizeof(sgOptions.Controller.szMapping), ""); |
| 371 | sgOptions.Controller.fDeadzone = GetIniFloat("Controller", "deadzone", 0.07F); |
| 372 | #ifdef __vita__ |
| 373 | sgOptions.Controller.bRearTouch = GetIniBool("Controller", "Enable Rear Touchpad", true); |
| 374 | #endif |
| 375 | |
| 376 | if (demo::IsRunning()) |
| 377 | demo::OverrideOptions(); |
| 378 | } |
| 379 | |
| 380 | void SaveOptions() |
| 381 | { |