mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 22:38:34 +00:00
(Haiku) Fix fill_pathname_application_path()
This commit is contained in:
parent
ad23b58654
commit
ebeec0d056
16
file_path.c
16
file_path.c
@ -23,6 +23,10 @@
|
||||
#include "compat/posix_string.h"
|
||||
#include "miscellaneous.h"
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <kernel/image.h>
|
||||
#endif
|
||||
|
||||
#if (defined(__CELLOS_LV2__) && !defined(__PSL1GHT__)) || defined(__QNX__) || defined(PSP)
|
||||
#include <unistd.h> //stat() is defined here
|
||||
#endif
|
||||
@ -874,6 +878,18 @@ void fill_pathname_application_path(char *buf, size_t size)
|
||||
rarch_assert(strlcat(buf, "nobin", size) < size);
|
||||
return;
|
||||
}
|
||||
#elif defined(__HAIKU__)
|
||||
image_info info;
|
||||
int32 cookie = 0;
|
||||
|
||||
while (get_next_image_info(0, &cookie, &info) == B_OK)
|
||||
{
|
||||
if (info.type == B_APP_IMAGE)
|
||||
{
|
||||
strlcpy(buf, info.name, size);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#else
|
||||
*buf = '\0';
|
||||
pid_t pid = getpid();
|
||||
|
Loading…
Reference in New Issue
Block a user