mirror of
https://github.com/Genymobile/scrcpy
synced 2024-12-27 17:52:18 +00:00
Improve resizing workaround
Call the same method as when the event is received on the event loop, so that the behavior is the same in both cases.
This commit is contained in:
parent
3c9ae99dda
commit
92cb3a6661
@ -109,9 +109,10 @@ static int
|
||||
event_watcher(void *data, SDL_Event *event) {
|
||||
(void) data;
|
||||
if (event->type == SDL_WINDOWEVENT
|
||||
&& event->window.event == SDL_WINDOWEVENT_RESIZED) {
|
||||
// called from another thread, not very safe, but it's a workaround!
|
||||
screen_render(&screen);
|
||||
&& event->window.event == SDL_WINDOWEVENT_SIZE_CHANGED) {
|
||||
// In practice, it seems to always be called from the same thread in
|
||||
// that specific case. Anyway, it's just a workaround.
|
||||
screen_handle_window_event(&screen, &event->window);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user