Dolphin, the GameCube and Wii emulator - Forums

Full Version: Feature Request: Command line option to identify a game by printing the game ID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Feature Request: Command line option to identify a game by printing the game ID to the console.

This would make it much easier for my frontend app Nostlan to identify games without using the file name!
If I right click on a game and click properties and go to Info I can see the game ID right there. Where in Dolphin's code does this happen? Could this info be logged in the console? It'd be nice to have the game's title, disc number, and revision number too.
(02-27-2020, 04:36 AM)qashto Wrote: [ -> ]If I right click on a game and click properties and go to Info I can see the game ID right there. Where in Dolphin's code does this happen?

The GUI code for it is at: https://github.com/dolphin-emu/dolphin/b...Widget.cpp

The code that supplies the values (through a layer of indirection to allow for caching) are the files in this directory that start with Volume: https://github.com/dolphin-emu/dolphin/t...ore/DiscIO
(02-27-2020, 05:19 AM)JosJuice Wrote: [ -> ]The GUI code for it is at: https://github.com/dolphin-emu/dolphin/b...Widget.cpp

The code that supplies the values (through a layer of indirection to allow for caching) are the files in this directory that start with Volume: https://github.com/dolphin-emu/dolphin/t...ore/DiscIO

Thank you!  I actually realized that if I were to add a print statement there I'd have to go to the info section for every game for that code to run and even with control of the user's keyboard it seems impossible to access that section without clicking with the mouse which is not an option.

Could you show me where Dolphin loads the game data for the main UI?  I did some more research and now I'm thinking the best way to do this would be to add print statements there, that way when dolphin loads it will print the info for all the games.  I also found that I could get access to this info with control over the user's keyboard and by using arrow keys, tab, and ctrl+c to copy the text.  But that would require the user to have the game ID and game file as part of the table.  Is there a way to edit this in the user's dolphin configs?
(02-27-2020, 05:35 AM)qashto Wrote: [ -> ]Could you show me where Dolphin loads the game data for the main UI?

It's done partially in GameFileCache.cpp and partially in GameTracker.cpp.
I'm really lost. I don't know where the print statements would go. I've never used c++ so I think I'd need your help to add those print statements for the custom build. Otherwise I'll have to use the other method which is not ideal. If it wouldn't be too much of a hassle could you send me an edit of those files and add the print statements for all the game info?