コード例 #1
0
ファイル: Config.cpp プロジェクト: Aced14/pcsx2
void LoadConf() {
	HKEY myKey;
	DWORD type, size;

	memset(&config, 0, sizeof(config));
	strcpy(config.Hdd, HDD_DEF);
	config.HddSize = 8 * 1024;
	strcpy(config.Eth, ETH_DEF);

	if (RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\PS2Eplugin\\DEV9\\DEV9linuz", 0, KEY_ALL_ACCESS, &myKey)!=ERROR_SUCCESS) {
		LoadIniConf();
		return;
	}
	printf("Importing Settings\n");
	//Import old settings if user has upgraded this plugin
	GetKeyV("Eth", config.Eth, sizeof(config.Eth), REG_SZ);
	GetKeyV("Hdd", config.Hdd, sizeof(config.Hdd), REG_SZ);
	GetKeyVdw("HddSize", &config.HddSize);
	GetKeyVdw("ethEnable", &config.ethEnable);
	GetKeyVdw("hddEnable", &config.hddEnable);

	RegCloseKey(myKey);
	SaveConf();
	DeleteRegConf();
}
コード例 #2
0
ファイル: Config.cpp プロジェクト: ACanadianKernel/pcsx2
void LoadConf() {
	HKEY myKey;
	DWORD type, size;

	memset(&config, 0, sizeof(config));
	strcpy(config.Hdd, HDD_DEF);
	config.HddSize=8*1024;
	strcpy(config.Eth, ETH_DEF);

	if (RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\PS2Eplugin\\DEV9\\DEV9linuz", 0, KEY_ALL_ACCESS, &myKey)!=ERROR_SUCCESS) {
		SaveConf(); return;
	}
	GetKeyV("Eth", config.Eth, sizeof(config.Eth), REG_SZ);
	GetKeyV("Hdd", config.Hdd, sizeof(config.Hdd), REG_SZ);
	GetKeyVdw("HddSize", &config.HddSize);
	GetKeyVdw("ethEnable", &config.ethEnable);
	GetKeyVdw("hddEnable", &config.hddEnable);

	RegCloseKey(myKey);
}
コード例 #3
0
ファイル: Config.cpp プロジェクト: Dyndrilliac/pcsx2
void LoadConf()
{
    HKEY myKey;
    DWORD type, size;

    memset(IsoFile, 0, sizeof(IsoFile));

    if (RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\PS2Eplugin\\CDVD\\CDVDiso", 0, KEY_ALL_ACCESS, &myKey) != ERROR_SUCCESS) {
        SaveConf();
        return;
    }

    GetKeyV("IsoFile", IsoFile, sizeof(IsoFile), REG_BINARY);
    GetKeyV("CurrentWorkingFolder", IsoCWD, sizeof(IsoCWD), REG_BINARY);
    GetKeyVdw("BlockDump", &BlockDump);

    RegCloseKey(myKey);
}