1
Network / Re: Extracting sf::Int/Uint array from sf::Packet
« on: June 18, 2012, 07:33:38 pm »
Thanks for the quick reply!
Guess a for loop will fix the issue easy enough
Guess a for loop will fix the issue easy enough
![Smiley :)](https://www.sfml-dev.org/forums/Smileys/default/smiley.gif)
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
void SetMouseSpeed(int speed) {
SystemParametersInfo(SPI_SETMOUSESPEED, NULL, reinterpret_cast<void*>(speed), SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE );
}
int GetMouseSpeed() {
int speed;
SystemParametersInfo(SPI_GETMOUSESPEED, NULL, &speed, 0);
return speed;
}
///Mouse Acceleration
/*The system applies two tests to the specified relative mouse motion when applying acceleration.
If the specified distance along either the x or y axis is greater than the first mouse threshold
value, and the mouse acceleration level is not zero, the operating system doubles the distance.
If the specified distance along either the x- or y-axis is greater than the second mouse threshold
value, and the mouse acceleration level is equal to two, the operating system doubles the distance
that resulted from applying the first threshold test. It is thus possible for the operating system
to multiply relatively-specified mouse motion along the x- or y-axis by up to four times.*/
//Sets the two mouse threshold values and the mouse acceleration. The pvParam parameter must point to an array of three integers that specifies these values.
void SetMouseAccel(int threshold1,int threshold2,int speed) {
int info[3];
info[0]=threshold1;
info[1]=threshold2;
SystemParametersInfo(SPI_SETMOUSE, NULL, info, SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE );
}
//Retrieves the two mouse threshold values and the mouse acceleration. The pvParam parameter must point to an array of three integers that receives these values.
int GetMouseAccel(int *threshold1,int *threshold2) {
int info[3];
SystemParametersInfo(SPI_GETMOUSE, NULL, &info, 0);
*threshold1 = info[0];
*threshold2 = info[1];
return info[2];
}