mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Also include Geneva in default fonts list, fixes crashing on macOS panther
This commit is contained in:
parent
04b7cd62ee
commit
fa3a9ab3d7
@ -36,7 +36,7 @@ void DrawTextArgs_MakeEmpty(struct DrawTextArgs* args, struct FontDesc* font, cc
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Font functions------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
static String font_candidates[10] = {
|
||||
static String font_candidates[11] = {
|
||||
String_FromConst(""), /* Filled in with Drawer2D_FontName */
|
||||
String_FromConst("Arial"), /* preferred font on all platforms */
|
||||
String_FromConst("Liberation Sans"), /* nice looking fallbacks for linux */
|
||||
@ -46,7 +46,8 @@ static String font_candidates[10] = {
|
||||
String_FromConst("DejaVu Sans Book"),
|
||||
String_FromConst("Century Schoolbook L Roman"), /* commonly available on linux */
|
||||
String_FromConst("Slate For OnePlus"), /* android 10, some devices */
|
||||
String_FromConst("Roboto") /* android (broken on some android 10 devices) */
|
||||
String_FromConst("Roboto"), /* android (broken on some android 10 devices) */
|
||||
String_FromConst("Geneva") /* for ancient macOS versions*/
|
||||
};
|
||||
|
||||
/* adjusts height to be closer to system fonts */
|
||||
|
@ -81,13 +81,7 @@ static const char* GetCCErrorDesc(cc_result res) {
|
||||
case PNG_ERR_INVALID_HDR_SIZE: return "Invalid PNG header size";
|
||||
case PNG_ERR_TOO_WIDE: return "PNG image too wide";
|
||||
case PNG_ERR_TOO_TALL: return "PNG image too tall";
|
||||
case PNG_ERR_INVALID_COL_BPP: return "Invalid color type in PNG";
|
||||
case PNG_ERR_COMP_METHOD: return "Invalid compression in PNG";
|
||||
case PNG_ERR_FILTER: return "Invalid filter in PNG";
|
||||
case PNG_ERR_INTERLACED: return "Interlaced PNGs unsupported";
|
||||
case PNG_ERR_PAL_SIZE: return "Invalid size of palette data";
|
||||
case PNG_ERR_TRANS_COUNT: return "Invalid number of transparency entries";
|
||||
case PNG_ERR_TRANS_INVALID: return "Transparency invalid for color type";
|
||||
case PNG_ERR_REACHED_IEND: return "Incomplete PNG image data";
|
||||
case PNG_ERR_NO_DATA: return "No image in PNG";
|
||||
case PNG_ERR_INVALID_SCANLINE: return "Invalid PNG scanline type";
|
||||
|
@ -1433,7 +1433,7 @@ void* DynamicLib_Get2(void* lib, const char* name) {
|
||||
cc_bool DynamicLib_DescribeError(String* dst) {
|
||||
NSLinkEditErrors err = 0;
|
||||
const char* name = "";
|
||||
const char* msg = "";
|
||||
const char* msg = "";
|
||||
int errNum = 0;
|
||||
|
||||
NSLinkEditError(&err, &errNum, &name, &msg);
|
||||
|
@ -2310,7 +2310,7 @@ static void HookEvents(void) {
|
||||
/* However, we cannot use that since the event loop is managed by us instead. */
|
||||
/* Unfortunately, there is no proper API to duplicate that behaviour, so reply */
|
||||
/* on the undocumented GetMenuBarEventTarget to achieve similar behaviour. */
|
||||
/* TODO: Check if this still works on PowerPC */
|
||||
/* TODO: This is wrong for PowerPC. But at least it doesn't crash or anything. */
|
||||
#define _RTLD_DEFAULT ((void*)-2)
|
||||
getMenuBarEventTarget = DynamicLib_Get2(_RTLD_DEFAULT, "GetMenuBarEventTarget");
|
||||
InstallStandardEventHandler(GetApplicationEventTarget());
|
||||
|
Loading…
x
Reference in New Issue
Block a user