本文整理汇总了C++中IniInterface::IsSaving方法的典型用法代码示例。如果您正苦于以下问题:C++ IniInterface::IsSaving方法的具体用法?C++ IniInterface::IsSaving怎么用?C++ IniInterface::IsSaving使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IniInterface
的用法示例。
在下文中一共展示了IniInterface::IsSaving方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: path
void AppConfig::FilenameOptions::LoadSave( IniInterface& ini )
{
ScopedIniGroup path( ini, L"Filenames" );
static const wxFileName pc( L"Please Configure" );
//when saving in portable mode, we just save the non-full-path filename
// --> on load they'll be initialized with default (relative) paths (works both for plugins and bios)
//note: this will break if converting from install to portable, and custom folders are used. We can live with that.
bool needRelativeName = ini.IsSaving() && IsPortable();
for( int i=0; i<PluginId_Count; ++i )
{
if ( needRelativeName ) {
wxFileName plugin_filename = wxFileName( Plugins[i].GetFullName() );
ini.Entry( tbl_PluginInfo[i].GetShortname(), plugin_filename, pc );
} else
ini.Entry( tbl_PluginInfo[i].GetShortname(), Plugins[i], pc );
}
if( needRelativeName ) {
wxFileName bios_filename = wxFileName( Bios.GetFullName() );
ini.Entry( L"BIOS", bios_filename, pc );
} else
ini.Entry( L"BIOS", Bios, pc );
}
示例2: ConLog_LoadSaveSettings
void ConLog_LoadSaveSettings( IniInterface& ini )
{
ScopedIniGroup path(ini, L"ConsoleLogSources");
ini.Entry( L"Devel", DevConWriterEnabled, false );
uint srcnt = ArraySize(ConLogSources);
for (uint i=0; i<srcnt; ++i)
{
if (ConsoleLogSource* log = ConLogSources[i])
{
// IsSaving() is for clarity only, since log->Enabled initial value is ignored when loading.
if (ini.IsSaving() && !ConLogInitialized)
log->Enabled = ConLogDefaults[i];
ini.Entry( log->GetCategory() + L"." + log->GetShortName(), log->Enabled, ConLogDefaults[i] );
}
}
ConLogInitialized = true;
}
示例3: App_LoadSaveInstallSettings
// ------------------------------------------------------------------------
void App_LoadSaveInstallSettings( IniInterface& ini )
{
// Portable installs of PCSX2 should not save any of the following information to
// the INI file. Only the Run First Time Wizard option is saved, and that's done
// from EstablishAppUserMode code. All other options have assumed (fixed) defaults in
// portable mode which cannot be changed/saved.
// Note: Settins are still *loaded* from portable.ini, in case the user wants to do
// low-level overrides of the default behavior of portable mode installs.
if (ini.IsSaving() && (InstallationMode == InstallMode_Portable)) return;
static const wxChar* DocsFolderModeNames[] =
{
L"User",
L"Custom",
// WARNING: array must be NULL terminated to compute it size
NULL
};
ini.EnumEntry( L"DocumentsFolderMode", DocsFolderMode, DocsFolderModeNames, (InstallationMode == InstallMode_Registered) ? DocsFolder_User : DocsFolder_Custom);
ini.Entry( L"CustomDocumentsFolder", CustomDocumentsFolder, PathDefs::AppRoot() );
ini.Entry( L"UseDefaultSettingsFolder", UseDefaultSettingsFolder, true );
ini.Entry( L"SettingsFolder", SettingsFolder, PathDefs::GetSettings() );
// "Install_Dir" conforms to the NSIS standard install directory key name.
// Attempt to load plugins and themes based on the Install Folder.
ini.Entry( L"Install_Dir", InstallFolder, (wxDirName)(wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath()) );
SetFullBaseDir( InstallFolder );
//ini.Entry( L"PluginsFolder", PluginsFolder, InstallFolder + PathDefs::Base::Plugins() );
ini.Entry( L"ThemesFolder", ThemesFolder, InstallFolder + PathDefs::Base::Themes() );
ini.Flush();
}
示例4: AppSettingsEventInfo
void Pcsx2App::DispatchVmSettingsEvent( IniInterface& ini )
{
if( !AffinityAssert_AllowFrom_MainUI() ) return;
m_evtsrc_AppStatus.Dispatch( AppSettingsEventInfo( ini, ini.IsSaving() ? AppStatus_VmSettingsSaved : AppStatus_VmSettingsLoaded ) );
}