Make specifying invalid bgfx backends non-fatal, nw

This commit is contained in:
therealmogminer@gmail.com 2016-03-21 06:33:45 +01:00
parent 825d575195
commit b224d9a77a

View File

@ -153,8 +153,8 @@ int renderer_bgfx::create()
} }
else else
{ {
osd_printf_verbose("Unknown backend type '%s'\n", backend.c_str()); printf("Unknown backend type '%s', going with auto-detection\n", backend.c_str());
assert(false); bgfx::init();
} }
bgfx::reset(m_width[window().m_index], m_height[window().m_index], video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE); bgfx::reset(m_width[window().m_index], m_height[window().m_index], video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE);
// Enable debug text. // Enable debug text.
@ -356,7 +356,7 @@ void renderer_bgfx::process_screen_quad(int view, render_primitive* prim)
} }
m_targets->update_guest_targets(tex_width, tex_height); m_targets->update_guest_targets(tex_width, tex_height);
m_targets->update_window_count(screens); m_targets->update_window_count(screens);
m_screen_chain->process(prim, view, view / m_screen_chain->applicable_passes(), *m_textures, window(), get_blend_state(PRIMFLAG_GET_BLENDMODE(prim->flags))); m_screen_chain->process(prim, view, view / m_screen_chain->applicable_passes(), *m_textures, window(), get_blend_state(PRIMFLAG_GET_BLENDMODE(prim->flags)));
m_textures->add_provider("screen", nullptr); m_textures->add_provider("screen", nullptr);
@ -743,7 +743,7 @@ int renderer_bgfx::handle_screen_chains()
// process // process
render_primitive *prim = window().m_primlist->first(); render_primitive *prim = window().m_primlist->first();
int seen = 0; int seen = 0;
while (prim != nullptr) while (prim != nullptr)
{ {
@ -846,7 +846,7 @@ int renderer_bgfx::draw(int update)
allocate_buffer(prim, blend, &buffer); allocate_buffer(prim, blend, &buffer);
buffer_status status = buffer_primitives(view_index, atlas_valid, &prim, &buffer, screen); buffer_status status = buffer_primitives(view_index, atlas_valid, &prim, &buffer, screen);
if (status == BUFFER_SCREEN) if (status == BUFFER_SCREEN)
{ {
screen++; screen++;