From d193abb0ad0827d5ecc0915d65b67faf68a87097 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 3 Sep 2016 13:30:42 +0200 Subject: Update BGFX and BX packages and update MAME code to support new API (nw) Generated missing shaders (nw) --- 3rdparty/bgfx/examples/common/entry/entry_android.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to '3rdparty/bgfx/examples/common/entry/entry_android.cpp') diff --git a/3rdparty/bgfx/examples/common/entry/entry_android.cpp b/3rdparty/bgfx/examples/common/entry/entry_android.cpp index 90bfd131368..155fb894bce 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_android.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_android.cpp @@ -17,6 +17,7 @@ #include #include #include +#include extern "C" { @@ -28,6 +29,18 @@ extern "C" namespace entry { + /// + inline void androidSetWindow(::ANativeWindow* _window) + { + bgfx::PlatformData pd; + pd.ndt = NULL; + pd.nwh = _window; + pd.context = NULL; + pd.backBuffer = NULL; + pd.backBufferDS = NULL; + bgfx::setPlatformData(pd); + } + struct GamepadRemap { uint16_t m_keyCode; @@ -142,7 +155,7 @@ namespace entry if (m_window != m_app->window) { m_window = m_app->window; - bgfx::androidSetWindow(m_window); + androidSetWindow(m_window); int32_t width = ANativeWindow_getWidth(m_window); int32_t height = ANativeWindow_getHeight(m_window); -- cgit v1.2.3-70-g09d2