mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-13 02:08:52 +01:00
remove hidden files from listing
Signed-off-by: Vincent-FK <vincent.buso@funkey-project.com>
This commit is contained in:
parent
c154a282ff
commit
7ee88a1bc9
@ -481,8 +481,10 @@ void CollectionInfoBuilder::ImportRomDirectory(std::string path, CollectionInfo
|
|||||||
{
|
{
|
||||||
ImportRomDirectory( Utils::combinePath( path, file ), info, includeFilter, excludeFilter, romHierarchy, truRIP );
|
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(".");
|
size_t position = file.find_last_of(".");
|
||||||
std::string basename = (std::string::npos == position)? file : file.substr(0, position);
|
std::string basename = (std::string::npos == position)? file : file.substr(0, position);
|
||||||
|
|
||||||
|
|||||||
@ -148,6 +148,8 @@ void Page::onNewItemSelected()
|
|||||||
if(!(activeMenu_.size() > 0 && activeMenu_[0])) return;
|
if(!(activeMenu_.size() > 0 && activeMenu_[0])) return;
|
||||||
selectedItem_ = activeMenu_[0]->getSelectedItem();
|
selectedItem_ = activeMenu_[0]->getSelectedItem();
|
||||||
|
|
||||||
|
//printf("onNewItemSelected\n");
|
||||||
|
|
||||||
for(MenuVector_T::iterator it = menus_.begin(); it != menus_.end(); it++)
|
for(MenuVector_T::iterator it = menus_.begin(); it != menus_.end(); it++)
|
||||||
{
|
{
|
||||||
for(std::vector<ScrollingList *>::iterator it2 = menus_[std::distance(menus_.begin(), it)].begin(); it2 != menus_[std::distance(menus_.begin(), it)].end(); it2++)
|
for(std::vector<ScrollingList *>::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;
|
if(!(activeMenu_.size() > 0 && activeMenu_[0])) return;
|
||||||
selectedItem_ = activeMenu_[0]->getSelectedItem();
|
selectedItem_ = activeMenu_[0]->getSelectedItem();
|
||||||
|
//printf("onNewScrollItemSelected\n");
|
||||||
|
|
||||||
for(std::vector<Component *>::iterator it = LayerComponents.begin(); it != LayerComponents.end(); ++it)
|
for(std::vector<Component *>::iterator it = LayerComponents.begin(); it != LayerComponents.end(); ++it)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -56,7 +56,8 @@
|
|||||||
#include <SDL/SDL_thread.h>
|
#include <SDL/SDL_thread.h>
|
||||||
#endif
|
#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 PERIOD_FORCE_REFRESH 1000 //ms
|
||||||
#define FPS 60 // TODO: set in conf file
|
#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));
|
SDL_FillRect(SDL::getWindow( ), NULL, SDL_MapRGB(SDL::getWindow( )->format, 0, 0, 0));
|
||||||
|
|
||||||
#ifdef DEBUG_FPS
|
#ifdef DEBUG_FPS
|
||||||
uint32_t draw_ticks = static_cast<unsigned int>GET_RUN_TIME;
|
uint32_t draw_ticks = static_cast<unsigned int>GET_RUN_TIME_MS;
|
||||||
#endif //DEBUG_FPS
|
#endif //DEBUG_FPS
|
||||||
if ( currentPage_ )
|
if ( currentPage_ )
|
||||||
{
|
{
|
||||||
currentPage_->draw( );
|
currentPage_->draw( );
|
||||||
}
|
}
|
||||||
#ifdef DEBUG_FPS
|
#ifdef DEBUG_FPS
|
||||||
int draw_time = static_cast<int>(GET_RUN_TIME)-draw_ticks;
|
int draw_time = static_cast<int>(GET_RUN_TIME_MS)-draw_ticks;
|
||||||
//printf("draw time: %dms\n", draw_time);
|
//printf("draw time: %dms\n", draw_time);
|
||||||
#endif //DEBUG_FPS
|
#endif //DEBUG_FPS
|
||||||
|
|
||||||
@ -223,7 +224,7 @@ void RetroFE::launchExit( )
|
|||||||
attract_.reset( );
|
attract_.reset( );
|
||||||
|
|
||||||
// Restore time settings
|
// Restore time settings
|
||||||
currentTime_ = static_cast<float>( GET_RUN_TIME ) / 1000;
|
currentTime_ = static_cast<float>( GET_RUN_TIME_MS ) / 1000;
|
||||||
lastLaunchReturnTime_ = currentTime_;
|
lastLaunchReturnTime_ = currentTime_;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -388,7 +389,7 @@ void RetroFE::run( )
|
|||||||
|
|
||||||
Launcher l( config_ );
|
Launcher l( config_ );
|
||||||
Menu m( config_ );
|
Menu m( config_ );
|
||||||
preloadTime = static_cast<float>( GET_RUN_TIME ) / 1000;
|
preloadTime = static_cast<float>( GET_RUN_TIME_MS ) / 1000;
|
||||||
|
|
||||||
while ( running )
|
while ( running )
|
||||||
{
|
{
|
||||||
@ -616,6 +617,7 @@ void RetroFE::run( )
|
|||||||
// Start onHighlightExit animation
|
// Start onHighlightExit animation
|
||||||
case RETROFE_HIGHLIGHT_REQUEST:
|
case RETROFE_HIGHLIGHT_REQUEST:
|
||||||
currentPage_->setScrolling(Page::ScrollDirectionIdle);
|
currentPage_->setScrolling(Page::ScrollDirectionIdle);
|
||||||
|
currentPage_->onNewItemSelected( );
|
||||||
currentPage_->highlightExit( );
|
currentPage_->highlightExit( );
|
||||||
state = RETROFE_HIGHLIGHT_EXIT;
|
state = RETROFE_HIGHLIGHT_EXIT;
|
||||||
break;
|
break;
|
||||||
@ -632,7 +634,6 @@ void RetroFE::run( )
|
|||||||
// Start onHighlightEnter animation
|
// Start onHighlightEnter animation
|
||||||
case RETROFE_HIGHLIGHT_LOAD_ART:
|
case RETROFE_HIGHLIGHT_LOAD_ART:
|
||||||
currentPage_->highlightEnter( );
|
currentPage_->highlightEnter( );
|
||||||
currentPage_->onNewItemSelected( );
|
|
||||||
state = RETROFE_HIGHLIGHT_ENTER;
|
state = RETROFE_HIGHLIGHT_ENTER;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -787,8 +788,8 @@ void RetroFE::run( )
|
|||||||
currentPage_->exitGame( );
|
currentPage_->exitGame( );
|
||||||
|
|
||||||
// Warning test this
|
// Warning test this
|
||||||
currentPage_->onNewItemSelected( );
|
/*currentPage_->onNewItemSelected( );
|
||||||
currentPage_->reallocateMenuSpritePoints( );
|
currentPage_->reallocateMenuSpritePoints( );*/
|
||||||
|
|
||||||
state = RETROFE_LAUNCH_EXIT;
|
state = RETROFE_LAUNCH_EXIT;
|
||||||
}
|
}
|
||||||
@ -982,7 +983,7 @@ void RetroFE::run( )
|
|||||||
{
|
{
|
||||||
// Handle FPS
|
// Handle FPS
|
||||||
lastTime = currentTime_;
|
lastTime = currentTime_;
|
||||||
currentTime_ = static_cast<float>( GET_RUN_TIME ) / 1000;
|
currentTime_ = static_cast<float>( GET_RUN_TIME_MS ) / 1000;
|
||||||
|
|
||||||
if ( currentTime_ < lastTime )
|
if ( currentTime_ < lastTime )
|
||||||
{
|
{
|
||||||
@ -1005,7 +1006,7 @@ void RetroFE::run( )
|
|||||||
|
|
||||||
// Force refresh variables
|
// Force refresh variables
|
||||||
#ifdef PERIOD_FORCE_REFRESH
|
#ifdef PERIOD_FORCE_REFRESH
|
||||||
if(static_cast<int>(GET_RUN_TIME) - ticks_last_refresh > PERIOD_FORCE_REFRESH){
|
if(static_cast<int>(GET_RUN_TIME_MS) - ticks_last_refresh > PERIOD_FORCE_REFRESH){
|
||||||
forceRender(true);
|
forceRender(true);
|
||||||
//printf("force render\n");
|
//printf("force render\n");
|
||||||
}
|
}
|
||||||
@ -1023,7 +1024,7 @@ void RetroFE::run( )
|
|||||||
mustRender_ = false;
|
mustRender_ = false;
|
||||||
render( );
|
render( );
|
||||||
#ifdef PERIOD_FORCE_REFRESH
|
#ifdef PERIOD_FORCE_REFRESH
|
||||||
ticks_last_refresh = static_cast<int>(GET_RUN_TIME);
|
ticks_last_refresh = static_cast<int>(GET_RUN_TIME_MS);
|
||||||
#endif //PERIOD_FORCE_REFRESH
|
#endif //PERIOD_FORCE_REFRESH
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user