Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. diff --git a/QTfrontend/main.cpp b/QTfrontend/main.cpp
  2. --- a/QTfrontend/main.cpp
  3. +++ b/QTfrontend/main.cpp
  4. @@ -265,10 +265,10 @@
  5. checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars");
  6. cfgdir->cd("Library/Application Support/Hedgewars");
  7. #elif defined _WIN32
  8. - char path[1024];
  9. - if(!SHGetFolderPathA(0, CSIDL_PERSONAL, NULL, 0, path))
  10. + ushort path[MAX_PATH];
  11. + if(!SHGetFolderPathW(0, CSIDL_PERSONAL, NULL, 0, (LPWSTR)path))
  12. {
  13. - cfgdir->cd(path);
  14. + cfgdir->cd(QString::fromUtf16(path));
  15. checkForDir(cfgdir->absolutePath() + "/Hedgewars");
  16. cfgdir->cd("Hedgewars");
  17. }
  18. diff --git a/hedgewars/uPhysFSLayer.pas b/hedgewars/uPhysFSLayer.pas
  19. --- a/hedgewars/uPhysFSLayer.pas
  20. +++ b/hedgewars/uPhysFSLayer.pas
  21. @@ -137,7 +137,7 @@
  22.  
  23. procedure pfsMount(path: ansistring; mountpoint: PChar);
  24. begin
  25. - if PHYSFS_mount(PChar(path), mountpoint, false) then
  26. + if PHYSFS_mount(PChar(AnsiToUtf8(path)), mountpoint, false) then
  27. AddFileLog('[PhysFS] mount ' + shortstring(path) + ' at ' + shortstring(mountpoint) + ' : ok')
  28. else
  29. AddFileLog('[PhysFS] mount ' + shortstring(path) + ' at ' + shortstring(mountpoint) + ' : FAILED ("' + shortstring(PHYSFS_getLastError()) + '")');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement