summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/07-callback/callback.cpp
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-11-02 21:20:41 +0100
committer ImJezze <jezze@gmx.net>2015-11-02 21:20:41 +0100
commitd70ccc7ba30af5f60c54b94e3d169f3da9d06d79 (patch)
tree97859e1d03d0121ba2e7d3e5c5bddf6d1811ff18 /3rdparty/bgfx/examples/07-callback/callback.cpp
parent21b577483b0408f0e33654cc45fa6c5573d72138 (diff)
parentc1981761ba5a1b111092cafe99941d8a3303982a (diff)
Merge pull request #7 from mamedev/master
Sync to base master
Diffstat (limited to '3rdparty/bgfx/examples/07-callback/callback.cpp')
-rw-r--r--3rdparty/bgfx/examples/07-callback/callback.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/3rdparty/bgfx/examples/07-callback/callback.cpp b/3rdparty/bgfx/examples/07-callback/callback.cpp
index fa0b0329d88..0def881acdc 100644
--- a/3rdparty/bgfx/examples/07-callback/callback.cpp
+++ b/3rdparty/bgfx/examples/07-callback/callback.cpp
@@ -364,8 +364,10 @@ private:
uint32_t m_maxBlocks;
};
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
BgfxCallback callback;
BgfxAllocator allocator;
@@ -376,9 +378,10 @@ int _main_(int /*_argc*/, char** /*_argv*/)
bgfx::RendererType::Enum renderers[bgfx::RendererType::Count];
uint8_t numRenderers = bgfx::getSupportedRenderers(renderers);
- bgfx::init(
- renderers[bx::getHPCounter() % numRenderers] /* randomize renderer */
- , BGFX_PCI_ID_NONE
+ bgfx::init(bgfx::RendererType::Count == args.m_type
+ ? renderers[bx::getHPCounter() % numRenderers] /* randomize renderer */
+ : args.m_type
+ , args.m_pciId
, 0
, &callback // custom callback handler
, &allocator // custom allocator