Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 162815
Collapse All | Expand All

(-)src/conf.c.orig (-6 / +2 lines)
Lines 183-189 Link Here
183
183
184
void LoadConf() {
184
void LoadConf() {
185
	FILE *f;
185
	FILE *f;
186
	char cfg[255];
187
	char header[32];
186
	char header[32];
188
187
189
	memset(&conf, 0, sizeof(conf));
188
	memset(&conf, 0, sizeof(conf));
Lines 202-209 Link Here
202
	conf.keys[0][14] = XK_x;			// Cross
201
	conf.keys[0][14] = XK_x;			// Cross
203
	conf.keys[0][15] = XK_a;			// Square
202
	conf.keys[0][15] = XK_a;			// Square
204
203
205
	sprintf(cfg, "%s/padXwin.cfg", getenv("HOME"));
204
	f = fopen("cfg/padXwin.cfg", "r");
206
	f = fopen(cfg, "r");
207
	if (f == NULL) return;
205
	if (f == NULL) return;
208
	fread(header, 1, 32, f);
206
	fread(header, 1, 32, f);
209
	if (strcmp(header, CfgHeader)) {
207
	if (strcmp(header, CfgHeader)) {
Lines 218-227 Link Here
218
216
219
void SaveConf() {
217
void SaveConf() {
220
	FILE *f;
218
	FILE *f;
221
	char cfg[255];
222
219
223
	sprintf(cfg, "%s/padXwin.cfg", getenv("HOME"));
220
	f = fopen("cfg/padXwin.cfg", "w");
224
	f = fopen(cfg, "w");
225
	if (f == NULL) return;
221
	if (f == NULL) return;
226
	fwrite(CfgHeader, 1, 32, f);
222
	fwrite(CfgHeader, 1, 32, f);
227
	fwrite(&conf, 1, sizeof(conf), f);
223
	fwrite(&conf, 1, sizeof(conf), f);

Return to bug 162815