mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-02 03:38:08 +03:00
emscripten: Make load_mincho_font() return bool
This commit is contained in:
@@ -45,7 +45,7 @@ static int fsize; // フォントの大きさ
|
||||
int dt_setfont(int type, int size) {
|
||||
#ifdef __EMSCRIPTEN__
|
||||
if (type == FONT_MINCHO) {
|
||||
if (load_mincho_font() != OK)
|
||||
if (!load_mincho_font())
|
||||
type = FONT_GOTHIC;
|
||||
}
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -468,7 +468,7 @@ void commandZZ13() {
|
||||
int num = getCaliValue();
|
||||
#ifdef __EMSCRIPTEN__
|
||||
if (num == FONT_MINCHO) {
|
||||
if (load_mincho_font() != OK)
|
||||
if (!load_mincho_font())
|
||||
num = FONT_GOTHIC;
|
||||
}
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -235,7 +235,7 @@ bool font_get_antialias(void) {
|
||||
}
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
EM_ASYNC_JS(int, load_mincho_font, (void), {
|
||||
await xsystem35.load_mincho_font();
|
||||
EM_ASYNC_JS(bool, load_mincho_font, (void), {
|
||||
return await xsystem35.load_mincho_font();
|
||||
});
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ extern struct SDL_Surface *font_get_glyph(const char *str_utf8);
|
||||
extern SDL_Rect font_draw_glyph(int x, int y, const char *str_utf8, uint8_t col);
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
extern int load_mincho_font(void);
|
||||
extern bool load_mincho_font(void);
|
||||
#endif
|
||||
|
||||
#endif /* __FONT_H__ */
|
||||
|
||||
Reference in New Issue
Block a user