Merge branch 'master' of github.com:bkaradzic/bgfx

This commit is contained in:
bkaradzic 2014-01-24 22:38:43 -08:00
commit 47ce754e16
2 changed files with 8 additions and 5 deletions

View File

@ -186,15 +186,16 @@ namespace entry
case SDL_MOUSEMOTION:
{
const SDL_MouseMotionEvent& mev = event.motion;
int32_t mx = mev.xrel;
int32_t my = mev.yrel;
m_eventQueue.postMouseEvent(mx, my);
m_eventQueue.postMouseEvent(mev.x, mev.y);
}
break;
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
{
const SDL_MouseButtonEvent& mev = event.button;
m_eventQueue.postMouseEvent(mev.x, mev.y, MouseButton::Left, mev.type == SDL_MOUSEBUTTONDOWN);
}
break;
case SDL_KEYDOWN:
@ -269,6 +270,7 @@ namespace entry
void setMousePos(int32_t _mx, int32_t _my)
{
BX_UNUSED(_mx, _my);
}
void setMouseLock(bool _lock)
@ -371,6 +373,7 @@ namespace entry
int main(int _argc, const char* _argv[])
{
BX_UNUSED(_argc, _argv);
using namespace entry;
s_ctx.run();
return 0;

View File

@ -106,7 +106,7 @@ namespace bgfx
{
SDL_SysWMinfo wmi;
SDL_VERSION(&wmi.version);
if (-1 == SDL_GetWindowWMInfo(_window, &wmi) )
if (!SDL_GetWindowWMInfo(_window, &wmi) )
{
return false;
}