summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/entry/entry.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/entry.cpp')
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/entry.cpp b/3rdparty/bgfx/examples/common/entry/entry.cpp
index edc237a49cd..97701343dba 100644
--- a/3rdparty/bgfx/examples/common/entry/entry.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry.cpp
@@ -254,7 +254,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
bool setOrToggle(uint32_t& _flags, const char* _name, uint32_t _bit, int _first, int _argc, char const* const* _argv)
{
- if (0 == strcmp(_argv[_first], _name) )
+ if (0 == bx::strncmp(_argv[_first], _name) )
{
int arg = _first+1;
if (_argc > arg)
@@ -310,11 +310,13 @@ BX_PRAGMA_DIAGNOSTIC_POP();
bgfx::setDebug(s_debug);
return 0;
}
- else if (0 == strcmp(_argv[1], "screenshot") )
+ else if (0 == bx::strncmp(_argv[1], "screenshot") )
{
+ bgfx::FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
+
if (_argc > 2)
{
- bgfx::saveScreenShot(_argv[2]);
+ bgfx::requestScreenShot(fbh, _argv[2]);
}
else
{
@@ -323,12 +325,12 @@ BX_PRAGMA_DIAGNOSTIC_POP();
char filePath[256];
bx::snprintf(filePath, sizeof(filePath), "temp/screenshot-%d", tt);
- bgfx::saveScreenShot(filePath);
+ bgfx::requestScreenShot(fbh, filePath);
}
return 0;
}
- else if (0 == strcmp(_argv[1], "fullscreen") )
+ else if (0 == bx::strncmp(_argv[1], "fullscreen") )
{
WindowHandle window = { 0 };
toggleFullscreen(window);