Fixes for Linux

This commit is contained in:
Vas Crabb 2016-03-14 19:51:52 +11:00
parent fc87913612
commit a6e758175d
2 changed files with 4 additions and 3 deletions

View File

@ -37,6 +37,7 @@
#include <cassert>
#include <cerrno>
#include <cstring>
#include <memory>
#include <type_traits>
#include <vector>

View File

@ -73,7 +73,7 @@ bool osd_font_sdl::open(const char *font_path, const char *_name, int &height)
osd_printf_verbose("Searching font %s in -%s\n", name.c_str(), OPTION_FONTPATH);
//emu_file file(options().font_path(), OPEN_FLAG_READ);
emu_file file(font_path, OPEN_FLAG_READ);
if (file.open(name.c_str()) == FILERR_NONE)
if (file.open(name.c_str()) == osd_file::error::NONE)
{
std::string full_name = file.fullpath();
font = TTF_OpenFont_Magic(full_name, POINT_SIZE);
@ -185,7 +185,7 @@ bool osd_font_sdl::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &
TTF_Font * osd_font_sdl::TTF_OpenFont_Magic(std::string name, int fsize)
{
emu_file file(OPEN_FLAG_READ);
if (file.open(name.c_str()) == FILERR_NONE)
if (file.open(name.c_str()) == osd_file::error::NONE)
{
unsigned char buffer[5] = { 0xff, 0xff, 0xff, 0xff, 0xff };
unsigned char magic[5] = { 0x00, 0x01, 0x00, 0x00, 0x00 };
@ -199,7 +199,7 @@ TTF_Font * osd_font_sdl::TTF_OpenFont_Magic(std::string name, int fsize)
bool osd_font_sdl::BDF_Check_Magic(std::string name)
{
emu_file file(OPEN_FLAG_READ);
if (file.open(name.c_str()) == FILERR_NONE)
if (file.open(name.c_str()) == osd_file::error::NONE)
{
unsigned char buffer[9];
unsigned char magic[9] = { 'S', 'T', 'A', 'R', 'T', 'F', 'O', 'N', 'T' };