mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-28 08:20:54 +01:00
Broke out common setting strings into #defines to ensure consistency
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@210 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
f07292b266
commit
db42da3850
@ -18,6 +18,10 @@ void DefaultSettings(LPSETTINGS pSettings)
|
||||
pSettings->fadedelayseconds = 0;
|
||||
}
|
||||
|
||||
#define LOOPCOUNT_NAME "loopcount"
|
||||
#define FADESECOND_NAME "fadeseconds"
|
||||
#define FADEDELAYSECOND_NAME "fadedelayseconds"
|
||||
|
||||
int LoadSettings(LPSETTINGS pSettings)
|
||||
{
|
||||
ConfigDb *cfg = GetConfigFile();
|
||||
@ -27,9 +31,9 @@ int LoadSettings(LPSETTINGS pSettings)
|
||||
}
|
||||
else
|
||||
{
|
||||
int bRet = (aud_cfg_db_get_int(cfg,CUBE_CONFIG_TAG,"loopcount",&pSettings->loopcount) &&
|
||||
aud_cfg_db_get_int(cfg,CUBE_CONFIG_TAG,"fadeseconds",&pSettings->fadeseconds) &&
|
||||
aud_cfg_db_get_int(cfg,CUBE_CONFIG_TAG,"fadedelayseconds",&pSettings->fadedelayseconds));
|
||||
int bRet = (aud_cfg_db_get_int(cfg,CUBE_CONFIG_TAG,LOOPCOUNT_NAME,&pSettings->loopcount) &&
|
||||
aud_cfg_db_get_int(cfg,CUBE_CONFIG_TAG,FADESECOND_NAME,&pSettings->fadeseconds) &&
|
||||
aud_cfg_db_get_int(cfg,CUBE_CONFIG_TAG,FADEDELAYSECOND_NAME,&pSettings->fadedelayseconds));
|
||||
|
||||
aud_cfg_db_close(cfg);
|
||||
|
||||
@ -46,9 +50,9 @@ int SaveSettings(LPSETTINGS pSettings)
|
||||
if (!cfg)
|
||||
return 0;
|
||||
|
||||
aud_cfg_db_set_int(cfg,CUBE_CONFIG_TAG,"loopcount",pSettings->loopcount);
|
||||
aud_cfg_db_set_int(cfg,CUBE_CONFIG_TAG,"fadeseconds",pSettings->fadeseconds);
|
||||
aud_cfg_db_set_int(cfg,CUBE_CONFIG_TAG,"fadedelayseconds",pSettings->fadedelayseconds);
|
||||
aud_cfg_db_set_int(cfg,CUBE_CONFIG_TAG,LOOPCOUNT_NAME,pSettings->loopcount);
|
||||
aud_cfg_db_set_int(cfg,CUBE_CONFIG_TAG,FADESECOND_NAME,pSettings->fadeseconds);
|
||||
aud_cfg_db_set_int(cfg,CUBE_CONFIG_TAG,FADEDELAYSECOND_NAME,pSettings->fadedelayseconds);
|
||||
|
||||
aud_cfg_db_close(cfg);
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user