summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/entry/entry.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-09-08 05:14:35 +1000
committer Vas Crabb <vas@vastheman.com>2023-09-08 05:14:35 +1000
commit44eb5ea3c69dcec37e2b687e479297af5303efc3 (patch)
tree2784753bdf56564ce3b4cf0f410bf07709854fdd /3rdparty/bgfx/examples/common/entry/entry.cpp
parent1147d8fc44c701ed0235e9374f97d218fae37b32 (diff)
Revert "Updated bgfx, bx and bimg to current upstream versions. (#11493)"
This reverts commit 1c61ccfe840cdae7a9f92292946a45f3b47e2412.
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/entry.cpp')
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/entry.cpp b/3rdparty/bgfx/examples/common/entry/entry.cpp
index 14a489250ec..58a671e6a70 100644
--- a/3rdparty/bgfx/examples/common/entry/entry.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2023 Branimir Karadzic. All rights reserved.
+ * Copyright 2011-2022 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE
*/
@@ -530,11 +530,11 @@ BX_PRAGMA_DIAGNOSTIC_POP();
int runApp(AppI* _app, int _argc, const char* const* _argv)
{
- setWindowSize(kDefaultWindowHandle, s_width, s_height);
-
_app->init(_argc, _argv, s_width, s_height);
bgfx::frame();
+ setWindowSize(kDefaultWindowHandle, s_width, s_height);
+
#if BX_PLATFORM_EMSCRIPTEN
s_app = _app;
emscripten_set_main_loop(&updateApp, -1, 1);
@@ -566,7 +566,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
return;
}
- AppI** apps = (AppI**)bx::alloc(g_allocator, s_numApps*sizeof(AppI*) );
+ AppI** apps = (AppI**)BX_ALLOC(g_allocator, s_numApps*sizeof(AppI*) );
uint32_t ii = 0;
for (AppI* app = getFirstApp(); NULL != app; app = app->getNext() )
@@ -589,7 +589,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
ai->m_next = NULL;
}
- bx::free(g_allocator, apps);
+ BX_FREE(g_allocator, apps);
}
int main(int _argc, const char* const* _argv)
@@ -666,10 +666,10 @@ restart:
cmdShutdown();
- bx::deleteObject(g_allocator, s_fileReader);
+ BX_DELETE(g_allocator, s_fileReader);
s_fileReader = NULL;
- bx::deleteObject(g_allocator, s_fileWriter);
+ BX_DELETE(g_allocator, s_fileWriter);
s_fileWriter = NULL;
return result;
@@ -1010,14 +1010,14 @@ restart:
void* TinyStlAllocator::static_allocate(size_t _bytes)
{
- return bx::alloc(getAllocator(), _bytes);
+ return BX_ALLOC(getAllocator(), _bytes);
}
void TinyStlAllocator::static_deallocate(void* _ptr, size_t /*_bytes*/)
{
if (NULL != _ptr)
{
- bx::free(getAllocator(), _ptr);
+ BX_FREE(getAllocator(), _ptr);
}
}
@@ -1037,8 +1037,3 @@ extern "C" void* entry_get_native_display_handle()
{
return entry::getNativeDisplayHandle();
}
-
-extern "C" bgfx::NativeWindowHandleType::Enum entry_get_native_window_handle_type()
-{
- return entry::getNativeWindowHandleType(entry::kDefaultWindowHandle);
-}