mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-20 19:45:00 +00:00
Switched --auto-turn-on
to SDL 2.0.
This commit is contained in:
parent
f61ef531f6
commit
862b881e2e
1 changed files with 2 additions and 3 deletions
|
@ -190,9 +190,8 @@ handle_event(SDL_Event *event, const struct scrcpy_options *options) {
|
|||
break;
|
||||
case SDL_WINDOWEVENT:
|
||||
screen_handle_window_event(&screen, &event->window);
|
||||
break;
|
||||
case SDL_ACTIVEEVENT:
|
||||
if (options->auto_turn_on && event->gain == 1) {
|
||||
if (options->auto_turn_on
|
||||
&& event->window.type == SDL_WINDOWEVENT_FOCUS_GAINED) {
|
||||
struct control_msg msg;
|
||||
msg.type = CONTROL_MSG_TYPE_BACK_OR_SCREEN_ON;
|
||||
msg.back_or_screen_on.screen_on_only = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue