Comment unused message fields and use vector for mouse pos instead.
This commit is contained in:
parent
df204ad726
commit
51f5c8ed0b
|
|
@ -194,7 +194,7 @@ protected:
|
||||||
case SetMouseLocation:
|
case SetMouseLocation:
|
||||||
{
|
{
|
||||||
CoreWindow ^window = CoreWindow::GetForCurrentThread();
|
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;
|
window->PointerPosition = mousePosScreen;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2248,8 +2248,8 @@ void SetMousePosition(int x, int y)
|
||||||
#if defined(PLATFORM_UWP)
|
#if defined(PLATFORM_UWP)
|
||||||
UWPMessage* msg = CreateUWPMessage();
|
UWPMessage* msg = CreateUWPMessage();
|
||||||
msg->Type = SetMouseLocation;
|
msg->Type = SetMouseLocation;
|
||||||
msg->Float0 = mousePosition.x;
|
msg->Vector0.x = mousePosition.x;
|
||||||
msg->Float1 = mousePosition.y;
|
msg->Vector0.y = mousePosition.y;
|
||||||
SendToUWP(msg);
|
SendToUWP(msg);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -896,7 +896,7 @@ typedef struct UWPMessage {
|
||||||
Vector2 Vector0;
|
Vector2 Vector0;
|
||||||
|
|
||||||
//Int parameters
|
//Int parameters
|
||||||
int Int0;
|
/*int Int0;
|
||||||
int Int1;
|
int Int1;
|
||||||
|
|
||||||
//Char parameters
|
//Char parameters
|
||||||
|
|
@ -907,7 +907,7 @@ typedef struct UWPMessage {
|
||||||
float Float1;
|
float Float1;
|
||||||
|
|
||||||
//Bool parameters
|
//Bool parameters
|
||||||
bool Bool0;
|
bool Bool0;*/
|
||||||
|
|
||||||
//More parameters can be added and fed to functions
|
//More parameters can be added and fed to functions
|
||||||
} UWPMessage;
|
} UWPMessage;
|
||||||
|
|
@ -918,12 +918,12 @@ inline UWPMessage* CreateUWPMessage(void)
|
||||||
msg->Type = None;
|
msg->Type = None;
|
||||||
Vector2 v0 = { 0, 0 };
|
Vector2 v0 = { 0, 0 };
|
||||||
msg->Vector0 = v0;
|
msg->Vector0 = v0;
|
||||||
msg->Int0 = 0;
|
/*msg->Int0 = 0;
|
||||||
msg->Int1 = 0;
|
msg->Int1 = 0;
|
||||||
msg->Char0 = 0;
|
msg->Char0 = 0;
|
||||||
msg->Float0 = 0;
|
msg->Float0 = 0;
|
||||||
msg->Float1 = 0;
|
msg->Float1 = 0;
|
||||||
msg->Bool0 = false;
|
msg->Bool0 = false;*/
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user