diff --git a/Lang/Brazilian Portuguese.pj.Lang b/Lang/Brazilian Portuguese.pj.Lang index 0c9abc6e6..21284943c 100644 --- a/Lang/Brazilian Portuguese.pj.Lang +++ b/Lang/Brazilian Portuguese.pj.Lang @@ -175,6 +175,7 @@ #317# "Jogadores" #318# "Force Feedback" #319# "Formato do Arquivo" +#321# "Nome" //Select ROM #320# "Selecionar o diretório atual das ROMs" diff --git a/Lang/Chinese (Simplified).pj.Lang b/Lang/Chinese (Simplified).pj.Lang index 92aea3d65..2dfcfd1ac 100644 --- a/Lang/Chinese (Simplified).pj.Lang +++ b/Lang/Chinese (Simplified).pj.Lang @@ -175,6 +175,7 @@ #317# "游戏人数" #318# "强制力回馈" #319# "文件格式" +#321# "名称" //Select ROM #320# "选择当前的 ROM 目录" diff --git a/Lang/English.pj.Lang b/Lang/English.pj.Lang index 245dc60cb..263601cbb 100644 --- a/Lang/English.pj.Lang +++ b/Lang/English.pj.Lang @@ -175,6 +175,7 @@ #317# "Players" #318# "Force Feedback" #319# "File Format" +#321# "Name" //Select ROM #320# "Select current ROM directory" diff --git a/Lang/French.pj.Lang b/Lang/French.pj.Lang index b14207fc0..97f16c531 100644 --- a/Lang/French.pj.Lang +++ b/Lang/French.pj.Lang @@ -175,6 +175,7 @@ #317# "Joueurs" #318# "Forcer le feedback" #319# "Format de fichier" +#321# "Nom" //Select ROM #320# "Sélectionner le répertoire de ROM actuel" diff --git a/Lang/Japanese.pj.Lang b/Lang/Japanese.pj.Lang index d27386d65..d7d014281 100644 --- a/Lang/Japanese.pj.Lang +++ b/Lang/Japanese.pj.Lang @@ -189,6 +189,7 @@ #317# "プレイヤー" #318# "振動機能" #319# "ファイル形式" +#321# "名前" //Select ROM #320# "ロムディレクトリを選択して下さい" diff --git a/Lang/Russian.pj.Lang b/Lang/Russian.pj.Lang index 3f559e161..d403ab41a 100644 --- a/Lang/Russian.pj.Lang +++ b/Lang/Russian.pj.Lang @@ -175,6 +175,7 @@ #317# "Игроков" #318# "Вибрация" #319# "Формат файла" +#321# "имя" //Select ROM #320# "Выбрать текущую папку с играми" diff --git a/Lang/Spanish.pj.Lang b/Lang/Spanish.pj.Lang index b02615dce..ff0e18960 100644 --- a/Lang/Spanish.pj.Lang +++ b/Lang/Spanish.pj.Lang @@ -175,6 +175,7 @@ #317# "Jugadores" #318# "Retroalimentación de Fuerza" #319# "Formato del Archivo" +#321# "Nombre" //Select ROM #320# "Seleccionar directorio de ROMs actual" diff --git a/Source/Project64-core/Multilanguage.h b/Source/Project64-core/Multilanguage.h index ae1b5e80e..515c651b2 100644 --- a/Source/Project64-core/Multilanguage.h +++ b/Source/Project64-core/Multilanguage.h @@ -205,6 +205,8 @@ enum LanguageStringID RB_PLAYERS = 317, RB_FORCE_FEEDBACK = 318, RB_FILE_FORMAT = 319, + RB_NAME = 321, + //Select Rom SELECT_ROM_DIR = 320, diff --git a/Source/Project64-core/Multilanguage/LanguageClass.cpp b/Source/Project64-core/Multilanguage/LanguageClass.cpp index 05f871a77..8fd68e49a 100644 --- a/Source/Project64-core/Multilanguage/LanguageClass.cpp +++ b/Source/Project64-core/Multilanguage/LanguageClass.cpp @@ -156,6 +156,7 @@ void CLanguage::LoadDefaultStrings(void) DEF_STR(RB_FILENAME, "File Name"); DEF_STR(RB_INTERNALNAME, "Internal Name"); DEF_STR(RB_GOODNAME, "Good Name"); + DEF_STR(RB_NAME, "Name"); DEF_STR(RB_STATUS, "Status"); DEF_STR(RB_ROMSIZE, "ROM Size"); DEF_STR(RB_NOTES_CORE, "Notes (core)"); diff --git a/Source/Project64-core/RomList/RomList.cpp b/Source/Project64-core/RomList/RomList.cpp index 33e274d1c..5f9b819c8 100644 --- a/Source/Project64-core/RomList/RomList.cpp +++ b/Source/Project64-core/RomList/RomList.cpp @@ -468,6 +468,7 @@ void CRomList::FillRomExtensionInfo(ROM_INFO * pRomInfo) pRomInfo->CoreNotes[0] = '\0'; pRomInfo->PluginNotes[0] = '\0'; strcpy(pRomInfo->GoodName, "#340#"); + strcpy(pRomInfo->Name, "#321#"); strcpy(pRomInfo->Status, "Unknown"); //Get File Identifier @@ -486,6 +487,7 @@ void CRomList::FillRomExtensionInfo(ROM_INFO * pRomInfo) //Rom Settings strncpy(pRomInfo->GoodName, m_RomIniFile->GetString(Identifier, "Good Name", pRomInfo->GoodName).c_str(), sizeof(pRomInfo->GoodName) / sizeof(char)); + strncpy(pRomInfo->Name, m_RomIniFile->GetString(Identifier, "Good Name", pRomInfo->Name).c_str(), sizeof(pRomInfo->Name) / sizeof(char)); strncpy(pRomInfo->Status, m_RomIniFile->GetString(Identifier, "Status", pRomInfo->Status).c_str(), sizeof(pRomInfo->Status) / sizeof(char)); strncpy(pRomInfo->CoreNotes, m_RomIniFile->GetString(Identifier, "Core Note", "").c_str(), sizeof(pRomInfo->CoreNotes) / sizeof(char)); strncpy(pRomInfo->PluginNotes, m_RomIniFile->GetString(Identifier, "Plugin Note", "").c_str(), sizeof(pRomInfo->PluginNotes) / sizeof(char)); diff --git a/Source/Project64-core/RomList/RomList.h b/Source/Project64-core/RomList/RomList.h index 7f07d49f6..294848e95 100644 --- a/Source/Project64-core/RomList/RomList.h +++ b/Source/Project64-core/RomList/RomList.h @@ -34,6 +34,7 @@ public: char FileName[200]; char InternalName[22]; char GoodName[200]; + char Name[200]; char CartID[3]; char PluginNotes[250]; char CoreNotes[250]; diff --git a/Source/Project64/UserInterface/RomBrowser.h b/Source/Project64/UserInterface/RomBrowser.h index 4ad3e5173..8b6116035 100644 --- a/Source/Project64/UserInterface/RomBrowser.h +++ b/Source/Project64/UserInterface/RomBrowser.h @@ -109,12 +109,12 @@ private: enum { RB_FileName = 0, RB_InternalName = 1, RB_GoodName = 2, - RB_Status = 3, RB_RomSize = 4, RB_CoreNotes = 5, - RB_PluginNotes = 6, RB_UserNotes = 7, RB_CartridgeID = 8, - RB_Manufacturer = 9, RB_Country = 10, RB_Developer = 11, - RB_Crc1 = 12, RB_Crc2 = 13, RB_CICChip = 14, - RB_ReleaseDate = 15, RB_Genre = 16, RB_Players = 17, - RB_ForceFeedback = 18, RB_FileFormat = 19 + RB_Name = 3, RB_Status = 4, RB_RomSize = 5, + RB_CoreNotes = 6, RB_PluginNotes = 7, RB_UserNotes = 8, + RB_CartridgeID = 9, RB_Manufacturer = 10, RB_Country = 11, + RB_Developer = 12, RB_Crc1 = 13, RB_Crc2 = 14, + RB_CICChip = 15, RB_ReleaseDate = 16, RB_Genre = 17, + RB_Players = 18, RB_ForceFeedback = 19, RB_FileFormat = 20 }; enum diff --git a/Source/Project64/UserInterface/RomBrowserClass.cpp b/Source/Project64/UserInterface/RomBrowserClass.cpp index fa513df7c..ad14c554e 100644 --- a/Source/Project64/UserInterface/RomBrowserClass.cpp +++ b/Source/Project64/UserInterface/RomBrowserClass.cpp @@ -49,7 +49,8 @@ void CRomBrowser::GetFieldInfo(ROMBROWSER_FIELDS_LIST & Fields, bool UseDefault AddField(Fields, "File Name", -1, RB_FileName, 218, RB_FILENAME, UseDefault); AddField(Fields, "Internal Name", -1, RB_InternalName, 200, RB_INTERNALNAME, UseDefault); - AddField(Fields, "Good Name", 0, RB_GoodName, 218, RB_GOODNAME, UseDefault); + AddField(Fields, "Good Name", -1, RB_GoodName, 218, RB_GOODNAME, UseDefault); + AddField(Fields, "Name", 0, RB_Name, 218, RB_NAME, UseDefault); AddField(Fields, "Status", 1, RB_Status, 92, RB_STATUS, UseDefault); AddField(Fields, "Rom Size", -1, RB_RomSize, 100, RB_ROMSIZE, UseDefault); AddField(Fields, "Notes (Core)", 2, RB_CoreNotes, 120, RB_NOTES_CORE, UseDefault); @@ -535,6 +536,10 @@ bool CRomBrowser::RomListDrawItem(int32_t idCtrl, uint32_t lParam) { text = wGS(RB_NOT_GOOD_FILE); } + if (wcscmp(L"#321#", text.c_str()) == 0) + { + text = stdstr(pRomInfo->InternalName).ToUTF16(); + } DrawTextW(ditem->hDC, text.c_str(), text.length(), &rcDraw, DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER | DT_WORD_ELLIPSIS); @@ -556,6 +561,11 @@ bool CRomBrowser::RomListDrawItem(int32_t idCtrl, uint32_t lParam) { text = wGS(RB_NOT_GOOD_FILE); } + if (wcscmp(L"#321#", text.c_str()) == 0) + { + text = stdstr(pRomInfo->InternalName).ToUTF16(); + } + DrawTextW(ditem->hDC, text.c_str(), text.length(), &rcDraw, DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER | DT_WORD_ELLIPSIS); } return true; @@ -640,11 +650,19 @@ int32_t CALLBACK CRomBrowser::RomList_CompareItems(uint32_t lParam1, uint32_t lP GoodName2 = strcmp("#340#", pRomInfo2->GoodName) != 0 ? pRomInfo2->GoodName : m_UnknownGoodName.c_str(); } + const char * Name1 = NULL, *Name2 = NULL; + if (SortFieldInfo->Key == RB_Name) + { + Name1 = strcmp("#321#", pRomInfo1->Name) != 0 ? pRomInfo1->GoodName : pRomInfo1->InternalName; + Name2 = strcmp("#321#", pRomInfo2->Name) != 0 ? pRomInfo2->GoodName : pRomInfo2->InternalName; + } + switch (SortFieldInfo->Key) { case RB_FileName: result = (int32_t)lstrcmpi(pRomInfo1->FileName, pRomInfo2->FileName); break; case RB_InternalName: result = (int32_t)lstrcmpi(pRomInfo1->InternalName, pRomInfo2->InternalName); break; case RB_GoodName: result = (int32_t)lstrcmpi(GoodName1, GoodName2); break; + case RB_Name: result = (int32_t)lstrcmpi(Name1, Name2); break; case RB_Status: result = (int32_t)lstrcmpi(pRomInfo1->Status, pRomInfo2->Status); break; case RB_RomSize: result = (int32_t)pRomInfo1->RomSize - (int32_t)pRomInfo2->RomSize; break; case RB_CoreNotes: result = (int32_t)lstrcmpi(pRomInfo1->CoreNotes, pRomInfo2->CoreNotes); break; @@ -688,6 +706,7 @@ void CRomBrowser::RomList_GetDispInfo(uint32_t pnmh) case RB_FileName: wcsncpy(lpdi->item.pszText, stdstr(pRomInfo->FileName).ToUTF16(CP_ACP).c_str(), lpdi->item.cchTextMax); break; case RB_InternalName: wcsncpy(lpdi->item.pszText, stdstr(pRomInfo->InternalName).ToUTF16(stdstr::CODEPAGE_932).c_str(), lpdi->item.cchTextMax / sizeof(wchar_t)); break; case RB_GoodName: wcsncpy(lpdi->item.pszText, stdstr(pRomInfo->GoodName).ToUTF16().c_str(), lpdi->item.cchTextMax / sizeof(wchar_t)); break; + case RB_Name: wcsncpy(lpdi->item.pszText, stdstr(pRomInfo->Name).ToUTF16().c_str(), lpdi->item.cchTextMax / sizeof(wchar_t)); break; case RB_CoreNotes: wcsncpy(lpdi->item.pszText, stdstr(pRomInfo->CoreNotes).ToUTF16().c_str(), lpdi->item.cchTextMax / sizeof(wchar_t)); break; case RB_PluginNotes: wcsncpy(lpdi->item.pszText, stdstr(pRomInfo->PluginNotes).ToUTF16().c_str(), lpdi->item.cchTextMax / sizeof(wchar_t)); break; case RB_Status: wcsncpy(lpdi->item.pszText, stdstr(pRomInfo->Status).ToUTF16().c_str(), lpdi->item.cchTextMax / sizeof(wchar_t)); break;