Skip to content

Commit

Permalink
設定ファイルの場所指定可能に
Browse files Browse the repository at this point in the history
  • Loading branch information
i-saint committed Aug 26, 2013
1 parent e0d88f3 commit 5556243
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DynamicPatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dpAPI bool dpInitialize(const dpConfig &conf)

dpConfigFile cf;
bool config_loaded = false;
if((conf.sys_flags&dpE_SysLoadConfig)!=0 && cf.load()) {
if((conf.sys_flags&dpE_SysLoadConfig)!=0 && (conf.configfile ? cf.load(conf.configfile) : cf.load())) {
config_loaded = true;
if(cf.log_flags!=-1) { g_dpConfig.log_flags=cf.log_flags; }
if(cf.sys_flags!=-1) { g_dpConfig.sys_flags=cf.sys_flags; }
Expand Down
4 changes: 3 additions & 1 deletion DynamicPatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ struct dpConfig
int log_flags; // combination of dpLogLevel
int sys_flags; // combination of dpSystemFlags
int vc_ver; // VisualC++ version to use to build. 2008/2010/2012
const char *configfile;
unsigned long long starttime;

dpConfig(int log=dpE_LogSimple, int f=dpE_SysDefault) : log_flags(log), sys_flags(f), vc_ver(0), starttime()
dpConfig(int log=dpE_LogSimple, int f=dpE_SysDefault, const char *config=NULL)
: log_flags(log), sys_flags(f), configfile(config), vc_ver(0), starttime()
{
#if _MSC_VER==1500
vc_ver = 2008;
Expand Down

0 comments on commit 5556243

Please sign in to comment.