I'm trying to get the position of the cursor by calling the mouse class and using the GetState method but the return value is always 0,0. I've searched everywhere and all the code looks the same on other examples. I've tried alternative ways of declare the class but I get the same results.
public void Update() {
var ms = Mouse.GetState();
cursorPos = new Vector2(ms.X, ms.y);
}