mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
These init calls all returned false. No need for a return value in this
case. [Couriersud]
This commit is contained in:
parent
aef55ded1f
commit
118658da9d
@ -362,7 +362,7 @@ void renderer_sdl2::expand_copy_info(const copy_info_t *list)
|
||||
}
|
||||
|
||||
// FIXME: machine only used to access options.
|
||||
bool renderer_sdl2::init(running_machine &machine)
|
||||
void renderer_sdl2::init(running_machine &machine)
|
||||
{
|
||||
osd_printf_verbose("Using SDL native texturing driver (SDL 2.0+)\n");
|
||||
|
||||
@ -380,8 +380,6 @@ bool renderer_sdl2::init(running_machine &machine)
|
||||
osd_printf_warning("Warning: Unable to load opengl library: %s\n", stemp ? stemp : "<default>");
|
||||
else
|
||||
osd_printf_verbose("Loaded opengl shared library: %s\n", stemp ? stemp : "<default>");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
@ -158,7 +158,7 @@ public:
|
||||
m_sdl_renderer = nullptr;
|
||||
}
|
||||
|
||||
static bool init(running_machine &machine);
|
||||
static void init(running_machine &machine);
|
||||
static void exit();
|
||||
|
||||
virtual int create() override;
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
renderer_bgfx(osd_window *w);
|
||||
virtual ~renderer_bgfx();
|
||||
|
||||
static bool init(running_machine &machine) { return false; }
|
||||
static void init(running_machine &machine) { }
|
||||
static void exit();
|
||||
|
||||
virtual int create() override;
|
||||
|
@ -277,7 +277,7 @@ static void texture_set_data(ogl_texture_info *texture, const render_texinfo *te
|
||||
bool renderer_ogl::s_shown_video_info = false;
|
||||
bool renderer_ogl::s_dll_loaded = false;
|
||||
|
||||
bool renderer_ogl::init(running_machine &machine)
|
||||
void renderer_ogl::init(running_machine &machine)
|
||||
{
|
||||
s_dll_loaded = false;
|
||||
|
||||
@ -287,8 +287,6 @@ bool renderer_ogl::init(running_machine &machine)
|
||||
#else
|
||||
osd_printf_verbose("Using SDL multi-window OpenGL driver (SDL 2.0+)\n");
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//============================================================
|
||||
|
@ -130,7 +130,7 @@ public:
|
||||
}
|
||||
virtual ~renderer_ogl();
|
||||
|
||||
static bool init(running_machine &machine);
|
||||
static void init(running_machine &machine);
|
||||
static void exit();
|
||||
|
||||
virtual int create() override;
|
||||
|
@ -90,10 +90,9 @@ int drawsdl_scale_mode(const char *s)
|
||||
// drawsdl_init
|
||||
//============================================================
|
||||
|
||||
bool renderer_sdl1::init(running_machine &machine)
|
||||
void renderer_sdl1::init(running_machine &machine)
|
||||
{
|
||||
osd_printf_verbose("Using SDL multi-window soft driver (SDL 2.0+)\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
//============================================================
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
}
|
||||
virtual ~renderer_sdl1();
|
||||
|
||||
static bool init(running_machine &machine);
|
||||
static void init(running_machine &machine);
|
||||
static void exit() { }
|
||||
|
||||
virtual int create() override;
|
||||
|
@ -211,37 +211,23 @@ bool sdl_osd_interface::window_init()
|
||||
sdlwindow_thread_id(nullptr, 0);
|
||||
|
||||
// initialize the drawers
|
||||
if (video_config.mode == VIDEO_MODE_BGFX)
|
||||
|
||||
switch (video_config.mode)
|
||||
{
|
||||
if (renderer_bgfx::init(machine()))
|
||||
{
|
||||
case VIDEO_MODE_BGFX:
|
||||
renderer_bgfx::init(machine());
|
||||
break;
|
||||
#if (USE_OPENGL)
|
||||
video_config.mode = VIDEO_MODE_OPENGL;
|
||||
}
|
||||
}
|
||||
if (video_config.mode == VIDEO_MODE_OPENGL)
|
||||
{
|
||||
if (renderer_ogl::init(machine()))
|
||||
{
|
||||
video_config.mode = VIDEO_MODE_SOFT;
|
||||
#else
|
||||
video_config.mode = VIDEO_MODE_SOFT;
|
||||
case VIDEO_MODE_OPENGL:
|
||||
renderer_ogl::init(machine());
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (video_config.mode == VIDEO_MODE_SDL2ACCEL)
|
||||
{
|
||||
if (renderer_sdl2::init(machine()))
|
||||
{
|
||||
video_config.mode = VIDEO_MODE_SOFT;
|
||||
}
|
||||
}
|
||||
if (video_config.mode == VIDEO_MODE_SOFT)
|
||||
{
|
||||
if (renderer_sdl1::init(machine()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
case VIDEO_MODE_SDL2ACCEL:
|
||||
renderer_sdl2::init(machine());
|
||||
break;
|
||||
case VIDEO_MODE_SOFT:
|
||||
renderer_sdl1::init(machine());
|
||||
break;
|
||||
}
|
||||
|
||||
/* We may want to set a number of the hints SDL2 provides.
|
||||
|
Loading…
Reference in New Issue
Block a user