mirror of
				https://github.com/coop-deluxe/sm64coopdx.git
				synced 2025-10-30 08:01:01 +00:00 
			
		
		
		
	fixed non directory mod reloading for dev mode
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build coop / build-linux (push) Has been cancelled
				
			
		
			
				
	
				Build coop / build-steamos (push) Has been cancelled
				
			
		
			
				
	
				Build coop / build-windows-opengl (push) Has been cancelled
				
			
		
			
				
	
				Build coop / build-windows-directx (push) Has been cancelled
				
			
		
			
				
	
				Build coop / build-macos-arm (push) Has been cancelled
				
			
		
			
				
	
				Build coop / build-macos-intel (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build coop / build-linux (push) Has been cancelled
				
			Build coop / build-steamos (push) Has been cancelled
				
			Build coop / build-windows-opengl (push) Has been cancelled
				
			Build coop / build-windows-directx (push) Has been cancelled
				
			Build coop / build-macos-arm (push) Has been cancelled
				
			Build coop / build-macos-intel (push) Has been cancelled
				
			modName is the mod's actual name during a reload, when it needs to be the file path for non directory mods.
This commit is contained in:
		
							parent
							
								
									7c54a80f84
								
							
						
					
					
						commit
						a38a7525b5
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -348,10 +348,10 @@ static bool mod_load_files_dir(struct Mod* mod, char* fullPath, const char* subD | |||
|     return true; | ||||
| } | ||||
| 
 | ||||
| static bool mod_load_files(struct Mod* mod, char* modName, char* fullPath) { | ||||
| static bool mod_load_files(struct Mod* mod, char* fullPath) { | ||||
|     // read single lua file
 | ||||
|     if (!mod->isDirectory) { | ||||
|         return (mod_allocate_file(mod, modName) != NULL); | ||||
|         return (mod_allocate_file(mod, mod->relativePath) != NULL); | ||||
|     } | ||||
| 
 | ||||
|     // deal with mod directory
 | ||||
|  | @ -526,7 +526,7 @@ bool mod_refresh_files(struct Mod* mod) { | |||
|     dynos_generate_mod_pack(mod->basePath); | ||||
| 
 | ||||
|     // read files
 | ||||
|     if (!mod_load_files(mod, mod->name, mod->basePath)) { | ||||
|     if (!mod_load_files(mod, mod->basePath)) { | ||||
|         LOG_ERROR("Failed to load mod files for '%s'", mod->name); | ||||
|         return false; | ||||
|     } | ||||
|  | @ -613,7 +613,7 @@ bool mod_load(struct Mods* mods, char* basePath, char* modName) { | |||
|     mod->isDirectory = isDirectory; | ||||
| 
 | ||||
|     // read files
 | ||||
|     if (!mod_load_files(mod, modName, fullPath)) { | ||||
|     if (!mod_load_files(mod, fullPath)) { | ||||
|         LOG_ERROR("Failed to load mod files for '%s'", modName); | ||||
|         return false; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Isaac0-dev
						Isaac0-dev