Different cwd for android
This commit is contained in:
		
							parent
							
								
									9dc42914de
								
							
						
					
					
						commit
						3d02e533eb
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -220,6 +220,14 @@ int main(int argc, char *argv[])
 | 
			
		|||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef __ANDROID__
 | 
			
		||||
	const char *android_path = SDL_AndroidGetInternalStoragePath();
 | 
			
		||||
	if (!android_path || chdir(android_path) != 0) {
 | 
			
		||||
		showInitError(std::string("Unable to switch into ") + std::string((android_path ? android_path : "NULL")));
 | 
			
		||||
		return 0;
 | 
			
		||||
	}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	/* now we load the config */
 | 
			
		||||
	Config conf;
 | 
			
		||||
	conf.read(argc, argv);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue