Advertisement
erzis

Untitled

Oct 12th, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. //
  2. // main.c
  3. // Hearthstone Configurator
  4. //
  5. // Created by Tomasz Kaczmarzyk on 09.10.2016.
  6. // Copyright � 2016 Tomasz Kaczmarzyk. All rights reserved.
  7. //
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <sys/types.h>
  11. //#include <pwd.h>
  12.  
  13.  
  14. void editFile(char *options)
  15. {
  16. //if (access(options, F_OK) != -1)
  17. {
  18.  
  19. //printf("File exists. Let's do this!\n");
  20. //fprintf(optionsFile, "fpslimit=144");
  21. }
  22. /*else
  23. {
  24. printf("File does not exist, please install Hearthstone\n");
  25. }*/
  26.  
  27. }
  28.  
  29. int main() {
  30. //struct passwd *passwdEnt = getpwuid(getuid());
  31. //char *home = passwdEnt->pw_dir;
  32. char *directory;
  33. char justValue = '0';
  34. while (justValue != '1' || justValue != '2' || justValue != '3')
  35. {
  36. printf("Choose your OS\nPlease choose the real one\n1. Windows\n2. MacOS \n3. Android\n");
  37. justValue = getchar();
  38. if (justValue == '1')
  39. {
  40. directory = "\aAppData\aLocal\aBlizzard\aHearthstone\aoptions.txt";
  41. break;
  42. }
  43. else if (justValue == '2')
  44. {
  45. directory = "/Library/Preferences/Blizzard/Hearthstone/optionsz.txt";
  46. break;
  47. }
  48. else if (justValue == '3')
  49. {
  50. directory = "/storage/emulated/0/Android/data/com.blizzard.wtcg.hearthstone/files/options.txt";
  51. break;
  52. }
  53. else
  54. {
  55. printf("Please choose correct number\n");
  56. }
  57. }
  58.  
  59. //scanf("%s", directory);
  60. //printf("%s", directory);
  61. //sprintf(finalDirectory, "%s%s", &home, &directory);
  62. //strcat(home, directory);
  63. //editFile(home);
  64. return 0;
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement