summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/entry
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/common/entry')
-rw-r--r--3rdparty/bgfx/examples/common/entry/cmd.cpp9
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry.cpp12
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry.h3
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_android.cpp2
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_asmjs.cpp2
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_glfw.cpp12
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_nacl.cpp4
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_p.h5
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_sdl.cpp17
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_windows.cpp27
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_x11.cpp21
-rw-r--r--3rdparty/bgfx/examples/common/entry/input.cpp10
12 files changed, 61 insertions, 63 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/cmd.cpp b/3rdparty/bgfx/examples/common/entry/cmd.cpp
index 7c6c3c99307..ae3d14d3400 100644
--- a/3rdparty/bgfx/examples/common/entry/cmd.cpp
+++ b/3rdparty/bgfx/examples/common/entry/cmd.cpp
@@ -3,11 +3,6 @@
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
-#include <ctype.h> // isspace
-#include <stdint.h>
-#include <stdlib.h> // size_t
-#include <string.h> // strlen
-
#include <bx/allocator.h>
#include <bx/hash.h>
#include <bx/commandline.h>
@@ -33,7 +28,7 @@ struct CmdContext
void add(const char* _name, ConsoleFn _fn, void* _userData)
{
- uint32_t cmd = bx::hashMurmur2A(_name, (uint32_t)strlen(_name) );
+ uint32_t cmd = bx::hashMurmur2A(_name, (uint32_t)bx::strnlen(_name) );
BX_CHECK(m_lookup.end() == m_lookup.find(cmd), "Command \"%s\" already exist.", _name);
Func fn = { _fn, _userData };
m_lookup.insert(stl::make_pair(cmd, fn) );
@@ -51,7 +46,7 @@ struct CmdContext
if (argc > 0)
{
int err = -1;
- uint32_t cmd = bx::hashMurmur2A(argv[0], (uint32_t)strlen(argv[0]) );
+ uint32_t cmd = bx::hashMurmur2A(argv[0], (uint32_t)bx::strnlen(argv[0]) );
CmdLookup::iterator it = m_lookup.find(cmd);
if (it != m_lookup.end() )
{
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);
diff --git a/3rdparty/bgfx/examples/common/entry/entry.h b/3rdparty/bgfx/examples/common/entry/entry.h
index cd3df67ac17..cfdfd25dd81 100644
--- a/3rdparty/bgfx/examples/common/entry/entry.h
+++ b/3rdparty/bgfx/examples/common/entry/entry.h
@@ -7,7 +7,6 @@
#define ENTRY_H_HEADER_GUARD
#include "dbg.h"
-#include <string.h> // memset
#include <bx/bx.h>
#include <bx/string.h>
@@ -227,7 +226,7 @@ namespace entry
{
GamepadState()
{
- memset(m_axis, 0, sizeof(m_axis) );
+ bx::memSet(m_axis, 0, sizeof(m_axis) );
}
int32_t m_axis[entry::GamepadAxis::Count];
diff --git a/3rdparty/bgfx/examples/common/entry/entry_android.cpp b/3rdparty/bgfx/examples/common/entry/entry_android.cpp
index 50abdad8194..78ed2f7a507 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_android.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry_android.cpp
@@ -96,7 +96,7 @@ namespace entry
Context()
: m_window(NULL)
{
- memset(m_value, 0, sizeof(m_value) );
+ bx::memSet(m_value, 0, sizeof(m_value) );
// Deadzone values from xinput.h
m_deadzone[GamepadAxis::LeftX ] =
diff --git a/3rdparty/bgfx/examples/common/entry/entry_asmjs.cpp b/3rdparty/bgfx/examples/common/entry/entry_asmjs.cpp
index 69a7ea31cf1..9cabff5e838 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_asmjs.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry_asmjs.cpp
@@ -29,7 +29,7 @@ namespace entry
, m_my(0)
, m_scroll(0)
{
- memset(s_translateKey, 0, sizeof(s_translateKey));
+ bx::memSet(s_translateKey, 0, sizeof(s_translateKey));
s_translateKey[27] = Key::Esc;
s_translateKey[uint8_t('\n')] =
s_translateKey[uint8_t('\r')] = Key::Return;
diff --git a/3rdparty/bgfx/examples/common/entry/entry_glfw.cpp b/3rdparty/bgfx/examples/common/entry/entry_glfw.cpp
index 215cbbb5cba..0ff8fd31c64 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_glfw.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry_glfw.cpp
@@ -158,8 +158,8 @@ namespace entry
GamepadGLFW()
: m_connected(false)
{
- memset(m_axes, 0, sizeof(m_axes));
- memset(m_buttons, 0, sizeof(m_buttons));
+ bx::memSet(m_axes, 0, sizeof(m_axes));
+ bx::memSet(m_buttons, 0, sizeof(m_buttons));
}
void update(EventQueue& _eventQueue)
@@ -310,7 +310,7 @@ namespace entry
Context()
: m_scrollPos(0.0)
{
- memset(s_translateKey, 0, sizeof(s_translateKey));
+ bx::memSet(s_translateKey, 0, sizeof(s_translateKey));
s_translateKey[GLFW_KEY_ESCAPE] = Key::Esc;
s_translateKey[GLFW_KEY_ENTER] = Key::Return;
s_translateKey[GLFW_KEY_TAB] = Key::Tab;
@@ -589,7 +589,7 @@ namespace entry
WindowHandle findHandle(GLFWwindow* _window)
{
- bx::LwMutexScope scope(m_lock);
+ bx::MutexScope scope(m_lock);
for (uint32_t ii = 0, num = m_windowAlloc.getNumHandles(); ii < num; ++ii)
{
uint16_t idx = m_windowAlloc.getHandleAt(ii);
@@ -615,14 +615,14 @@ namespace entry
bx::Thread m_thread;
EventQueue m_eventQueue;
- bx::LwMutex m_lock;
+ bx::Mutex m_lock;
GLFWwindow* m_windows[ENTRY_CONFIG_MAX_WINDOWS];
bx::HandleAllocT<ENTRY_CONFIG_MAX_WINDOWS> m_windowAlloc;
GamepadGLFW m_gamepad[ENTRY_CONFIG_MAX_GAMEPADS];
- bx::SpScUnboundedQueueLf<Msg> m_msgs;
+ bx::SpScUnboundedQueueT<Msg> m_msgs;
double m_scrollPos;
};
diff --git a/3rdparty/bgfx/examples/common/entry/entry_nacl.cpp b/3rdparty/bgfx/examples/common/entry/entry_nacl.cpp
index ae7897347f0..b51a96e3446 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_nacl.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry_nacl.cpp
@@ -9,8 +9,6 @@
#include <bgfx/platform.h>
-#include <stdio.h>
-#include <string.h>
#include <pthread.h>
#include <string>
@@ -190,7 +188,7 @@ using namespace entry;
PP_EXPORT const void* PPP_GetInterface(const char* _name)
{
- if (0 == strcmp(_name, PPP_INSTANCE_INTERFACE) )
+ if (0 == bx::strncmp(_name, PPP_INSTANCE_INTERFACE) )
{
static PPP_Instance instanceInterface =
{
diff --git a/3rdparty/bgfx/examples/common/entry/entry_p.h b/3rdparty/bgfx/examples/common/entry/entry_p.h
index 74a279f8e2c..ab45cfef5b5 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_p.h
+++ b/3rdparty/bgfx/examples/common/entry/entry_p.h
@@ -11,7 +11,6 @@
#include <bx/spscqueue.h>
#include "entry.h"
-#include <string.h> // memcpy
#ifndef ENTRY_CONFIG_USE_NOOP
# define ENTRY_CONFIG_USE_NOOP (BX_PLATFORM_QNX)
@@ -199,7 +198,7 @@ namespace entry
{
CharEvent* ev = new CharEvent(_handle);
ev->m_len = _len;
- memcpy(ev->m_char, _char, 4);
+ bx::memCopy(ev->m_char, _char, 4);
m_queue.push(ev);
}
@@ -298,7 +297,7 @@ namespace entry
}
private:
- bx::SpScUnboundedQueue<Event> m_queue;
+ bx::SpScUnboundedQueueT<Event> m_queue;
};
} // namespace entry
diff --git a/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp b/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp
index 757c9f3a357..b8476f77bff 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp
@@ -26,6 +26,7 @@ BX_PRAGMA_DIAGNOSTIC_POP()
#endif // defined(None)
#include <stdio.h>
+#include <bx/mutex.h>
#include <bx/thread.h>
#include <bx/handlealloc.h>
#include <bx/readerwriter.h>
@@ -158,7 +159,7 @@ namespace entry
: m_controller(NULL)
, m_jid(INT32_MAX)
{
- memset(m_value, 0, sizeof(m_value) );
+ bx::memSet(m_value, 0, sizeof(m_value) );
// Deadzone values from xinput.h
m_deadzone[GamepadAxis::LeftX ] =
@@ -341,7 +342,7 @@ namespace entry
, m_mouseLock(false)
, m_fullscreen(false)
{
- memset(s_translateKey, 0, sizeof(s_translateKey) );
+ bx::memSet(s_translateKey, 0, sizeof(s_translateKey) );
initTranslateKey(SDL_SCANCODE_ESCAPE, Key::Esc);
initTranslateKey(SDL_SCANCODE_RETURN, Key::Return);
initTranslateKey(SDL_SCANCODE_TAB, Key::Tab);
@@ -425,7 +426,7 @@ namespace entry
initTranslateKey(SDL_SCANCODE_Y, Key::KeyY);
initTranslateKey(SDL_SCANCODE_Z, Key::KeyZ);
- memset(s_translateGamepad, uint8_t(Key::Count), sizeof(s_translateGamepad) );
+ bx::memSet(s_translateGamepad, uint8_t(Key::Count), sizeof(s_translateGamepad) );
initTranslateGamepad(SDL_CONTROLLER_BUTTON_A, Key::GamepadA);
initTranslateGamepad(SDL_CONTROLLER_BUTTON_B, Key::GamepadB);
initTranslateGamepad(SDL_CONTROLLER_BUTTON_X, Key::GamepadX);
@@ -442,7 +443,7 @@ namespace entry
initTranslateGamepad(SDL_CONTROLLER_BUTTON_START, Key::GamepadStart);
initTranslateGamepad(SDL_CONTROLLER_BUTTON_GUIDE, Key::GamepadGuide);
- memset(s_translateGamepadAxis, uint8_t(GamepadAxis::Count), sizeof(s_translateGamepadAxis) );
+ bx::memSet(s_translateGamepadAxis, uint8_t(GamepadAxis::Count), sizeof(s_translateGamepadAxis) );
initTranslateGamepadAxis(SDL_CONTROLLER_AXIS_LEFTX, GamepadAxis::LeftX);
initTranslateGamepadAxis(SDL_CONTROLLER_AXIS_LEFTY, GamepadAxis::LeftY);
initTranslateGamepadAxis(SDL_CONTROLLER_AXIS_TRIGGERLEFT, GamepadAxis::LeftZ);
@@ -923,7 +924,7 @@ namespace entry
WindowHandle findHandle(SDL_Window* _window)
{
- bx::LwMutexScope scope(m_lock);
+ bx::MutexScope scope(m_lock);
for (uint32_t ii = 0, num = m_windowAlloc.getNumHandles(); ii < num; ++ii)
{
uint16_t idx = m_windowAlloc.getHandleAt(ii);
@@ -972,7 +973,7 @@ namespace entry
bx::Thread m_thread;
EventQueue m_eventQueue;
- bx::LwMutex m_lock;
+ bx::Mutex m_lock;
bx::HandleAllocT<ENTRY_CONFIG_MAX_WINDOWS> m_windowAlloc;
SDL_Window* m_window[ENTRY_CONFIG_MAX_WINDOWS];
@@ -1011,7 +1012,7 @@ namespace entry
WindowHandle createWindow(int32_t _x, int32_t _y, uint32_t _width, uint32_t _height, uint32_t _flags, const char* _title)
{
- bx::LwMutexScope scope(s_ctx.m_lock);
+ bx::MutexScope scope(s_ctx.m_lock);
WindowHandle handle = { s_ctx.m_windowAlloc.alloc() };
if (UINT16_MAX != handle.idx)
@@ -1036,7 +1037,7 @@ namespace entry
{
sdlPostEvent(SDL_USER_WINDOW_DESTROY, _handle);
- bx::LwMutexScope scope(s_ctx.m_lock);
+ bx::MutexScope scope(s_ctx.m_lock);
s_ctx.m_windowAlloc.free(_handle.idx);
}
}
diff --git a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp
index ca38c9208c3..055c85788a2 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp
@@ -9,14 +9,17 @@
#include <bgfx/platform.h>
-#include <bx/uint32_t.h>
-#include <bx/thread.h>
#include <bx/mutex.h>
#include <bx/handlealloc.h>
+#include <bx/os.h>
+#include <bx/thread.h>
#include <bx/timer.h>
+#include <bx/uint32_t.h>
+
#include <tinystl/allocator.h>
#include <tinystl/string.h>
+#include <windows.h>
#include <windowsx.h>
#include <xinput.h>
@@ -34,7 +37,7 @@ namespace entry
inline void winSetHwnd(::HWND _window)
{
bgfx::PlatformData pd;
- memset(&pd, 0, sizeof(pd) );
+ bx::memSet(&pd, 0, sizeof(pd) );
pd.nwh = _window;
bgfx::setPlatformData(pd);
}
@@ -75,8 +78,8 @@ namespace entry
XInput()
: m_xinputdll(NULL)
{
- memset(m_connected, 0, sizeof(m_connected) );
- memset(m_state, 0, sizeof(m_state) );
+ bx::memSet(m_connected, 0, sizeof(m_connected) );
+ bx::memSet(m_state, 0, sizeof(m_state) );
m_deadzone[GamepadAxis::LeftX ] =
m_deadzone[GamepadAxis::LeftY ] = XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE;
@@ -85,7 +88,7 @@ namespace entry
m_deadzone[GamepadAxis::LeftZ ] =
m_deadzone[GamepadAxis::RightZ] = XINPUT_GAMEPAD_TRIGGER_THRESHOLD;
- memset(m_flip, 1, sizeof(m_flip) );
+ bx::memSet(m_flip, 1, sizeof(m_flip) );
m_flip[GamepadAxis::LeftY ] =
m_flip[GamepadAxis::RightY] = -1;
}
@@ -353,7 +356,7 @@ namespace entry
, m_init(false)
, m_exit(false)
{
- memset(s_translateKey, 0, sizeof(s_translateKey) );
+ bx::memSet(s_translateKey, 0, sizeof(s_translateKey) );
s_translateKey[VK_ESCAPE] = Key::Esc;
s_translateKey[VK_RETURN] = Key::Return;
s_translateKey[VK_TAB] = Key::Tab;
@@ -451,7 +454,7 @@ namespace entry
HINSTANCE instance = (HINSTANCE)GetModuleHandle(NULL);
WNDCLASSEXA wnd;
- memset(&wnd, 0, sizeof(wnd) );
+ bx::memSet(&wnd, 0, sizeof(wnd) );
wnd.cbSize = sizeof(wnd);
wnd.style = CS_HREDRAW | CS_VREDRAW;
wnd.lpfnWndProc = wndProc;
@@ -829,7 +832,7 @@ namespace entry
WindowHandle findHandle(HWND _hwnd)
{
- bx::LwMutexScope scope(m_lock);
+ bx::MutexScope scope(m_lock);
for (uint16_t ii = 0, num = m_windowAlloc.getNumHandles(); ii < num; ++ii)
{
uint16_t idx = m_windowAlloc.getHandleAt(ii);
@@ -967,7 +970,7 @@ namespace entry
static LRESULT CALLBACK wndProc(HWND _hwnd, UINT _id, WPARAM _wparam, LPARAM _lparam);
EventQueue m_eventQueue;
- bx::LwMutex m_lock;
+ bx::Mutex m_lock;
bx::HandleAllocT<ENTRY_CONFIG_MAX_WINDOWS> m_windowAlloc;
@@ -1018,7 +1021,7 @@ namespace entry
WindowHandle createWindow(int32_t _x, int32_t _y, uint32_t _width, uint32_t _height, uint32_t _flags, const char* _title)
{
- bx::LwMutexScope scope(s_ctx.m_lock);
+ bx::MutexScope scope(s_ctx.m_lock);
WindowHandle handle = { s_ctx.m_windowAlloc.alloc() };
if (UINT16_MAX != handle.idx)
@@ -1042,7 +1045,7 @@ namespace entry
{
PostMessage(s_ctx.m_hwnd[0], WM_USER_WINDOW_DESTROY, _handle.idx, 0);
- bx::LwMutexScope scope(s_ctx.m_lock);
+ bx::MutexScope scope(s_ctx.m_lock);
s_ctx.m_windowAlloc.free(_handle.idx);
}
}
diff --git a/3rdparty/bgfx/examples/common/entry/entry_x11.cpp b/3rdparty/bgfx/examples/common/entry/entry_x11.cpp
index 7016b8b640f..78e4306eb2d 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_x11.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry_x11.cpp
@@ -20,7 +20,8 @@
#include <bx/thread.h>
#include <bx/os.h>
#include <bx/handlealloc.h>
-#include <string.h> // memset
+#include <bx/mutex.h>
+
#include <string>
#include <fcntl.h>
@@ -107,7 +108,7 @@ namespace entry
{
m_fd = open("/dev/input/js0", O_RDONLY | O_NONBLOCK);
- memset(m_value, 0, sizeof(m_value) );
+ bx::memSet(m_value, 0, sizeof(m_value) );
// Deadzone values from xinput.h
m_deadzone[GamepadAxis::LeftX ] =
@@ -250,7 +251,7 @@ namespace entry
: m_modifiers(Modifier::None)
, m_exit(false)
{
- memset(s_translateKey, 0, sizeof(s_translateKey) );
+ bx::memSet(s_translateKey, 0, sizeof(s_translateKey) );
initTranslateKey(XK_Escape, Key::Esc);
initTranslateKey(XK_Return, Key::Return);
initTranslateKey(XK_Tab, Key::Tab);
@@ -352,7 +353,7 @@ namespace entry
m_visual = DefaultVisual(m_display, screen);
m_root = RootWindow(m_display, screen);
- memset(&m_windowAttrs, 0, sizeof(m_windowAttrs) );
+ bx::memSet(&m_windowAttrs, 0, sizeof(m_windowAttrs) );
m_windowAttrs.background_pixmap = 0;
m_windowAttrs.border_pixel = 0;
m_windowAttrs.event_mask = 0
@@ -379,7 +380,7 @@ namespace entry
// Clear window to black.
XSetWindowAttributes attr;
- memset(&attr, 0, sizeof(attr) );
+ bx::memSet(&attr, 0, sizeof(attr) );
XChangeWindowAttributes(m_display, m_window[0], CWBackPixel, &attr);
const char* wmDeleteWindowName = "WM_DELETE_WINDOW";
@@ -605,7 +606,7 @@ namespace entry
// Clear window to black.
XSetWindowAttributes attr;
- memset(&attr, 0, sizeof(attr) );
+ bx::memSet(&attr, 0, sizeof(attr) );
XChangeWindowAttributes(m_display, window, CWBackPixel, &attr);
const char* wmDeleteWindowName = "WM_DELETE_WINDOW";
@@ -639,7 +640,7 @@ namespace entry
WindowHandle findHandle(Window _window)
{
- bx::LwMutexScope scope(m_lock);
+ bx::MutexScope scope(m_lock);
for (uint32_t ii = 0, num = m_windowAlloc.getNumHandles(); ii < num; ++ii)
{
uint16_t idx = m_windowAlloc.getHandleAt(ii);
@@ -662,7 +663,7 @@ namespace entry
int32_t m_mz;
EventQueue m_eventQueue;
- bx::LwMutex m_lock;
+ bx::Mutex m_lock;
bx::HandleAllocT<ENTRY_CONFIG_MAX_WINDOWS> m_windowAlloc;
int32_t m_depth;
@@ -703,7 +704,7 @@ namespace entry
WindowHandle createWindow(int32_t _x, int32_t _y, uint32_t _width, uint32_t _height, uint32_t _flags, const char* _title)
{
- bx::LwMutexScope scope(s_ctx.m_lock);
+ bx::MutexScope scope(s_ctx.m_lock);
WindowHandle handle = { s_ctx.m_windowAlloc.alloc() };
if (isValid(handle) )
@@ -729,7 +730,7 @@ namespace entry
XUnmapWindow(s_ctx.m_display, s_ctx.m_window[_handle.idx]);
XDestroyWindow(s_ctx.m_display, s_ctx.m_window[_handle.idx]);
- bx::LwMutexScope scope(s_ctx.m_lock);
+ bx::MutexScope scope(s_ctx.m_lock);
s_ctx.m_windowAlloc.free(_handle.idx);
}
}
diff --git a/3rdparty/bgfx/examples/common/entry/input.cpp b/3rdparty/bgfx/examples/common/entry/input.cpp
index 697ef1e5e69..e90d05ebb47 100644
--- a/3rdparty/bgfx/examples/common/entry/input.cpp
+++ b/3rdparty/bgfx/examples/common/entry/input.cpp
@@ -35,7 +35,7 @@ struct InputMouse
m_norm[2] = 0.0f;
}
- memset(m_buttons, 0, sizeof(m_buttons) );
+ bx::memSet(m_buttons, 0, sizeof(m_buttons) );
}
void setResolution(uint16_t _width, uint16_t _height)
@@ -78,8 +78,8 @@ struct InputKeyboard
void reset()
{
- memset(m_key, 0, sizeof(m_key) );
- memset(m_once, 0xff, sizeof(m_once) );
+ bx::memSet(m_key, 0, sizeof(m_key) );
+ bx::memSet(m_once, 0xff, sizeof(m_once) );
}
static uint32_t encodeKeyState(uint8_t _modifiers, bool _down)
@@ -130,7 +130,7 @@ struct InputKeyboard
popChar();
}
- memcpy(&m_char[m_ring.m_current], _char, 4);
+ bx::memCopy(&m_char[m_ring.m_current], _char, 4);
m_ring.commit(4);
}
@@ -169,7 +169,7 @@ struct Gamepad
void reset()
{
- memset(m_axis, 0, sizeof(m_axis) );
+ bx::memSet(m_axis, 0, sizeof(m_axis) );
}
void setAxis(entry::GamepadAxis::Enum _axis, int32_t _value)