Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // main.c
- // Hearthstone Configurator
- //
- // Created by Tomasz Kaczmarzyk on 09.10.2016.
- // Copyright � 2016 Tomasz Kaczmarzyk. All rights reserved.
- //
- #include <stdio.h>
- #include <stdlib.h>
- #include <sys/types.h>
- //#include <pwd.h>
- void editFile(char *options)
- {
- //if (access(options, F_OK) != -1)
- {
- //printf("File exists. Let's do this!\n");
- //fprintf(optionsFile, "fpslimit=144");
- }
- /*else
- {
- printf("File does not exist, please install Hearthstone\n");
- }*/
- }
- int main() {
- //struct passwd *passwdEnt = getpwuid(getuid());
- //char *home = passwdEnt->pw_dir;
- char *directory;
- char justValue = '0';
- while (justValue != '1' || justValue != '2' || justValue != '3')
- {
- printf("Choose your OS\nPlease choose the real one\n1. Windows\n2. MacOS \n3. Android\n");
- justValue = getchar();
- if (justValue == '1')
- {
- directory = "\aAppData\aLocal\aBlizzard\aHearthstone\aoptions.txt";
- break;
- }
- else if (justValue == '2')
- {
- directory = "/Library/Preferences/Blizzard/Hearthstone/optionsz.txt";
- break;
- }
- else if (justValue == '3')
- {
- directory = "/storage/emulated/0/Android/data/com.blizzard.wtcg.hearthstone/files/options.txt";
- break;
- }
- else
- {
- printf("Please choose correct number\n");
- }
- }
- //scanf("%s", directory);
- //printf("%s", directory);
- //sprintf(finalDirectory, "%s%s", &home, &directory);
- //strcat(home, directory);
- //editFile(home);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement