Skip to content

Commit 1629fa2

Browse files
committed
style: fix formatting
1 parent eee02f6 commit 1629fa2

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

src/platform/windows/misc.cpp

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,33 +1137,33 @@ namespace platf {
11371137
}
11381138

11391139
void enable_mouse_keys() {
1140-
// If there is no mouse connected, enable Mouse Keys to force the cursor to appear
1141-
if (!GetSystemMetrics(SM_MOUSEPRESENT)) {
1142-
BOOST_LOG(info) << "A mouse was not detected. Sunshine will enable Mouse Keys while streaming to force the mouse cursor to appear.";
1143-
1144-
// Get the current state of Mouse Keys so we can restore it when streaming is over
1145-
previous_mouse_keys_state.cbSize = sizeof(previous_mouse_keys_state);
1146-
if (SystemParametersInfoW(SPI_GETMOUSEKEYS, 0, &previous_mouse_keys_state, 0)) {
1147-
MOUSEKEYS new_mouse_keys_state = {};
1148-
1149-
// Enable Mouse Keys
1150-
new_mouse_keys_state.cbSize = sizeof(new_mouse_keys_state);
1151-
new_mouse_keys_state.dwFlags = MKF_MOUSEKEYSON | MKF_AVAILABLE;
1152-
new_mouse_keys_state.iMaxSpeed = 10;
1153-
new_mouse_keys_state.iTimeToMaxSpeed = 1000;
1154-
if (SystemParametersInfoW(SPI_SETMOUSEKEYS, 0, &new_mouse_keys_state, 0)) {
1155-
// Remember to restore the previous settings when we stop streaming
1156-
enabled_mouse_keys = true;
1157-
} else {
1158-
auto winerr = GetLastError();
1159-
BOOST_LOG(warning) << "Unable to enable Mouse Keys: "sv << winerr;
1160-
}
1161-
} else {
1162-
auto winerr = GetLastError();
1163-
BOOST_LOG(warning) << "Unable to get current state of Mouse Keys: "sv << winerr;
1164-
}
1140+
// If there is no mouse connected, enable Mouse Keys to force the cursor to appear
1141+
if (!GetSystemMetrics(SM_MOUSEPRESENT)) {
1142+
BOOST_LOG(info) << "A mouse was not detected. Sunshine will enable Mouse Keys while streaming to force the mouse cursor to appear.";
1143+
1144+
// Get the current state of Mouse Keys so we can restore it when streaming is over
1145+
previous_mouse_keys_state.cbSize = sizeof(previous_mouse_keys_state);
1146+
if (SystemParametersInfoW(SPI_GETMOUSEKEYS, 0, &previous_mouse_keys_state, 0)) {
1147+
MOUSEKEYS new_mouse_keys_state = {};
1148+
1149+
// Enable Mouse Keys
1150+
new_mouse_keys_state.cbSize = sizeof(new_mouse_keys_state);
1151+
new_mouse_keys_state.dwFlags = MKF_MOUSEKEYSON | MKF_AVAILABLE;
1152+
new_mouse_keys_state.iMaxSpeed = 10;
1153+
new_mouse_keys_state.iTimeToMaxSpeed = 1000;
1154+
if (SystemParametersInfoW(SPI_SETMOUSEKEYS, 0, &new_mouse_keys_state, 0)) {
1155+
// Remember to restore the previous settings when we stop streaming
1156+
enabled_mouse_keys = true;
1157+
} else {
1158+
auto winerr = GetLastError();
1159+
BOOST_LOG(warning) << "Unable to enable Mouse Keys: "sv << winerr;
11651160
}
1161+
} else {
1162+
auto winerr = GetLastError();
1163+
BOOST_LOG(warning) << "Unable to get current state of Mouse Keys: "sv << winerr;
1164+
}
11661165
}
1166+
}
11671167

11681168
void streaming_will_stop() {
11691169
// Demote ourselves back to normal priority class

0 commit comments

Comments
 (0)