Skip to content

Commit 9e42fd4

Browse files
committed
warp mouse
1 parent d9c2341 commit 9e42fd4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Qor/Input.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ class Input:
404404
glm::vec2 mouse_pos() const {
405405
return m_MousePos;
406406
}
407+
void mouse_pos(glm::vec2 mp) const {
408+
SDL_WarpMouseGlobal(std::max(0.0f, mp.x), glm::max(0.0f, mp.y));
409+
}
407410

408411
void relative_mouse(bool b) {
409412
if(b != m_bRelMouse) {

0 commit comments

Comments
 (0)