| 663 | } |
| 664 | |
| 665 | void FetchFlagsTask_Add(const struct ServerInfo* server) { |
| 666 | int i; |
| 667 | for (i = 0; i < flagsCount; i++) |
| 668 | { |
| 669 | if (flags[i].country[0] != server->country[0]) continue; |
| 670 | if (flags[i].country[1] != server->country[1]) continue; |
| 671 | /* flag is already or will be downloaded */ |
| 672 | return; |
| 673 | } |
| 674 | FetchFlagsTask_Ensure(); |
| 675 | |
| 676 | Bitmap_Init(flags[flagsCount].bmp, 0, 0, NULL); |
| 677 | flags[flagsCount].country[0] = server->country[0]; |
| 678 | flags[flagsCount].country[1] = server->country[1]; |
| 679 | flags[flagsCount].meta = NULL; |
| 680 | |
| 681 | flagsCount++; |
| 682 | FetchFlagsTask_DownloadNext(); |
| 683 | } |
| 684 | |
| 685 | struct Flag* Flags_Get(const struct ServerInfo* server) { |
| 686 | int i; |
no test coverage detected