einsteinx2 / wiiflow-lite-einstein-mod

My customizations to WiiFlow Lite, at first focusing on polishing the UI and UX. Attempting to keep as much source compatibility as possible. Original repo here: https://sourceforge.net/projects/wiiflow-lite/
4 stars 1 forks source link

Investigate why this change was needed with DevkitPPC r30 #42

Open einsteinx2 opened 6 years ago

einsteinx2 commented 6 years ago

Quoting Fledge:

and as for my const char * issue: here's the change in the latest commit

+ //const char requiredCats = m_cat.getString("GENERAL", "required_categories").c_str(); + //const char selectedCats = m_cat.getString("GENERAL", "selected_categories").c_str(); + //const char *hiddenCats = m_cat.getString("GENERAL", "hidden_categories").c_str(); + char requiredCats[10]; + char selectedCats[10]; + char hiddenCats[10]; + strcpy(requiredCats, m_cat.getString("GENERAL", "required_categories").c_str()); + strcpy(selectedCats, m_cat.getString("GENERAL", "selected_categories").c_str()); + strcpy(hiddenCats, m_cat.getString("GENERAL", "hidden_categories").c_str());

when i added gprintf's they showed odd characters or nothing when there should have been something. by changing them to char[10] and using strcpy it now works. when i updated to ppc r30 my covers stopped showing up. i quickly figured out that bypassing categories they showed so i ended up changing const char * to char[10] and strcpy in menu.cpp and categories was working again. and when i update to ppc r29 i had to the same in menu_source.cpp.