Hi guys
I'm looking at the title scanning code in the grid launcher. Currently it works as follows:
I'm thinking of changing the process so nothing is copied until it's actually needed. Here's the process I'm thinking of:
I'm looking at the title scanning code in the grid launcher. Currently it works as follows:
- A for loop iterates across the titles on the device
- Within the loop, the details, title ID and smdh data are assigned to a static menu entry struct
- A pointer to a new menu entry is defined and malloc'ed
- The struct containing the title data is memcpy'ed to the new entry created in step 3
- The pointer to the menu entry copy is added to the array of menu entries
I'm thinking of changing the process so nothing is copied until it's actually needed. Here's the process I'm thinking of:
- A for loop iterates across the titles on the device
- For each title, a NULL pointer is added to the menu entry array
- When the title menu is being drawn, the appropriate item from the array is retrieved
- If the retrieved menu entry is NULL then the title info and smdh data are retrieved and written back to the array