mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Merge branch 'Preview4_0' into feature-vfs-security
This commit is contained in:
commit
161ffc62fe
3013 changed files with 348715 additions and 182470 deletions
|
|
@ -64,17 +64,12 @@ S32 PlatformCursorControllerSDL::getDoubleClickHeight()
|
|||
|
||||
void PlatformCursorControllerSDL::setCursorPosition( S32 x, S32 y )
|
||||
{
|
||||
if( PlatformWindowManager::get() && PlatformWindowManager::get()->getFirstWindow() )
|
||||
{
|
||||
AssertFatal( dynamic_cast<PlatformWindowSDL*>( PlatformWindowManager::get()->getFirstWindow() ), "");
|
||||
PlatformWindowSDL *window = static_cast<PlatformWindowSDL*>( PlatformWindowManager::get()->getFirstWindow() );
|
||||
SDL_WarpMouseInWindow(window->getSDLWindow(), x, y);
|
||||
}
|
||||
SDL_WarpMouseGlobal(x, y);
|
||||
}
|
||||
|
||||
void PlatformCursorControllerSDL::getCursorPosition( Point2I &point )
|
||||
{
|
||||
SDL_GetMouseState( &point.x, &point.y );
|
||||
SDL_GetGlobalMouseState( &point.x, &point.y );
|
||||
}
|
||||
|
||||
void PlatformCursorControllerSDL::setCursorVisible( bool visible )
|
||||
|
|
|
|||
|
|
@ -86,6 +86,21 @@ namespace
|
|||
ret |= SI_ALT;
|
||||
}
|
||||
|
||||
// NOTE: For MacOS, this will treat command as Left or Right CTRL
|
||||
#ifdef TORQUE_OS_MAC
|
||||
if (mod & KMOD_LGUI)
|
||||
{
|
||||
ret |= SI_LCTRL;
|
||||
ret |= SI_CTRL;
|
||||
}
|
||||
|
||||
if (mod & KMOD_RGUI)
|
||||
{
|
||||
ret |= SI_RCTRL;
|
||||
ret |= SI_CTRL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue