Minor progress window changes

This commit is contained in:
Xpl0itU 2023-07-19 21:25:30 +02:00
parent 2084b1313d
commit 8060005529
6 changed files with 45 additions and 19 deletions

View file

@ -9,7 +9,10 @@ package wiiudownloader
#include <ctype.h>
*/
import "C"
import "unsafe"
import (
"strconv"
"unsafe"
)
const (
MCP_REGION_JAPAN = 0x01
@ -150,3 +153,16 @@ func GetCategoryFromFormattedCategory(formattedCategory string) uint8 {
return TITLE_CATEGORY_ALL
}
}
func getTitleEntryFromTid(tid string) TitleEntry {
titleID, err := strconv.ParseUint(tid, 16, 64)
if err != nil {
return TitleEntry{}
}
for _, entry := range GetTitleEntries(TITLE_CATEGORY_ALL) {
if entry.TitleID == titleID {
return entry
}
}
return TitleEntry{}
}