diff --git a/src/bootScreen/bootScreen.c b/src/bootScreen/bootScreen.c index e1399e08a8..c1a731d4aa 100644 --- a/src/bootScreen/bootScreen.c +++ b/src/bootScreen/bootScreen.c @@ -25,7 +25,7 @@ int main(int argc, char *argv[]) char theme_path[STR_MAX]; theme_getPath(theme_path); - SDL_Surface *video = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE ); + SDL_Surface *video = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE); SDL_Surface *screen = SDL_CreateRGBSurface(SDL_HWSURFACE, 640, 480, 32, 0, 0, 0, 0); SDL_Surface *background; diff --git a/src/common/system/screenshot.h b/src/common/system/screenshot.h index 3f34aa7b67..b5b841a51e 100644 --- a/src/common/system/screenshot.h +++ b/src/common/system/screenshot.h @@ -19,11 +19,10 @@ bool __get_path_romscreen(char *path_out) char filename[STR_MAX]; char file_path[STR_MAX]; - if (history_getRecentPath(file_path) != NULL) { sprintf(filename, "%" PRIu32, FNV1A_Pippip_Yurii(file_path, strlen(file_path))); } -print_debug(file_path); + print_debug(file_path); if (strlen(filename) > 0) { sprintf(path_out, "/mnt/SDCARD/Saves/CurrentProfile/romScreens/%s.png", filename); return true; diff --git a/src/common/utils/file.c b/src/common/utils/file.c index 013e0c21cf..1a806e9531 100644 --- a/src/common/utils/file.c +++ b/src/common/utils/file.c @@ -340,7 +340,7 @@ FILE *file_open_ensure_path(const char *path, const char *mode) char *file_read_lineN(const char *filename, int n) { - char line[STR_MAX*4]; + char line[STR_MAX * 4]; int lineNumber = 1; FILE *file = fopen(filename, "r"); if (file == NULL) { @@ -366,8 +366,9 @@ char *file_read_lineN(const char *filename, int n) return NULL; } -void file_delete_line(const char *fileName, int n){ - +void file_delete_line(const char *fileName, int n) +{ + FILE *file = fopen(fileName, "r"); if (file == NULL) { print_debug("Error opening file"); @@ -381,7 +382,7 @@ void file_delete_line(const char *fileName, int n){ return; } - char line[STR_MAX*4]; + char line[STR_MAX * 4]; int lineNumber = 1; while (fgets(line, sizeof(line), file) != NULL) { @@ -425,7 +426,7 @@ void file_add_line_to_beginning(const char *filename, const char *lineToAdd) } fputs(lineToAdd, tempFile); - char line[STR_MAX*4]; + char line[STR_MAX * 4]; while (fgets(line, sizeof(line), file) != NULL) { fputs(line, tempFile); } @@ -441,4 +442,3 @@ void file_add_line_to_beginning(const char *filename, const char *lineToAdd) } print_debug("Line added to the beginning of the file successfully.\n"); } - diff --git a/src/gameSwitcher/listMigration.h b/src/gameSwitcher/listMigration.h index 61f7e008be..0cf2887760 100644 --- a/src/gameSwitcher/listMigration.h +++ b/src/gameSwitcher/listMigration.h @@ -69,7 +69,8 @@ char *extractConsoleNameFromRomPath(const char *path) } // Function to extract all subfolders to the right of "/mnt/SDCARD/Roms" -char *extractAllSubfoldersFromRomPath(const char *path) { +char *extractAllSubfoldersFromRomPath(const char *path) +{ const char *base = "/mnt/SDCARD/Roms/"; const char *startOfDir = strstr(path, base); @@ -88,7 +89,8 @@ char *extractAllSubfoldersFromRomPath(const char *path) { subfolders[pathLength] = '\0'; return subfolders; - } else { + } + else { return NULL; } } @@ -179,7 +181,7 @@ void buildRecentFile() game->core); printf_debug("oldPicturePath : %s\n", oldPicturePath); - char imgPath[STR_MAX*2]; + char imgPath[STR_MAX * 2]; char console_folder[10]; sprintf(console_folder, extractConsoleNameFromRomPath(game->path)); @@ -189,7 +191,7 @@ void buildRecentFile() // miyoo boxart png path sprintf(imgPath, "/mnt/SDCARD/Emu/%s/../../Roms/%s/Imgs/%s.png", console_folder, all_subs, file_removeExtension(basename(game->path))); - char tempString[STR_MAX*2]; + char tempString[STR_MAX * 2]; sprintf(tempString, "/mnt/SDCARD/Emu/%s/../../Roms/%s/%s", console_folder, all_subs, basename(game->path)); strcpy(game->path, tempString); @@ -210,7 +212,7 @@ void buildRecentFile() } if (!is_file(imgPath)) - strcpy(imgPath, ""); + strcpy(imgPath, ""); char launchPath[STR_MAX]; diff --git a/src/keymon/menuButtonAction.h b/src/keymon/menuButtonAction.h index 6ea9eab36b..8ac637299a 100644 --- a/src/keymon/menuButtonAction.h +++ b/src/keymon/menuButtonAction.h @@ -160,7 +160,11 @@ void action_RA_gameSwitcher(void) terminate_retroarch(); } -void action_RA_exitToMenu(void) { screenshot_system(); terminate_retroarch(); } +void action_RA_exitToMenu(void) +{ + screenshot_system(); + terminate_retroarch(); +} void action_RA_quickSwitch(void) { diff --git a/src/sendkeys/sendkeys.c b/src/sendkeys/sendkeys.c index 288ef4b44a..e635b7f9d2 100644 --- a/src/sendkeys/sendkeys.c +++ b/src/sendkeys/sendkeys.c @@ -27,10 +27,10 @@ int main(int argc, char *argv[]) int input_fd; input_fd = open("/dev/input/event0", O_WRONLY); - + for (int j = 0; j < num_events; j++) { printf_debug("sendkeys: code = %d, value = %d\n", events[j].code, - events[j].value); + events[j].value); write(input_fd, &events[j], sizeof(events[j])); } close(input_fd);