Comment unused message fields and use vector for mouse pos instead.

This commit is contained in:
Reece Mackie 2019-04-25 20:56:26 +01:00
parent df204ad726
commit 51f5c8ed0b
3 changed files with 7 additions and 7 deletions

View File

@ -194,7 +194,7 @@ protected:
case SetMouseLocation:
{
CoreWindow ^window = CoreWindow::GetForCurrentThread();
Point mousePosScreen = Point(msg->Float0 + window->Bounds.X, msg->Float1 + window->Bounds.Y);
Point mousePosScreen = Point(msg->Vector0.x + window->Bounds.X, msg->Vector0.y + window->Bounds.Y);
window->PointerPosition = mousePosScreen;
break;
}

View File

@ -2248,8 +2248,8 @@ void SetMousePosition(int x, int y)
#if defined(PLATFORM_UWP)
UWPMessage* msg = CreateUWPMessage();
msg->Type = SetMouseLocation;
msg->Float0 = mousePosition.x;
msg->Float1 = mousePosition.y;
msg->Vector0.x = mousePosition.x;
msg->Vector0.y = mousePosition.y;
SendToUWP(msg);
#endif
}

View File

@ -896,7 +896,7 @@ typedef struct UWPMessage {
Vector2 Vector0;
//Int parameters
int Int0;
/*int Int0;
int Int1;
//Char parameters
@ -907,7 +907,7 @@ typedef struct UWPMessage {
float Float1;
//Bool parameters
bool Bool0;
bool Bool0;*/
//More parameters can be added and fed to functions
} UWPMessage;
@ -918,12 +918,12 @@ inline UWPMessage* CreateUWPMessage(void)
msg->Type = None;
Vector2 v0 = { 0, 0 };
msg->Vector0 = v0;
msg->Int0 = 0;
/*msg->Int0 = 0;
msg->Int1 = 0;
msg->Char0 = 0;
msg->Float0 = 0;
msg->Float1 = 0;
msg->Bool0 = false;
msg->Bool0 = false;*/
return msg;
}