win32, irrl 1.5.1, d3d9:
CursorControl does not update its internal window size variables when the the window has been resized. This results in incorrect behavior when requesting relative pos etc..
Steps to reproduce:
1) Start in windowed mode (with resize=true)
2) Inspect GetDevice()->getCursorControl()->getRelativePosition() return values
3) Resize window
4) Inspect GetDevice()->getCursorControl()->getRelativePosition() return values again and notice incorrectness.
[fixed]CursorControl bug when resizing window
Yeah, I see the problem, InvWindowSize is not updated, same in WinCE. Easy to fix, but I'm on the wrong system at the moment. I'll try find some time to fix it next days (unless someone does it before me).
Thanks for reporting.
Thanks for reporting.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
By the way, in WinCE the GetCursorPos() (used by CursorControl) returns FALSE on some devices (like my Eten Glofish X500 and WM5 SDK simulator). As result the default mouse handling code of camera nodes doesn't work as expected. The code below fixes the problem (CIrrDeviceWinCE.h):
Code: Select all
POINT p;
if (!GetCursorPos(&p))
{
DWORD xy = GetMessagePos();
p.x = GET_X_LPARAM(xy);
p.y = GET_Y_LPARAM(xy);
}
Both bugs should be fixed now in svn. Thanks also to rvl2, I hope I didn't mess up anything as I have no WinCE system so I always can't test that.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm