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:
Romain Vimont
2025-12-30 22:06:36 +01:00
parent 9f1aac41a6
commit 170b7a02e7
3 changed files with 1 additions and 18 deletions

View File

@@ -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,

View File

@@ -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);

View File

@@ -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);