mirror of
https://github.com/mickelson/attract.git
synced 2026-10-12 02:18:55 +00:00
Merge pull request #106 from UrbaneChimp/master
A couple of fixes for recent regressions
This commit is contained in:
@@ -399,6 +399,7 @@ void FeTextureContainer::on_new_selection( FeSettings *feSettings, bool screen_s
|
||||
|
||||
void FeTextureContainer::on_new_list( FeSettings *feSettings, float, float, bool screen_saver_active )
|
||||
{
|
||||
m_current_rom_index = -1;
|
||||
if (( m_is_artwork ) && ( m_art_update_trigger == EndNavigation ))
|
||||
internal_update_selection( feSettings, screen_saver_active );
|
||||
}
|
||||
|
||||
+16
-17
@@ -1316,6 +1316,14 @@ void FeRomList::get_file_availability()
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: this function is implemented in fe_settings.cpp
|
||||
bool internal_resolve_config_file(
|
||||
const std::string &config_path,
|
||||
std::string &result,
|
||||
const char *subdir,
|
||||
const std::string &name );
|
||||
|
||||
|
||||
FeEmulatorInfo *FeRomList::get_emulator( const std::string & emu )
|
||||
{
|
||||
if ( emu.empty() )
|
||||
@@ -1332,30 +1340,21 @@ FeEmulatorInfo *FeRomList::get_emulator( const std::string & emu )
|
||||
|
||||
// Emulator not loaded yet, load it now
|
||||
//
|
||||
std::string filename = m_config_path;
|
||||
filename += FE_EMULATOR_SUBDIR;
|
||||
filename += emu;
|
||||
filename += FE_EMULATOR_FILE_EXTENSION;
|
||||
|
||||
FeEmulatorInfo new_emu( emu );
|
||||
if ( new_emu.load_from_file( filename ) )
|
||||
std::string filename;
|
||||
if ( internal_resolve_config_file( m_config_path, filename, FE_EMULATOR_SUBDIR, emu + FE_EMULATOR_FILE_EXTENSION ) )
|
||||
{
|
||||
m_emulators.push_back( new_emu );
|
||||
return &(m_emulators.back());
|
||||
FeEmulatorInfo new_emu( emu );
|
||||
if ( new_emu.load_from_file( filename ) )
|
||||
{
|
||||
m_emulators.push_back( new_emu );
|
||||
return &(m_emulators.back());
|
||||
}
|
||||
}
|
||||
|
||||
// Could not find emulator config
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// NOTE: this function is implemented in fe_settings.cpp
|
||||
bool internal_resolve_config_file(
|
||||
const std::string &config_path,
|
||||
std::string &result,
|
||||
const char *subdir,
|
||||
const std::string &name );
|
||||
|
||||
|
||||
FeEmulatorInfo *FeRomList::create_emulator( const std::string &emu )
|
||||
{
|
||||
// If an emulator with the given name already exists we return it
|
||||
|
||||
@@ -1419,6 +1419,10 @@ const char *FeVM::cb_game_info( int index, int offset, int filter_offset )
|
||||
sys_name = emu->get_info( FeEmulatorInfo::System );
|
||||
return sys_name.c_str();
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return (fev->m_feSettings->get_rom_info( filter_offset, offset, (FeRomInfo::Index)index )).c_str();
|
||||
|
||||
Reference in New Issue
Block a user