Skip to content

Commit

Permalink
Merge pull request #207 from walkero-gr/fix-repo-remove
Browse files Browse the repository at this point in the history
Fixed repo removal from the repos list
  • Loading branch information
walkero-gr authored May 13, 2023
2 parents b87b474 + 7658cb5 commit 64e7dda
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

## iGame 2.3.2 - [2023-04-20]
### Fixed
- Fixed a bug on repo removal, which remained in the repos list and was included in scans, unless the user restarted iGame

## iGame 2.3.2 - [2023-04-20]
### Fixed
- The custom screenshot sizes were wrongly saved. This is now fixed (#190)
- Fixed a duplication in slave names after the execution of a second scan in the same list, introduced in v2.3.0
- Fixed a crash on systems that use AutoUpdateWB patch. **HUGE THANKS to mfilos** for his testing, feedback and support up to late at nights
Expand Down
24 changes: 22 additions & 2 deletions src/funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,8 +1148,28 @@ void repo_add(void)

void repo_remove(void)
{
// TODO: If a repo is removed is not removed from the list
DoMethod(app->LV_GameRepositories, MUIM_List_Remove, MUIV_List_Remove_Active);
char *path = NULL;
DoMethod(app->LV_GameRepositories, MUIM_List_GetEntry, MUIV_List_GetEntry_Active, &path);

repos_list *prevRepo = NULL;
for (item_repos = repos; item_repos != NULL; item_repos = item_repos->next)
{
if (!strcmp(path, item_repos->repo))
{
if (prevRepo->repo)
{
prevRepo->next = item_repos->next;
}
else
{
repos = item_repos->next;
}
free(item_repos);
DoMethod(app->LV_GameRepositories, MUIM_List_Remove, MUIV_List_Remove_Active);
return;
}
prevRepo = item_repos;
}
}

/*
Expand Down

0 comments on commit 64e7dda

Please sign in to comment.