mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 03:55:19 -04:00
OpenBSD: Fix being unable to start due to unable being able to find a supported font (Thanks zielony12, addresses #954)
This commit is contained in:
parent
c3b10668ff
commit
57a8699152
@ -1306,13 +1306,10 @@ static void Music_RunLoop(void) {
|
|||||||
if (res) { Logger_SysWarn2(res, "opening", &path); break; }
|
if (res) { Logger_SysWarn2(res, "opening", &path); break; }
|
||||||
|
|
||||||
res = Music_PlayOgg(&stream);
|
res = Music_PlayOgg(&stream);
|
||||||
if (res) {
|
if (res) { Logger_SimpleWarn2(res, "playing", &path); }
|
||||||
Logger_SimpleWarn2(res, "playing", &path);
|
|
||||||
stream.Close(&stream); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
res = stream.Close(&stream);
|
/* No point logging error for closing readonly file */
|
||||||
if (res) { Logger_SysWarn2(res, "closing", &path); break; }
|
(void)stream.Close(&stream);
|
||||||
|
|
||||||
if (music_stopping) break;
|
if (music_stopping) break;
|
||||||
delay = Random_Range(&rnd, music_minDelay, music_maxDelay);
|
delay = Random_Range(&rnd, music_minDelay, music_maxDelay);
|
||||||
|
@ -91,7 +91,7 @@ char Drawer2D_LastColor(const cc_string* text, int start);
|
|||||||
cc_bool Drawer2D_IsWhiteColor(char c);
|
cc_bool Drawer2D_IsWhiteColor(char c);
|
||||||
cc_bool Drawer2D_UNSAFE_NextPart(cc_string* left, cc_string* part, BitmapCol* color);
|
cc_bool Drawer2D_UNSAFE_NextPart(cc_string* left, cc_string* part, BitmapCol* color);
|
||||||
|
|
||||||
/* Allocates a new instance of the default font using the given size and flags
|
/* Allocates a new instance of the default font using the given size and flags */
|
||||||
/* Uses Font_MakeBitmapped or SysFont_MakeDefault depending on Drawer2D_BitmappedText */
|
/* Uses Font_MakeBitmapped or SysFont_MakeDefault depending on Drawer2D_BitmappedText */
|
||||||
CC_API void Font_Make(struct FontDesc* desc, int size, int flags);
|
CC_API void Font_Make(struct FontDesc* desc, int size, int flags);
|
||||||
/* Frees an allocated font */
|
/* Frees an allocated font */
|
||||||
|
@ -421,28 +421,34 @@ static void FontDirCallback(const cc_string* path, void* obj) {
|
|||||||
void Platform_LoadSysFonts(void) {
|
void Platform_LoadSysFonts(void) {
|
||||||
int i;
|
int i;
|
||||||
#if defined CC_BUILD_ANDROID
|
#if defined CC_BUILD_ANDROID
|
||||||
static const cc_string dirs[3] = {
|
static const cc_string dirs[] = {
|
||||||
String_FromConst("/system/fonts"),
|
String_FromConst("/system/fonts"),
|
||||||
String_FromConst("/system/font"),
|
String_FromConst("/system/font"),
|
||||||
String_FromConst("/data/fonts"),
|
String_FromConst("/data/fonts"),
|
||||||
};
|
};
|
||||||
#elif defined CC_BUILD_NETBSD
|
#elif defined CC_BUILD_NETBSD
|
||||||
static const cc_string dirs[3] = {
|
static const cc_string dirs[] = {
|
||||||
String_FromConst("/usr/X11R7/lib/X11/fonts"),
|
String_FromConst("/usr/X11R7/lib/X11/fonts"),
|
||||||
String_FromConst("/usr/pkg/lib/X11/fonts"),
|
String_FromConst("/usr/pkg/lib/X11/fonts"),
|
||||||
String_FromConst("/usr/pkg/share/fonts")
|
String_FromConst("/usr/pkg/share/fonts")
|
||||||
};
|
};
|
||||||
|
#elif defined CC_BUILD_OPENBSD
|
||||||
|
static const cc_string dirs[] = {
|
||||||
|
String_FromConst("/usr/X11R6/lib/X11/fonts"),
|
||||||
|
String_FromConst("/usr/share/fonts"),
|
||||||
|
String_FromConst("/usr/local/share/fonts")
|
||||||
|
};
|
||||||
#elif defined CC_BUILD_HAIKU
|
#elif defined CC_BUILD_HAIKU
|
||||||
static const cc_string dirs[1] = {
|
static const cc_string dirs[] = {
|
||||||
String_FromConst("/system/data/fonts")
|
String_FromConst("/system/data/fonts")
|
||||||
};
|
};
|
||||||
#elif defined CC_BUILD_DARWIN
|
#elif defined CC_BUILD_DARWIN
|
||||||
static const cc_string dirs[2] = {
|
static const cc_string dirs[] = {
|
||||||
String_FromConst("/System/Library/Fonts"),
|
String_FromConst("/System/Library/Fonts"),
|
||||||
String_FromConst("/Library/Fonts")
|
String_FromConst("/Library/Fonts")
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
static const cc_string dirs[2] = {
|
static const cc_string dirs[] = {
|
||||||
String_FromConst("/usr/share/fonts"),
|
String_FromConst("/usr/share/fonts"),
|
||||||
String_FromConst("/usr/local/share/fonts")
|
String_FromConst("/usr/local/share/fonts")
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user