mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Fix mouse position backward compatibility with new SDL2 versions.
Clamp the mouse coordinates to the window's dimensions.
This commit is contained in:
@@ -193,6 +193,8 @@ public:
|
||||
virtual int getPixelWidth() const = 0;
|
||||
virtual int getPixelHeight() const = 0;
|
||||
|
||||
virtual void clampPositionInWindow(double *wx, double *wy) const = 0;
|
||||
|
||||
// Note: window-space coordinates are not necessarily the same as
|
||||
// density-independent units (which toPixels and fromPixels use.)
|
||||
virtual void windowToPixelCoords(double *x, double *y) const = 0;
|
||||
|
||||
Reference in New Issue
Block a user