mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-01-14 19:24:28 +01:00
Disable "resize to pixel-perfect" when maximized
This improves consistency and will simplify further refactors. PR #6216 <https://github.com/Genymobile/scrcpy/pull/6216>
This commit is contained in:
@@ -759,15 +759,10 @@ void
|
||||
sc_screen_resize_to_pixel_perfect(struct sc_screen *screen) {
|
||||
assert(screen->video);
|
||||
|
||||
if (screen->fullscreen || screen->minimized) {
|
||||
if (screen->fullscreen || screen->maximized || screen->minimized) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (screen->maximized) {
|
||||
sc_sdl_restore_window(screen->window);
|
||||
screen->maximized = false;
|
||||
}
|
||||
|
||||
struct sc_size content_size = screen->content_size;
|
||||
sc_sdl_set_window_size(screen->window, content_size);
|
||||
LOGD("Resized to pixel-perfect: %ux%u", content_size.width,
|
||||
|
||||
@@ -130,15 +130,6 @@ sc_sdl_hide_window(SDL_Window *window) {
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
sc_sdl_restore_window(SDL_Window *window) {
|
||||
bool ok = SDL_RestoreWindow(window);
|
||||
if (!ok) {
|
||||
LOGE("Could not restore window: %s", SDL_GetError());
|
||||
assert(!"unexpected");
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
sc_sdl_render_clear(SDL_Renderer *renderer) {
|
||||
bool ok = SDL_RenderClear(renderer);
|
||||
|
||||
@@ -34,9 +34,6 @@ sc_sdl_show_window(SDL_Window *window);
|
||||
void
|
||||
sc_sdl_hide_window(SDL_Window *window);
|
||||
|
||||
void
|
||||
sc_sdl_restore_window(SDL_Window *window);
|
||||
|
||||
bool
|
||||
sc_sdl_render_clear(SDL_Renderer *renderer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user