From 94b1e168b2b97b48b81f7a8f64406b0a6f64184e Mon Sep 17 00:00:00 2001 From: "R. Belmont" Date: Wed, 4 Jan 2023 23:29:18 -0500 Subject: Revert "Update BGFX, BX and BIMG (#10750)" (#10787) This reverts commit 5581eaa50a42256242f32569f59ce10d70ddd8c2 due to link failure on macOS. --- .../bgfx/examples/common/entry/entry_android.cpp | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (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 3a6ac8561d3..cd2baf9044f 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_android.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_android.cpp @@ -1,12 +1,14 @@ /* - * Copyright 2011-2022 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE + * Copyright 2011-2021 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include "entry_p.h" #if ENTRY_CONFIG_USE_NATIVE && BX_PLATFORM_ANDROID +#include + #include #include @@ -27,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; @@ -219,6 +233,7 @@ namespace entry if (m_window != m_app->window) { m_window = m_app->window; + androidSetWindow(m_window); int32_t width = ANativeWindow_getWidth(m_window); int32_t height = ANativeWindow_getHeight(m_window); @@ -535,21 +550,6 @@ namespace entry BX_UNUSED(_handle, _lock); } - void* getNativeWindowHandle(WindowHandle _handle) - { - if (kDefaultWindowHandle.idx == _handle.idx) - { - return s_ctx.m_window; - } - - return NULL; - } - - void* getNativeDisplayHandle() - { - return NULL; - } - int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData) { BX_UNUSED(_thread); -- cgit v1.2.3-70-g09d2