chres: Unbreak scale factor setting after aa15bf81e4
This commit is contained in:
parent
9b0ff229e3
commit
8cf348c14c
Notes:
sideshowbarker
2024-07-18 09:24:51 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/8cf348c14c2 Pull-request: https://github.com/SerenityOS/serenity/pull/8600
1 changed files with 3 additions and 1 deletions
|
@ -13,7 +13,7 @@ int main(int argc, char** argv)
|
|||
int screen = -1;
|
||||
int width = -1;
|
||||
int height = -1;
|
||||
int scale = 1;
|
||||
int scale = -1;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
args_parser.set_general_help("Change the screen resolution.");
|
||||
|
@ -33,6 +33,8 @@ int main(int argc, char** argv)
|
|||
}
|
||||
auto& main_screen = screen_layout.screens[screen];
|
||||
main_screen.resolution = { width, height };
|
||||
if (scale != -1)
|
||||
main_screen.scale_factor = scale;
|
||||
auto set_result = GUI::WindowServerConnection::the().set_screen_layout(screen_layout, true);
|
||||
if (!set_result.success()) {
|
||||
warnln("failed to set resolution: {}", set_result.error_msg());
|
||||
|
|
Loading…
Add table
Reference in a new issue