mirror of
				https://github.com/PancakeTAS/lsfg-vk.git
				synced 2025-10-30 07:01:10 +00:00 
			
		
		
		
	check only for partial path
This commit is contained in:
		
							parent
							
								
									bb976ea863
								
							
						
					
					
						commit
						f62e658b11
					
				
					 2 changed files with 5 additions and 2 deletions
				
			
		|  | @ -13,6 +13,7 @@ | ||||||
| #include <unordered_map> | #include <unordered_map> | ||||||
| #include <string_view> | #include <string_view> | ||||||
| #include <filesystem> | #include <filesystem> | ||||||
|  | #include <algorithm> | ||||||
| #include <exception> | #include <exception> | ||||||
| #include <stdexcept> | #include <stdexcept> | ||||||
| #include <iostream> | #include <iostream> | ||||||
|  | @ -207,7 +208,9 @@ Configuration Config::getConfig(std::string_view name) { | ||||||
|         return globalConf; |         return globalConf; | ||||||
| 
 | 
 | ||||||
|     const auto& games = *gameConfs; |     const auto& games = *gameConfs; | ||||||
|     auto it = games.find(std::string(name)); |     auto it = std::ranges::find_if(games, [&name](const auto& pair) { | ||||||
|  |         return name.ends_with(pair.first); | ||||||
|  |     }); | ||||||
|     if (it != games.end()) |     if (it != games.end()) | ||||||
|         return it->second; |         return it->second; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -217,7 +217,7 @@ std::string Utils::getProcessName() { | ||||||
|     if (exe_len <= 0) |     if (exe_len <= 0) | ||||||
|         return "Unknown Process"; |         return "Unknown Process"; | ||||||
|     exe.at(static_cast<size_t>(exe_len)) = '\0'; |     exe.at(static_cast<size_t>(exe_len)) = '\0'; | ||||||
|     return{basename(exe.data())}; |     return{exe.data()}; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /// Get the config file
 | /// Get the config file
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 PancakeTAS
						PancakeTAS