diff options
author | 2015-04-22 13:41:00 +0200 | |
---|---|---|
committer | 2015-04-22 13:41:00 +0200 | |
commit | 98297ad03d3a015bf9bbbf62c5e2086225efd22d (patch) | |
tree | 84bc47f32760b9a003fd7a393485f895b180077d /src/osd/modules/font/font_sdl.c | |
parent | 2bc25b0a9d875de8a6cbfbce3d6dabfa9979a3a5 (diff) |
fix linux build (nw)
Diffstat (limited to 'src/osd/modules/font/font_sdl.c')
-rw-r--r-- | src/osd/modules/font/font_sdl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/osd/modules/font/font_sdl.c b/src/osd/modules/font/font_sdl.c index 12571623583..3ef57aec3d2 100644 --- a/src/osd/modules/font/font_sdl.c +++ b/src/osd/modules/font/font_sdl.c @@ -18,7 +18,7 @@ #endif -#include "std::string.h" +#include "corestr.h" #include "corealloc.h" #include "fileio.h" @@ -55,15 +55,15 @@ bool osd_font_sdl::open(const char *font_path, const char *_name, int &height) // accept qualifiers from the name std::string name(_name); - if (name.cmp("default")==0) + if (name.compare("default")==0) { name = "Liberation Sans"; } - bool bold = (name.replace(0, "[B]", "") + name.replace(0, "[b]", "") > 0); - bool italic = (name.replace(0, "[I]", "") + name.replace(0, "[i]", "") > 0); - bool underline = (name.replace(0, "[U]", "") + name.replace(0, "[u]", "") > 0); - bool strike = (name.replace(0, "[S]", "") + name.replace(0, "[s]", "") > 0); + bool bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0); + bool italic = (strreplace(name, "[I]", "") + strreplace(name, "[i]", "") > 0); + bool underline = (strreplace(name, "[U]", "") + strreplace(name, "[u]", "") > 0); + bool strike = (strreplace(name, "[S]", "") + strreplace(name, "[s]", "") > 0); // first up, try it as a filename font = TTF_OpenFont_Magic(name, POINT_SIZE); |