include haiku.h in setup.c
improve haiku_get_app_path()
This commit is contained in:
		
							parent
							
								
									3fa8c98c17
								
							
						
					
					
						commit
						fd702d31b5
					
				@ -63,12 +63,13 @@ char* haiku_get_clipboard()
 | 
				
			|||||||
const char* haiku_get_app_path()
 | 
					const char* haiku_get_app_path()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	static image_info info;
 | 
						static image_info info;
 | 
				
			||||||
	static int32 cookie = 0;
 | 
						int32 cookie = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (cookie == 0) do {
 | 
						while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
 | 
				
			||||||
		get_next_image_info(B_CURRENT_TEAM, &cookie, &info);
 | 
							if (info.type == B_APP_IMAGE)
 | 
				
			||||||
	} while (info.type != B_APP_IMAGE);
 | 
								return info.name;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return info.name;
 | 
						return NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
@ -43,6 +43,7 @@
 | 
				
			|||||||
  #include <errno.h>
 | 
					  #include <errno.h>
 | 
				
			||||||
#elif defined(__HAIKU__)
 | 
					#elif defined(__HAIKU__)
 | 
				
			||||||
  #include <FindDirectory.h>
 | 
					  #include <FindDirectory.h>
 | 
				
			||||||
 | 
					  #include "haiku.h"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "struct.h"
 | 
					#include "struct.h"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user