• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Mac OSX window_mouse_set() does nothing on Yoyo Compiler build

This code for my software cursor works on PC, PC with the yoyo compiler, and OSX. However, when using the Yoyo compiler and running the game on Mac OS, the mouse cursor is unaffected by display_mouse_set() or window_mouse_set(). As a result of this, in the below code, the mouse is not set to the center of the window and the values designated to move the software cursor are incorrect.

Is this a bug or something I'm not understanding with retina displays?

Code:
if instance_exists(oSoftwareCursor)
{
    if gameplay
    {
        //GAMEPLAY MODE
      
        //Track mouse pointer movement in window coordinates
        var cursorMoveX = window_mouse_get_x() - windowCenterX;
        var cursorMoveY = window_mouse_get_y() - windowCenterY;
        window_mouse_set(windowCenterX, windowCenterY);
      
        //Move the software cursor in room coordinates
        oSoftwareCursor.x += cursorMoveX * scaleWindowToRoom;
        oSoftwareCursor.y += cursorMoveY * scaleWindowToRoom;
      
        //Clamp the software cursor to the boundary
        oSoftwareCursor.x = clamp(oSoftwareCursor.x, mouseConstrainX1, mouseConstrainX2);
        oSoftwareCursor.y = clamp(oSoftwareCursor.y, mouseConstrainY1, mouseConstrainY2);   
    }
}
 
L

Lonewolff

Guest
Just checked and it does work on Windows. So, I suspect this function has been overlooked on OSX.

Bug report time! :D

(Or oSoftwareCursor doesn't exist at the time of calling)
 
Just checked and it does work on Windows. So, I suspect this function has been overlooked on OSX.

Bug report time! :D

(Or oSoftwareCursor doesn't exist at the time of calling)
The cursor definitely exists in my model, because the result is the cursor zooming all over the place (because it throws the value from the mouse position, not the center of the window)
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
This sounds like it could be a bug, so I'd request that you file a report with YYG and include a link to download a test project that shows the issue please!
 
Top