MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / LoadControllerConfigs

Method LoadControllerConfigs

Source/SysPSP/Input/InputManagerPSP.cpp:751–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749//
750//*****************************************************************************
751void IInputManager::LoadControllerConfigs( const char * p_dir )
752{
753 IO::FindHandleT find_handle;
754 IO::FindDataT find_data;
755 if(IO::FindFileOpen( p_dir, &find_handle, find_data ))
756 {
757 do
758 {
759 const char * filename( find_data.Name );
760 const char * last_period( strrchr( filename, '.' ) );
761 if(last_period != NULL)
762 {
763 if( _strcmpi(last_period, ".ini") == 0 )
764 {
765 std::string full_path;
766
767 full_path = p_dir;
768 full_path += filename;
769
770 CControllerConfig * p_config( BuildControllerConfig( full_path.c_str() ) );
771
772 if( p_config != NULL )
773 {
774 mControllerConfigs.push_back( p_config );
775 }
776 }
777 }
778 }
779 while(IO::FindFileNext( find_handle, find_data ));
780
781 IO::FindFileClose( find_handle );
782 }
783}
784
785//*****************************************************************************
786// Build a default controller configuration

Callers

nothing calls this directly

Calls 4

FindFileOpenFunction · 0.50
FindFileNextFunction · 0.50
FindFileCloseFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected