Skip to content

Commit

Permalink
add ERROR log for missing kick.rom file
Browse files Browse the repository at this point in the history
  • Loading branch information
Apaczer committed Sep 21, 2023
1 parent 7d1a24d commit f8c6e10
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
1 change: 0 additions & 1 deletion Makefile.miyoo
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,5 @@ almostclean:
clean:
$(RM) $(PROG) $(OBJS)
rm -rf $(RELEASEDIR)
rm -rf package
rm -f *.ipk
rm -f *.zip
32 changes: 32 additions & 0 deletions src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,22 @@ void loadConfig()
char *config = (char *)malloc(strlen(config_dir) + strlen("/uae4all.cfg") + 1);
extern char last_directory[PATH_MAX];

FILE *k;
char *kickrom = (char *)malloc(strlen(config_dir) + strlen("/kick.rom") + 1);
if (kickrom != NULL)
{
sprintf(kickrom, "%s/kick.rom", config_dir);
k = fopen(kickrom, "r");

if(k == NULL)
{
printf("ERROR - missing Kickstart ROM: \"%s\" file.\n", kickrom);
} else {
fclose(k);
}
free(kickrom);
}

if(config == NULL)
return;

Expand Down Expand Up @@ -173,6 +189,22 @@ void storeConfig()
char *config = (char *)malloc(strlen(config_dir) + strlen("/uae4all.cfg") + 1);
extern char last_directory[PATH_MAX];

FILE *k;
char *kickrom = (char *)malloc(strlen(config_dir) + strlen("/kick.rom") + 1);
if (kickrom != NULL)
{
sprintf(kickrom, "%s/kick.rom", config_dir);
k = fopen(kickrom, "r");

if(k == NULL)
{
printf("ERROR - missing Kickstart ROM: \"%s\" file.\n", kickrom);
} else {
fclose(k);
}
free(kickrom);
}

if(config == NULL)
return;

Expand Down

0 comments on commit f8c6e10

Please sign in to comment.