diff --git a/src/fe_build.cpp b/src/fe_build.cpp index 307a4483f..0a5cff92c 100644 --- a/src/fe_build.cpp +++ b/src/fe_build.cpp @@ -521,7 +521,7 @@ bool FeSettings::mamedb_scraper( FeImporterContext &c ) taskc++; } - if ( m_scrape_snaps && !has_artwork( *itr, "snap" ) ) + if ( m_scrape_snaps && !has_image_artwork( *itr, "snap" ) ) { const char *SNAP = "snap/"; std::string fname = base_path + SNAP + (*itr).get_info( FeRomInfo::Romname ); @@ -623,7 +623,7 @@ bool FeSettings::thegamesdb_scraper( FeImporterContext &c ) if ( !c.scrape_art || m_scrape_fanart || ( m_scrape_flyers && (!has_artwork( *itr, "flyer" ) ) ) || ( m_scrape_wheels && (!has_artwork( *itr, "wheel" ) ) ) - || ( m_scrape_snaps && (!has_artwork( *itr, "snap" ) ) ) + || ( m_scrape_snaps && (!has_image_artwork( *itr, "snap" ) ) ) || ( m_scrape_marquees && (!has_artwork( *itr, "marquee" ) ) ) ) worklist.push_back( &(*itr) ); } @@ -739,7 +739,7 @@ bool FeSettings::thegamesdb_scraper( FeImporterContext &c ) else done_count++; - if ( m_scrape_snaps && (!my_art.snap.empty() ) && (!has_artwork( rom, "snap" )) ) + if ( m_scrape_snaps && (!my_art.snap.empty() ) && (!has_image_artwork( rom, "snap" )) ) { const char *SNAP = "snap/"; std::string fname = base_path + SNAP + rom.get_info( FeRomInfo::Romname ); diff --git a/src/fe_image.cpp b/src/fe_image.cpp index 4b273aa39..7b5b52de8 100644 --- a/src/fe_image.cpp +++ b/src/fe_image.cpp @@ -528,7 +528,8 @@ void FeTextureContainer::internal_update_selection( FeSettings *feSettings ) if ( !feSettings->get_best_artwork_file( *rom, m_art_name, vid_list, - image_list ) ) + image_list, + (m_video_flags & VF_DisableVideo) ) ) { // check for layout fallback images/videos std::string layout_path; diff --git a/src/fe_settings.cpp b/src/fe_settings.cpp index a31081f6f..e4d874d92 100644 --- a/src/fe_settings.cpp +++ b/src/fe_settings.cpp @@ -2646,7 +2646,8 @@ bool FeSettings::get_best_artwork_file( const FeRomInfo &rom, const std::string &art_name, std::vector &vid_list, - std::vector &image_list ) + std::vector &image_list, + bool image_only ) { const std::string &emu_name = rom.get_info( FeRomInfo::Emulator ); @@ -2692,7 +2693,7 @@ bool FeSettings::get_best_artwork_file( if ( gather_artwork_filenames( art_paths, romname, vid_list, romname_image_list ) ) { // test for "romname" specific videos first - if ( !vid_list.empty() ) + if ( !image_only && !vid_list.empty() ) return true; } @@ -2702,7 +2703,7 @@ bool FeSettings::get_best_artwork_file( if ( check_altname && gather_artwork_filenames( art_paths, altname, vid_list, altname_image_list ) ) { // test for "altname" specific videos second - if ( !vid_list.empty() ) + if ( !image_only && !vid_list.empty() ) return true; } @@ -2712,7 +2713,7 @@ bool FeSettings::get_best_artwork_file( if ( check_cloneof && gather_artwork_filenames( art_paths, cloneof, vid_list, cloneof_image_list ) ) { // then "cloneof" specific videos - if ( !vid_list.empty() ) + if ( !image_only && !vid_list.empty() ) return true; } @@ -2748,16 +2749,23 @@ bool FeSettings::get_best_artwork_file( bool FeSettings::has_artwork( const FeRomInfo &rom, const std::string &art_name ) { std::vector temp1, temp2; - return ( get_best_artwork_file( rom, art_name, temp1, temp2 ) ); + return ( get_best_artwork_file( rom, art_name, temp1, temp2, false ) ); } bool FeSettings::has_video_artwork( const FeRomInfo &rom, const std::string &art_name ) { std::vector vids, temp; - get_best_artwork_file( rom, art_name, vids, temp ); + get_best_artwork_file( rom, art_name, vids, temp, false ); return (!vids.empty()); } +bool FeSettings::has_image_artwork( const FeRomInfo &rom, const std::string &art_name ) +{ + std::vector temp, images; + get_best_artwork_file( rom, art_name, temp, images, true ); + return (!images.empty()); +} + bool FeSettings::get_best_dynamic_image_file( int filter_index, int rom_index, diff --git a/src/fe_settings.hpp b/src/fe_settings.hpp index 468ce2e88..5083a054d 100644 --- a/src/fe_settings.hpp +++ b/src/fe_settings.hpp @@ -307,10 +307,12 @@ class FeSettings : public FeBaseConfigurable const FeRomInfo &rom, const std::string &art_name, std::vector &vid_list, - std::vector &image_list ); + std::vector &image_list, + bool image_only ); bool has_artwork( const FeRomInfo &rom, const std::string &art_name ); bool has_video_artwork( const FeRomInfo &rom, const std::string &art_name ); + bool has_image_artwork( const FeRomInfo &rom, const std::string &art_name ); bool get_best_dynamic_image_file( int filter_index, diff --git a/src/fe_vm.cpp b/src/fe_vm.cpp index 8cc61e628..65a89e7f2 100644 --- a/src/fe_vm.cpp +++ b/src/fe_vm.cpp @@ -1871,7 +1871,8 @@ const char *FeVM::cb_get_art( const char *art, int index_offset, int filter_offs *rom, art, vid_list, - image_list ) )) + image_list, + (art_flags&AF_ImagesOnly) ) )) { if ( !(art_flags&AF_ImagesOnly) && !vid_list.empty() ) retval = vid_list.front();