diff options
| author | Ray <[email protected]> | 2021-04-26 00:36:22 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-04-26 00:36:22 +0200 |
| commit | bb3303338979dde40168928efc6ea31ed776407d (patch) | |
| tree | 3c9e4652db2f54240655a39202dd73c06520034b /examples/core | |
| parent | a44815e9395e63644e4adeac928155f1e465aed7 (diff) | |
| parent | 30db611e924ad2ad61137a944a0da4257045cd5f (diff) | |
| download | raylib-bb3303338979dde40168928efc6ea31ed776407d.tar.gz raylib-bb3303338979dde40168928efc6ea31ed776407d.zip | |
Merge branch 'master' of https://github.com/raysan5/raylib
Diffstat (limited to 'examples/core')
| -rw-r--r-- | examples/core/core_window_letterbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/core/core_window_letterbox.c b/examples/core/core_window_letterbox.c index dca70d9a..2c3af6df 100644 --- a/examples/core/core_window_letterbox.c +++ b/examples/core/core_window_letterbox.c @@ -70,7 +70,7 @@ int main(void) Vector2 virtualMouse = { 0 }; virtualMouse.x = (mouse.x - (GetScreenWidth() - (gameScreenWidth*scale))*0.5f)/scale; virtualMouse.y = (mouse.y - (GetScreenHeight() - (gameScreenHeight*scale))*0.5f)/scale; - virtualMouse = ClampValue(virtualMouse, (Vector2){ 0, 0 }, (Vector2){ gameScreenWidth, gameScreenHeight }); + virtualMouse = ClampValue(virtualMouse, (Vector2){ 0, 0 }, (Vector2){ (float)gameScreenWidth, (float)gameScreenHeight }); // Apply the same transformation as the virtual mouse to the real mouse (i.e. to work with raygui) //SetMouseOffset(-(GetScreenWidth() - (gameScreenWidth*scale))*0.5f, -(GetScreenHeight() - (gameScreenHeight*scale))*0.5f); |
