diff --git a/RetroFE/Source/Collection/CollectionInfoBuilder.cpp b/RetroFE/Source/Collection/CollectionInfoBuilder.cpp index 582a77a..1e6995b 100644 --- a/RetroFE/Source/Collection/CollectionInfoBuilder.cpp +++ b/RetroFE/Source/Collection/CollectionInfoBuilder.cpp @@ -481,8 +481,10 @@ void CollectionInfoBuilder::ImportRomDirectory(std::string path, CollectionInfo { ImportRomDirectory( Utils::combinePath( path, file ), info, includeFilter, excludeFilter, romHierarchy, truRIP ); } - else if (file != "." && file != "..") + else if (file != "." && file != ".." && file.at(0) != '.' ) { + //printf("%s\n", file.c_str()); + size_t position = file.find_last_of("."); std::string basename = (std::string::npos == position)? file : file.substr(0, position); diff --git a/RetroFE/Source/Graphics/Page.cpp b/RetroFE/Source/Graphics/Page.cpp index 9ae53d7..094b75e 100644 --- a/RetroFE/Source/Graphics/Page.cpp +++ b/RetroFE/Source/Graphics/Page.cpp @@ -148,6 +148,8 @@ void Page::onNewItemSelected() if(!(activeMenu_.size() > 0 && activeMenu_[0])) return; selectedItem_ = activeMenu_[0]->getSelectedItem(); + //printf("onNewItemSelected\n"); + for(MenuVector_T::iterator it = menus_.begin(); it != menus_.end(); it++) { for(std::vector::iterator it2 = menus_[std::distance(menus_.begin(), it)].begin(); it2 != menus_[std::distance(menus_.begin(), it)].end(); it2++) @@ -170,6 +172,7 @@ void Page::onNewScrollItemSelected() if(!(activeMenu_.size() > 0 && activeMenu_[0])) return; selectedItem_ = activeMenu_[0]->getSelectedItem(); + //printf("onNewScrollItemSelected\n"); for(std::vector::iterator it = LayerComponents.begin(); it != LayerComponents.end(); ++it) { diff --git a/RetroFE/Source/RetroFE.cpp b/RetroFE/Source/RetroFE.cpp index db69f91..48ce4b5 100644 --- a/RetroFE/Source/RetroFE.cpp +++ b/RetroFE/Source/RetroFE.cpp @@ -56,7 +56,8 @@ #include #endif -#define GET_RUN_TIME (clock() / (CLOCKS_PER_SEC/1000)) +//#define GET_RUN_TIME_MS (clock() / (CLOCKS_PER_SEC/1000)) +#define GET_RUN_TIME_MS (SDL_GetTicks()) //#define PERIOD_FORCE_REFRESH 1000 //ms #define FPS 60 // TODO: set in conf file @@ -106,14 +107,14 @@ void RetroFE::render( ) SDL_FillRect(SDL::getWindow( ), NULL, SDL_MapRGB(SDL::getWindow( )->format, 0, 0, 0)); #ifdef DEBUG_FPS - uint32_t draw_ticks = static_castGET_RUN_TIME; + uint32_t draw_ticks = static_castGET_RUN_TIME_MS; #endif //DEBUG_FPS if ( currentPage_ ) { currentPage_->draw( ); } #ifdef DEBUG_FPS - int draw_time = static_cast(GET_RUN_TIME)-draw_ticks; + int draw_time = static_cast(GET_RUN_TIME_MS)-draw_ticks; //printf("draw time: %dms\n", draw_time); #endif //DEBUG_FPS @@ -223,7 +224,7 @@ void RetroFE::launchExit( ) attract_.reset( ); // Restore time settings - currentTime_ = static_cast( GET_RUN_TIME ) / 1000; + currentTime_ = static_cast( GET_RUN_TIME_MS ) / 1000; lastLaunchReturnTime_ = currentTime_; } @@ -388,7 +389,7 @@ void RetroFE::run( ) Launcher l( config_ ); Menu m( config_ ); - preloadTime = static_cast( GET_RUN_TIME ) / 1000; + preloadTime = static_cast( GET_RUN_TIME_MS ) / 1000; while ( running ) { @@ -616,6 +617,7 @@ void RetroFE::run( ) // Start onHighlightExit animation case RETROFE_HIGHLIGHT_REQUEST: currentPage_->setScrolling(Page::ScrollDirectionIdle); + currentPage_->onNewItemSelected( ); currentPage_->highlightExit( ); state = RETROFE_HIGHLIGHT_EXIT; break; @@ -632,7 +634,6 @@ void RetroFE::run( ) // Start onHighlightEnter animation case RETROFE_HIGHLIGHT_LOAD_ART: currentPage_->highlightEnter( ); - currentPage_->onNewItemSelected( ); state = RETROFE_HIGHLIGHT_ENTER; break; @@ -787,8 +788,8 @@ void RetroFE::run( ) currentPage_->exitGame( ); // Warning test this - currentPage_->onNewItemSelected( ); - currentPage_->reallocateMenuSpritePoints( ); + /*currentPage_->onNewItemSelected( ); + currentPage_->reallocateMenuSpritePoints( );*/ state = RETROFE_LAUNCH_EXIT; } @@ -982,7 +983,7 @@ void RetroFE::run( ) { // Handle FPS lastTime = currentTime_; - currentTime_ = static_cast( GET_RUN_TIME ) / 1000; + currentTime_ = static_cast( GET_RUN_TIME_MS ) / 1000; if ( currentTime_ < lastTime ) { @@ -1005,7 +1006,7 @@ void RetroFE::run( ) // Force refresh variables #ifdef PERIOD_FORCE_REFRESH - if(static_cast(GET_RUN_TIME) - ticks_last_refresh > PERIOD_FORCE_REFRESH){ + if(static_cast(GET_RUN_TIME_MS) - ticks_last_refresh > PERIOD_FORCE_REFRESH){ forceRender(true); //printf("force render\n"); } @@ -1023,7 +1024,7 @@ void RetroFE::run( ) mustRender_ = false; render( ); #ifdef PERIOD_FORCE_REFRESH - ticks_last_refresh = static_cast(GET_RUN_TIME); + ticks_last_refresh = static_cast(GET_RUN_TIME_MS); #endif //PERIOD_FORCE_REFRESH } }