From 1a6a018fc3b393e6f769d7db3aea397175aba459 Mon Sep 17 00:00:00 2001 From: Бранимир Караџић Date: Tue, 10 Aug 2021 20:28:56 +0200 Subject: Update bgfx to latest --- 3rdparty/bgfx/examples/common/entry/entry_sdl.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to '3rdparty/bgfx/examples/common/entry/entry_sdl.cpp') diff --git a/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp b/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp index 96aa49149f4..360d1df0add 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 Branimir Karadzic. All rights reserved. + * Copyright 2011-2021 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -10,7 +10,7 @@ #if BX_PLATFORM_LINUX || BX_PLATFORM_BSD # if ENTRY_CONFIG_USE_WAYLAND # include -# endif +# endif #elif BX_PLATFORM_WINDOWS # define SDL_MAIN_HANDLED #endif @@ -65,12 +65,12 @@ namespace entry # else return (void*)wmi.info.x11.window; # endif -# elif BX_PLATFORM_OSX +# elif BX_PLATFORM_OSX || BX_PLATFORM_IOS return wmi.info.cocoa.window; # elif BX_PLATFORM_WINDOWS return wmi.info.win.window; -# elif BX_PLATFORM_STEAMLINK - return wmi.info.vivante.window; +# elif BX_PLATFORM_ANDROID + return wmi.info.android.window; # endif // BX_PLATFORM_ } @@ -90,12 +90,8 @@ namespace entry # else pd.ndt = wmi.info.x11.display; # endif -# elif BX_PLATFORM_OSX - pd.ndt = NULL; -# elif BX_PLATFORM_WINDOWS +# else pd.ndt = NULL; -# elif BX_PLATFORM_STEAMLINK - pd.ndt = wmi.info.vivante.display; # endif // BX_PLATFORM_ pd.nwh = sdlNativeWindowHandle(_window); @@ -109,7 +105,7 @@ namespace entry static void sdlDestroyWindow(SDL_Window* _window) { - if(!_window) + if(!_window) return; # if BX_PLATFORM_LINUX || BX_PLATFORM_BSD # if ENTRY_CONFIG_USE_WAYLAND @@ -161,7 +157,7 @@ namespace entry static void initTranslateKey(uint16_t _sdl, Key::Enum _key) { - BX_CHECK(_sdl < BX_COUNTOF(s_translateKey), "Out of bounds %d.", _sdl); + BX_ASSERT(_sdl < BX_COUNTOF(s_translateKey), "Out of bounds %d.", _sdl); s_translateKey[_sdl&0xff] = (uint8_t)_key; } -- cgit v1.2.3-70-g09d2