File tree Expand file tree Collapse file tree 5 files changed +17
-0
lines changed
Expand file tree Collapse file tree 5 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -610,6 +610,8 @@ namespace platf {
610610 };
611611 void adjust_thread_priority (thread_priority_e priority);
612612
613+ void enable_mouse_keys ();
614+
613615 // Allow OS-specific actions to be taken to prepare for streaming
614616 void streaming_will_start ();
615617 void streaming_will_stop ();
Original file line number Diff line number Diff line change @@ -327,6 +327,10 @@ namespace platf {
327327 // Unimplemented
328328 }
329329
330+ void enable_mouse_keys () {
331+ // Unimplemented
332+ }
333+
330334 void streaming_will_start () {
331335 // Nothing to do
332336 }
Original file line number Diff line number Diff line change @@ -214,6 +214,10 @@ void adjust_thread_priority(thread_priority_e priority) {
214214 // Unimplemented
215215 }
216216
217+ void enable_mouse_keys () {
218+ // Unimplemented
219+ }
220+
217221 void streaming_will_start () {
218222 // Nothing to do
219223 }
Original file line number Diff line number Diff line change @@ -1133,7 +1133,10 @@ namespace platf {
11331133 }
11341134 }
11351135 }
1136+ enable_mouse_keys ();
1137+ }
11361138
1139+ void enable_mouse_keys () {
11371140 // If there is no mouse connected, enable Mouse Keys to force the cursor to appear
11381141 if (!GetSystemMetrics (SM_MOUSEPRESENT)) {
11391142 BOOST_LOG (info) << " A mouse was not detected. Sunshine will enable Mouse Keys while streaming to force the mouse cursor to appear." ;
Original file line number Diff line number Diff line change @@ -1977,6 +1977,10 @@ namespace video {
19771977 }
19781978
19791979 session->request_normal_frame ();
1980+
1981+ // While streaming check to see if the mouse is present and enable Mouse Keys to force the cursor to appear
1982+ // This is useful for KVM switch scenarios where mouse may disappear during streaming
1983+ platf::enable_mouse_keys ();
19801984 }
19811985 }
19821986
You can’t perform that action at this time.
0 commit comments