Skip to content

Commit f77a9c1

Browse files
committed
Media (Haiku): enable support
1 parent d3a5f98 commit f77a9c1

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ elseif(SunOS)
10921092
)
10931093
elseif(Haiku)
10941094
list(APPEND LIBFASTFETCH_SRC
1095+
src/common/dbus.c
10951096
src/common/io/io_unix.c
10961097
src/common/netif/netif_haiku.c
10971098
src/common/networking_linux.c

src/options/general.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_va
3030
else if (ffStrEqualsIgnCase(key, "detectVersion"))
3131
options->detectVersion = yyjson_get_bool(val);
3232

33-
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__)
33+
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
3434
else if (ffStrEqualsIgnCase(key, "escapeBedrock"))
3535
options->escapeBedrock = yyjson_get_bool(val);
3636
else if (ffStrEqualsIgnCase(key, "playerName"))
@@ -75,7 +75,7 @@ bool ffOptionsParseGeneralCommandLine(FFOptionsGeneral* options, const char* key
7575
else if(ffStrEqualsIgnCase(key, "--detect-version"))
7676
options->detectVersion = ffOptionParseBoolean(value);
7777

78-
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__)
78+
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
7979
else if(ffStrEqualsIgnCase(key, "--escape-bedrock"))
8080
options->escapeBedrock = ffOptionParseBoolean(value);
8181
else if(ffStrEqualsIgnCase(key, "--player-name"))
@@ -106,7 +106,7 @@ void ffOptionsInitGeneral(FFOptionsGeneral* options)
106106
options->multithreading = true;
107107
options->detectVersion = true;
108108

109-
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__)
109+
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
110110
options->escapeBedrock = true;
111111
ffStrbufInit(&options->playerName);
112112
options->dsForceDrm = FF_DS_FORCE_DRM_TYPE_FALSE;
@@ -117,7 +117,7 @@ void ffOptionsInitGeneral(FFOptionsGeneral* options)
117117

118118
void ffOptionsDestroyGeneral(FF_MAYBE_UNUSED FFOptionsGeneral* options)
119119
{
120-
#if defined(__linux__) || defined(__FreeBSD__)
120+
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
121121
ffStrbufDestroy(&options->playerName);
122122
#endif
123123
}
@@ -135,7 +135,7 @@ void ffOptionsGenerateGeneralJsonConfig(FFOptionsGeneral* options, yyjson_mut_do
135135
if (options->processingTimeout != defaultOptions.processingTimeout)
136136
yyjson_mut_obj_add_int(doc, obj, "processingTimeout", options->processingTimeout);
137137

138-
#if defined(__linux__) || defined(__FreeBSD__)
138+
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
139139

140140
if (options->escapeBedrock != defaultOptions.escapeBedrock)
141141
yyjson_mut_obj_add_bool(doc, obj, "escapeBedrock", options->escapeBedrock);

src/options/general.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ typedef struct FFOptionsGeneral
1616
bool detectVersion;
1717

1818
// Module options that cannot be put in module option structure
19-
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__)
19+
#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
2020
FFstrbuf playerName;
2121
bool escapeBedrock;
2222
FFDsForceDrmType dsForceDrm;

0 commit comments

Comments
 (0)