I can confirm the same issue on my side. The stats are associated with the romlist and not the emulator. I was able to alter the code to use emulator. Below are the changes I made. It's not the most clean solution, but it works for the tests I've done so far.
I have two romlists:
- Arcade.txt
- Metal Slug Collection.txt
With the below changes I see the PlayedCount loaded and updated from .attract/stats/Arcade/mslug.stat
fe_romlist.cppfor ( FeRomInfoListType::iterator it=m_list.begin(); it!=m_list.end(); ++it ){
// (*it).load_stats( stat_path );
(*it).load_stats( m_config_path + "stats/" + (*it).get_info( FeRomInfo::Emulator ) + "/" );
}
fe_info.hpp// void update_stats( const std::string &path, int count_incr, int played_incr );
void update_stats( const std::string &path, const std::string &m_config_path, int count_incr, int played_incr );
fe_info.cpp// std::string filename = path + m_info[Romname] + FE_STAT_FILE_EXTENSION;
std::string filename = m_config_path + "stats/" + m_info[Emulator] + "/" + m_info[Romname] + FE_STAT_FILE_EXTENSION;
fe_settings.cpp// rom->update_stats( path, play_count, play_time );
rom->update_stats( path, m_config_path, play_count, play_time );