309 #ifdef __APPLE__ |
309 #ifdef __APPLE__ |
310 if (checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars")) |
310 if (checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars")) |
311 { |
311 { |
312 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos"); |
312 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Demos"); |
313 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Saves"); |
313 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Saves"); |
|
314 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Screenshots"); |
314 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Teams"); |
315 checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars/Teams"); |
315 } |
316 } |
316 cfgdir->cd("Library/Application Support/Hedgewars"); |
317 cfgdir->cd("Library/Application Support/Hedgewars"); |
317 #elif defined _WIN32 |
318 #elif defined _WIN32 |
318 char path[1024]; |
319 char path[1024]; |
321 cfgdir->cd(path); |
322 cfgdir->cd(path); |
322 if (checkForDir(cfgdir->absolutePath() + "/Hedgewars")) |
323 if (checkForDir(cfgdir->absolutePath() + "/Hedgewars")) |
323 { |
324 { |
324 checkForDir(cfgdir->absolutePath() + "/Hedgewars/Demos"); |
325 checkForDir(cfgdir->absolutePath() + "/Hedgewars/Demos"); |
325 checkForDir(cfgdir->absolutePath() + "/Hedgewars/Saves"); |
326 checkForDir(cfgdir->absolutePath() + "/Hedgewars/Saves"); |
|
327 checkForDir(cfgdir->absolutePath() + "/Hedgewars/Screenshots"); |
326 checkForDir(cfgdir->absolutePath() + "/Hedgewars/Teams"); |
328 checkForDir(cfgdir->absolutePath() + "/Hedgewars/Teams"); |
327 } |
329 } |
328 cfgdir->cd("Hedgewars"); |
330 cfgdir->cd("Hedgewars"); |
329 } |
331 } |
330 else |
332 else |
331 { |
333 { |
332 if (checkForDir(cfgdir->absolutePath() + "/.hedgewars")) |
334 if (checkForDir(cfgdir->absolutePath() + "/.hedgewars")) |
333 { |
335 { |
334 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos"); |
336 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos"); |
335 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Saves"); |
337 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Saves"); |
|
338 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Screenshots"); |
336 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Teams"); |
339 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Teams"); |
337 } |
340 } |
338 cfgdir->cd(".hedgewars"); |
341 cfgdir->cd(".hedgewars"); |
339 } |
342 } |
340 #else |
343 #else |
341 if (checkForDir(cfgdir->absolutePath() + "/.hedgewars")) |
344 if (checkForDir(cfgdir->absolutePath() + "/.hedgewars")) |
342 { |
345 { |
343 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos"); |
346 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Demos"); |
344 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Saves"); |
347 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Saves"); |
|
348 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Screenshots"); |
345 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Teams"); |
349 checkForDir(cfgdir->absolutePath() + "/.hedgewars/Teams"); |
346 } |
350 } |
347 cfgdir->cd(".hedgewars"); |
351 cfgdir->cd(".hedgewars"); |
348 #endif |
352 #endif |
349 } |
353 } |