Lock mouse to window

broken image

There is also the possibility that height and width// deltas are the same, in which case we just default to treating it like height// changed the most.bool widthDeltaGreatest = ( fabs(widthLastRender - width) > fabs(heightLastRender - height) ) float MAX_ASPECT = 1.7777777f // 16:9float MIN_ASPECT = 1.

broken image

Its not that hard to google how to lock your mouse to a single screen. This allows us to treat corner resizing like it was a side of// the window instead. Escrito originalmente por Agentti Kiivi: Dual monitor tools.

broken image

I don't have the algorithm in front of me, but I'll try some pseudocode from memory:įloat width = clientRect.right - clientRect.left float height = clientRect.bottom - clientRect.top // Keep track of whether user has moved width or height the most since the// last render.