Guest User

Untitled

a guest
Nov 20th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. diff --git a/desmume/src/frontend/windows/fsnitroView.cpp b/desmume/src/frontend/windows/fsnitroView.cpp
  2. index b12147a..939aef2 100644
  3. --- a/desmume/src/frontend/windows/fsnitroView.cpp
  4. +++ b/desmume/src/frontend/windows/fsnitroView.cpp
  5. @@ -168,12 +168,19 @@ BOOL CALLBACK ViewFSNitroProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
  6. item.item.lParam = 0xFFFE;
  7. HTREEITEM hOverlay = TreeView_InsertItem(tree, &item);
  8.  
  9. + std::vector<std::string> dirPaths;
  10. + dirPaths.resize(numDirs + 1);
  11. + dirPaths[0] = "";
  12. +
  13. for (u32 i = 1; i < numDirs; i++)
  14. {
  15. u16 id = (i | 0xF000);
  16. u16 parent = fs->getDirParrentByID(id) & 0x0FFF;
  17.  
  18. string name = fs->getDirNameByID(id);
  19. +
  20. + dirPaths[i] = dirPaths[parent] + "/" + name;
  21. +
  22. //printf("%s\n", name.c_str());
  23. TVINSERTSTRUCT item;
  24. memset(&item, 0, sizeof(item));
  25. @@ -213,6 +220,9 @@ BOOL CALLBACK ViewFSNitroProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
  26. item.hParent = dirs[parent];
  27. }
  28.  
  29. + string path = (fs->isOverlay(i) ? std::string("/overlay") : dirPaths[parent]) + "/" + name;
  30. + printf("%s %u %u\n", path.c_str(), fs->getStartAddrById(i), fs->getFileSizeById(i));
  31. +
  32. item.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
  33. item.item.pszText = (LPSTR)name.c_str();
  34. item.item.iImage = iFileBinary;
Add Comment
Please, Sign In to add comment