mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-28 06:20:21 +02:00
Fix: SDL device can support FPS camera animator again
Also no longer restricting mouse position to 0-windowsize (restriction for other devices got removed earlier) And adding some commented out lines to Makesfile for easier testing of SDL. We probably should use some parameter which can be passed to Makefiles for that in the future. Note: This does not fix all cursor troubles for SDL - it still does not support relative rectangle Bit arguably how to handle setting/getting mouse position for SDL, for example it still doesn't support a reference rectangle. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6424 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -143,6 +143,8 @@ namespace irr
|
||||
virtual void setPosition(s32 x, s32 y) IRR_OVERRIDE
|
||||
{
|
||||
SDL_WarpMouse( x, y );
|
||||
CursorPos.X = x;
|
||||
CursorPos.Y = y;
|
||||
}
|
||||
|
||||
//! Returns the current position of the mouse cursor.
|
||||
@ -172,15 +174,6 @@ namespace irr
|
||||
{
|
||||
CursorPos.X = Device->MouseX;
|
||||
CursorPos.Y = Device->MouseY;
|
||||
|
||||
if (CursorPos.X < 0)
|
||||
CursorPos.X = 0;
|
||||
if (CursorPos.X > (s32)Device->Width)
|
||||
CursorPos.X = Device->Width;
|
||||
if (CursorPos.Y < 0)
|
||||
CursorPos.Y = 0;
|
||||
if (CursorPos.Y > (s32)Device->Height)
|
||||
CursorPos.Y = Device->Height;
|
||||
}
|
||||
|
||||
CIrrDeviceSDL* Device;
|
||||
|
Reference in New Issue
Block a user