mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 10:35:11 -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; }
|
||||
|
||||
res = Music_PlayOgg(&stream);
|
||||
if (res) {
|
||||
Logger_SimpleWarn2(res, "playing", &path);
|
||||
stream.Close(&stream); break;
|
||||
}
|
||||
if (res) { Logger_SimpleWarn2(res, "playing", &path); }
|
||||
|
||||
res = stream.Close(&stream);
|
||||
if (res) { Logger_SysWarn2(res, "closing", &path); break; }
|
||||
/* No point logging error for closing readonly file */
|
||||
(void)stream.Close(&stream);
|
||||
|
||||
if (music_stopping) break;
|
||||
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_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 */
|
||||
CC_API void Font_Make(struct FontDesc* desc, int size, int flags);
|
||||
/* Frees an allocated font */
|
||||
|
@ -421,28 +421,34 @@ static void FontDirCallback(const cc_string* path, void* obj) {
|
||||
void Platform_LoadSysFonts(void) {
|
||||
int i;
|
||||
#if defined CC_BUILD_ANDROID
|
||||
static const cc_string dirs[3] = {
|
||||
static const cc_string dirs[] = {
|
||||
String_FromConst("/system/fonts"),
|
||||
String_FromConst("/system/font"),
|
||||
String_FromConst("/data/fonts"),
|
||||
};
|
||||
#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/pkg/lib/X11/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
|
||||
static const cc_string dirs[1] = {
|
||||
static const cc_string dirs[] = {
|
||||
String_FromConst("/system/data/fonts")
|
||||
};
|
||||
#elif defined CC_BUILD_DARWIN
|
||||
static const cc_string dirs[2] = {
|
||||
static const cc_string dirs[] = {
|
||||
String_FromConst("/System/Library/Fonts"),
|
||||
String_FromConst("/Library/Fonts")
|
||||
};
|
||||
#else
|
||||
static const cc_string dirs[2] = {
|
||||
static const cc_string dirs[] = {
|
||||
String_FromConst("/usr/share/fonts"),
|
||||
String_FromConst("/usr/local/share/fonts")
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user