Skip to content

Commit

Permalink
neogeocd: add flappy chicken, add 'please wait' message while searchi…
Browse files Browse the repository at this point in the history
…ng for games
  • Loading branch information
dinkc64 committed Aug 6, 2023
1 parent 91a0a8c commit c9fd676
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/burner/win32/neocdlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct NGCDGAME games[] =
// ---------------------------------------------------------------------------------------------------------------------------------------------//
// * Name * Title * Year * Company * Game ID //
// ---------------------------------------------------------------------------------------------------------------------------------------------//
{ _T("placeholder") , _T("Empty Placeholder") , _T("") , _T("") , 0x0000 }, //
{ _T("nam1975") , _T("NAM-1975") , _T("1990") , _T("SNK") , 0x0001 }, //
{ _T("bstars") , _T("Baseball Stars Professional") , _T("1991") , _T("SNK") , 0x0002 }, //
{ _T("tpgolf") , _T("Top Player's Golf") , _T("1990") , _T("SNK") , 0x0003 }, //
Expand Down Expand Up @@ -122,6 +123,7 @@ struct NGCDGAME games[] =
{ _T("xenocrisis") , _T("Xeno Crisis") , _T("2019") , _T("Bitmap Bureau") , 0xbb01 }, //
{ _T("neon") , _T("Project Neon: Caravan Demo") , _T("2019") , _T("Team Project Neon") , 0x7777 }, //
{ _T("looptris") , _T("Looptris") , _T("2019") , _T("Blastar") , 0x2019 }, //
{ _T("flappychick") , _T("Flappy Chicken") , _T("2022") , _T("Blastar") , 0x2023 }, //
};

NGCDGAME* GetNeoGeoCDInfo(unsigned int nID)
Expand Down
16 changes: 13 additions & 3 deletions src/burner/win32/neocdsel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ static int NeoCDList_AddGame(TCHAR* pszFile, unsigned int nGameID)

memcpy(game, GetNeoGeoCDInfo(nGameID), sizeof(NGCDGAME));

TCHAR szNGCDID[12];
_stprintf(szNGCDID, _T("%04X"), nGameID);
TCHAR szNGCDID[12] = _T("");
if (nGameID != 0x0000) {
_stprintf(szNGCDID, _T("%04X"), nGameID);
}

LVITEM lvi;
ZeroMemory(&lvi, sizeof(lvi));
Expand All @@ -77,7 +79,12 @@ static int NeoCDList_AddGame(TCHAR* pszFile, unsigned int nGameID)
lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
lvi.cchTextMax = 255;
TCHAR szTitle[256];
_stprintf(szTitle, _T("%s"), game->pszTitle);
if (nGameID == 0x0000) {
// placeholder entry, argument (pszFile) instead of game name
_stprintf(szTitle, _T("%s"), pszFile);
} else {
_stprintf(szTitle, _T("%s"), game->pszTitle);
}
lvi.pszText = szTitle;

int nItem = ListView_InsertItem(hListView, &lvi);
Expand Down Expand Up @@ -896,8 +903,11 @@ static unsigned __stdcall NeoCDList_DoProc(void*)

bProcessingList = true;
ListView_DeleteAllItems(hListView);
NeoCDList_AddGame(_T("--- [ Please Wait: Searching for games! ] ---"), 0x0000);
NeoCDList_ScanDir(hListView, szNeoCDGamesDir);

ListView_DeleteItem(hListView, 0); // delete "Please Wait" line :)

ListViewSort(SORT_ASCENDING, 0);
SetFocus(hListView);

Expand Down

0 comments on commit c9fd676

Please sign in to comment.