mirror of
https://github.com/holub/mame
synced 2025-06-02 02:49:44 +03:00
SDL: Fix OS X and Windows builds (no whatsnew)
This commit is contained in:
parent
f75bcedd30
commit
fb70e23067
@ -122,9 +122,7 @@
|
||||
// TYPE DEFINITIONS
|
||||
//============================================================
|
||||
|
||||
#ifdef SDLMAME_UNIX
|
||||
typedef void *osd_font;
|
||||
#endif
|
||||
|
||||
class sdl_osd_interface : public osd_interface
|
||||
{
|
||||
@ -148,12 +146,10 @@ public:
|
||||
// input overridables
|
||||
virtual void customize_input_type_list(input_type_desc *typelist);
|
||||
|
||||
#ifdef SDLMAME_UNIX
|
||||
// font overridables
|
||||
virtual osd_font font_open(const char *name, int &height);
|
||||
virtual void font_close(osd_font font);
|
||||
virtual bitmap_t *font_get_bitmap(osd_font font, unicode_char chnum, INT32 &width, INT32 &xoffs, INT32 &yoffs);
|
||||
#endif
|
||||
|
||||
private:
|
||||
static void osd_exit(running_machine &machine);
|
||||
|
@ -14,9 +14,11 @@
|
||||
#include <SDL/SDL_version.h>
|
||||
|
||||
#ifdef SDLMAME_UNIX
|
||||
#ifndef SDLMAME_MACOSX
|
||||
#include <SDL_ttf.h>
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// standard includes
|
||||
#ifdef MESS
|
||||
@ -286,12 +288,14 @@ int main(int argc, char *argv[])
|
||||
setvbuf(stderr, (char *) NULL, _IONBF, 0);
|
||||
|
||||
#ifdef SDLMAME_UNIX
|
||||
#ifndef SDLMAME_MACOSX
|
||||
if (TTF_Init() == -1)
|
||||
{
|
||||
printf("SDL_ttf failed: %s\n", TTF_GetError());
|
||||
}
|
||||
FcInit();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SDLMAME_OS2
|
||||
MorphToPM();
|
||||
@ -332,9 +336,11 @@ int main(int argc, char *argv[])
|
||||
//SDL_Quit();
|
||||
|
||||
#ifdef SDLMAME_UNIX
|
||||
#ifndef SDLMAME_MACOSX
|
||||
TTF_Quit();
|
||||
FcFini();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
exit(res);
|
||||
|
||||
@ -616,6 +622,39 @@ void sdl_osd_interface::init(running_machine &machine)
|
||||
}
|
||||
|
||||
#ifdef SDLMAME_UNIX
|
||||
#ifdef SDLMAME_MACOSX
|
||||
//-------------------------------------------------
|
||||
// font_open - attempt to "open" a handle to the
|
||||
// font with the given name
|
||||
//-------------------------------------------------
|
||||
|
||||
osd_font sdl_osd_interface::font_open(const char *_name, int &height)
|
||||
{
|
||||
return (osd_font)NULL;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// font_close - release resources associated with
|
||||
// a given OSD font
|
||||
//-------------------------------------------------
|
||||
|
||||
void sdl_osd_interface::font_close(osd_font font)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// font_get_bitmap - allocate and populate a
|
||||
// BITMAP_FORMAT_ARGB32 bitmap containing the
|
||||
// pixel values MAKE_ARGB(0xff,0xff,0xff,0xff)
|
||||
// or MAKE_ARGB(0x00,0xff,0xff,0xff) for each
|
||||
// pixel of a black & white font
|
||||
//-------------------------------------------------
|
||||
|
||||
bitmap_t *sdl_osd_interface::font_get_bitmap(osd_font font, unicode_char chnum, INT32 &width, INT32 &xoffs, INT32 &yoffs)
|
||||
{
|
||||
return (bitmap_t *)NULL;
|
||||
}
|
||||
#else
|
||||
//-------------------------------------------------
|
||||
// font_open - attempt to "open" a handle to the
|
||||
// font with the given name
|
||||
@ -829,4 +868,37 @@ bitmap_t *sdl_osd_interface::font_get_bitmap(osd_font font, unicode_char chnum,
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
#endif // not OSX
|
||||
#else // not UNIX
|
||||
//-------------------------------------------------
|
||||
// font_open - attempt to "open" a handle to the
|
||||
// font with the given name
|
||||
//-------------------------------------------------
|
||||
|
||||
osd_font sdl_osd_interface::font_open(const char *_name, int &height)
|
||||
{
|
||||
return (osd_font)NULL;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// font_close - release resources associated with
|
||||
// a given OSD font
|
||||
//-------------------------------------------------
|
||||
|
||||
void sdl_osd_interface::font_close(osd_font font)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// font_get_bitmap - allocate and populate a
|
||||
// BITMAP_FORMAT_ARGB32 bitmap containing the
|
||||
// pixel values MAKE_ARGB(0xff,0xff,0xff,0xff)
|
||||
// or MAKE_ARGB(0x00,0xff,0xff,0xff) for each
|
||||
// pixel of a black & white font
|
||||
//-------------------------------------------------
|
||||
|
||||
bitmap_t *sdl_osd_interface::font_get_bitmap(osd_font font, unicode_char chnum, INT32 &width, INT32 &xoffs, INT32 &yoffs)
|
||||
{
|
||||
return (bitmap_t *)NULL;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user