Skip to content

Commit

Permalink
🎨 apply clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
schmurtzm committed Dec 13, 2023
1 parent 004ede1 commit 8451a98
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/bootScreen/bootScreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/common/system/screenshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions src/common/utils/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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");
Expand All @@ -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) {
Expand Down Expand Up @@ -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);
}
Expand All @@ -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");
}

12 changes: 7 additions & 5 deletions src/gameSwitcher/listMigration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -88,7 +89,8 @@ char *extractAllSubfoldersFromRomPath(const char *path) {
subfolders[pathLength] = '\0';

return subfolders;
} else {
}
else {
return NULL;
}
}
Expand Down Expand Up @@ -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));

Expand All @@ -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);

Expand All @@ -210,7 +212,7 @@ void buildRecentFile()
}

if (!is_file(imgPath))
strcpy(imgPath, "");
strcpy(imgPath, "");

char launchPath[STR_MAX];

Expand Down
6 changes: 5 additions & 1 deletion src/keymon/menuButtonAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/sendkeys/sendkeys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8451a98

Please sign in to comment.