示例#1
0
void CSettingsMonitor::SettingChangedHandler(const CEvent& event) const
{
    p_assert(event.Size() == 2);
    auto settingHash = variant::get<hashed_string>(event[0]);
    auto it = m_settings.find(settingHash);
    if (it != m_settings.end())
        it->second.get().set(event[1]);
}
示例#2
0
 void AssetChangedHandler(const CEvent& event)
 {
     p_assert(event.Size() == 1);
     auto handle = variant::get<phandle_t>(event[0]);
     m_device->InvalidateHandle(handle);
 }