From ba3de27fe5239e4217756bb16584e64da2575b80 Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Tue, 1 Nov 2022 11:53:49 -0700 Subject: [PATCH 1/2] =?UTF-8?q?Expand=20window=20scale=20factors=20up=20to?= =?UTF-8?q?=208=C3=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5× is just about the highest factor useful for a 3840×2160 (“4K”) monitor with games running in 320×200 mode. 7680×4320 (“8K”) monitors are also on the market and the higher scale factors should be useful for them too. --- src/86box.c | 30 ++++++++++++++++++++ src/config.c | 4 +-- src/qt/languages/en-US.po | 18 ++++++++++++ src/qt/qt_mainwindow.cpp | 60 +++++++++++++++++++++++++++++++++++++++ src/qt/qt_mainwindow.hpp | 6 ++++ src/qt/qt_mainwindow.ui | 54 +++++++++++++++++++++++++++++++++++ 6 files changed, 170 insertions(+), 2 deletions(-) diff --git a/src/86box.c b/src/86box.c index 6e8fa52dd..2c29b69ea 100644 --- a/src/86box.c +++ b/src/86box.c @@ -1362,6 +1362,36 @@ set_screen_size_monitor(int x, int y, int monitor_index) monitors[monitor_index].mon_scrnsz_x = (monitors[monitor_index].mon_unscaled_size_x << 1); monitors[monitor_index].mon_scrnsz_y = (monitors[monitor_index].mon_unscaled_size_y << 1); break; + + case 4: /* 300% */ + monitors[monitor_index].mon_scrnsz_x = (monitors[monitor_index].mon_unscaled_size_x * 3); + monitors[monitor_index].mon_scrnsz_y = (monitors[monitor_index].mon_unscaled_size_y * 3); + break; + + case 5: /* 400% */ + monitors[monitor_index].mon_scrnsz_x = (monitors[monitor_index].mon_unscaled_size_x << 2); + monitors[monitor_index].mon_scrnsz_y = (monitors[monitor_index].mon_unscaled_size_y << 2); + break; + + case 6: /* 500% */ + monitors[monitor_index].mon_scrnsz_x = (monitors[monitor_index].mon_unscaled_size_x * 5); + monitors[monitor_index].mon_scrnsz_y = (monitors[monitor_index].mon_unscaled_size_y * 5); + break; + + case 7: /* 600% */ + monitors[monitor_index].mon_scrnsz_x = (monitors[monitor_index].mon_unscaled_size_x * 6); + monitors[monitor_index].mon_scrnsz_y = (monitors[monitor_index].mon_unscaled_size_y * 6); + break; + + case 8: /* 700% */ + monitors[monitor_index].mon_scrnsz_x = (monitors[monitor_index].mon_unscaled_size_x * 7); + monitors[monitor_index].mon_scrnsz_y = (monitors[monitor_index].mon_unscaled_size_y * 7); + break; + + case 9: /* 800% */ + monitors[monitor_index].mon_scrnsz_x = (monitors[monitor_index].mon_unscaled_size_x << 3); + monitors[monitor_index].mon_scrnsz_y = (monitors[monitor_index].mon_unscaled_size_y << 3); + break; } plat_resize_request(monitors[monitor_index].mon_scrnsz_x, monitors[monitor_index].mon_scrnsz_y, monitor_index); diff --git a/src/config.c b/src/config.c index 11c8bdf50..e433e4071 100644 --- a/src/config.c +++ b/src/config.c @@ -123,8 +123,8 @@ load_general(void) force_43 = !!ini_section_get_int(cat, "force_43", 0); scale = ini_section_get_int(cat, "scale", 1); - if (scale > 3) - scale = 3; + if (scale > 9) + scale = 9; dpi_scale = ini_section_get_int(cat, "dpi_scale", 1); enable_overscan = !!ini_section_get_int(cat, "enable_overscan", 0); diff --git a/src/qt/languages/en-US.po b/src/qt/languages/en-US.po index 916619b02..a6b577322 100644 --- a/src/qt/languages/en-US.po +++ b/src/qt/languages/en-US.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Filter method" diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 936dc9212..0f3c152f5 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -416,12 +416,36 @@ MainWindow::MainWindow(QWidget *parent) : case 3: ui->action2x->setChecked(true); break; + case 4: + ui->action3x->setChecked(true); + break; + case 5: + ui->action4x->setChecked(true); + break; + case 6: + ui->action5x->setChecked(true); + break; + case 7: + ui->action6x->setChecked(true); + break; + case 8: + ui->action7x->setChecked(true); + break; + case 9: + ui->action8x->setChecked(true); + break; } actGroup = new QActionGroup(this); actGroup->addAction(ui->action0_5x); actGroup->addAction(ui->action1x); actGroup->addAction(ui->action1_5x); actGroup->addAction(ui->action2x); + actGroup->addAction(ui->action3x); + actGroup->addAction(ui->action4x); + actGroup->addAction(ui->action5x); + actGroup->addAction(ui->action6x); + actGroup->addAction(ui->action7x); + actGroup->addAction(ui->action8x); switch (video_filter_method) { case 0: ui->actionNearest->setChecked(true); @@ -1765,6 +1789,12 @@ static void update_scaled_checkboxes(Ui::MainWindow* ui, QAction* selected) { ui->action1x->setChecked(ui->action1x == selected); ui->action1_5x->setChecked(ui->action1_5x == selected); ui->action2x->setChecked(ui->action2x == selected); + ui->action3x->setChecked(ui->action3x == selected); + ui->action4x->setChecked(ui->action4x == selected); + ui->action5x->setChecked(ui->action5x == selected); + ui->action6x->setChecked(ui->action6x == selected); + ui->action7x->setChecked(ui->action7x == selected); + ui->action8x->setChecked(ui->action8x == selected); reset_screen_size(); device_force_redraw(); @@ -1794,6 +1824,36 @@ void MainWindow::on_action2x_triggered() { update_scaled_checkboxes(ui, ui->action2x); } +void MainWindow::on_action3x_triggered() { + scale = 4; + update_scaled_checkboxes(ui, ui->action3x); +} + +void MainWindow::on_action4x_triggered() { + scale = 5; + update_scaled_checkboxes(ui, ui->action4x); +} + +void MainWindow::on_action5x_triggered() { + scale = 6; + update_scaled_checkboxes(ui, ui->action5x); +} + +void MainWindow::on_action6x_triggered() { + scale = 7; + update_scaled_checkboxes(ui, ui->action6x); +} + +void MainWindow::on_action7x_triggered() { + scale = 8; + update_scaled_checkboxes(ui, ui->action7x); +} + +void MainWindow::on_action8x_triggered() { + scale = 9; + update_scaled_checkboxes(ui, ui->action8x); +} + void MainWindow::on_actionNearest_triggered() { video_filter_method = 0; ui->actionLinear->setChecked(false); diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index ef70a0826..692b9c3f0 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -81,6 +81,12 @@ private slots: void on_action1x_triggered(); void on_action1_5x_triggered(); void on_action2x_triggered(); + void on_action3x_triggered(); + void on_action4x_triggered(); + void on_action5x_triggered(); + void on_action6x_triggered(); + void on_action7x_triggered(); + void on_action8x_triggered(); void on_actionLinear_triggered(); void on_actionNearest_triggered(); void on_actionFullScreen_int_triggered(); diff --git a/src/qt/qt_mainwindow.ui b/src/qt/qt_mainwindow.ui index 3551eddb1..fcc337cb3 100644 --- a/src/qt/qt_mainwindow.ui +++ b/src/qt/qt_mainwindow.ui @@ -118,6 +118,12 @@ + + + + + + @@ -478,6 +484,54 @@ &2x + + + true + + + &3x + + + + + true + + + &4x + + + + + true + + + &5x + + + + + true + + + &6x + + + + + true + + + &7x + + + + + true + + + &8x + + true From 6db29dd3c1ec56b0c216b9c66df2559f834de105 Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Tue, 1 Nov 2022 12:06:48 -0700 Subject: [PATCH 2/2] languages: update files for new scaling factors --- src/qt/languages/cs-CZ.po | 18 ++++++++++++++++++ src/qt/languages/de-DE.po | 18 ++++++++++++++++++ src/qt/languages/en-GB.po | 18 ++++++++++++++++++ src/qt/languages/es-ES.po | 18 ++++++++++++++++++ src/qt/languages/fi-FI.po | 18 ++++++++++++++++++ src/qt/languages/fr-FR.po | 18 ++++++++++++++++++ src/qt/languages/hr-HR.po | 18 ++++++++++++++++++ src/qt/languages/hu-HU.po | 18 ++++++++++++++++++ src/qt/languages/it-IT.po | 18 ++++++++++++++++++ src/qt/languages/ja-JP.po | 18 ++++++++++++++++++ src/qt/languages/ko-KR.po | 18 ++++++++++++++++++ src/qt/languages/pl-PL.po | 18 ++++++++++++++++++ src/qt/languages/pt-BR.po | 18 ++++++++++++++++++ src/qt/languages/pt-PT.po | 18 ++++++++++++++++++ src/qt/languages/ru-RU.po | 18 ++++++++++++++++++ src/qt/languages/sl-SI.po | 18 ++++++++++++++++++ src/qt/languages/tr-TR.po | 18 ++++++++++++++++++ src/qt/languages/uk-UA.po | 18 ++++++++++++++++++ src/qt/languages/zh-CN.po | 18 ++++++++++++++++++ 19 files changed, 342 insertions(+) diff --git a/src/qt/languages/cs-CZ.po b/src/qt/languages/cs-CZ.po index 4b5c8d30d..d6ce352ef 100644 --- a/src/qt/languages/cs-CZ.po +++ b/src/qt/languages/cs-CZ.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Metoda &filtrování" diff --git a/src/qt/languages/de-DE.po b/src/qt/languages/de-DE.po index 45f344a9e..2897b23f5 100644 --- a/src/qt/languages/de-DE.po +++ b/src/qt/languages/de-DE.po @@ -76,6 +76,24 @@ msgstr "1,&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Filteringmethode" diff --git a/src/qt/languages/en-GB.po b/src/qt/languages/en-GB.po index 9ea707546..48e978f86 100644 --- a/src/qt/languages/en-GB.po +++ b/src/qt/languages/en-GB.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Filter method" diff --git a/src/qt/languages/es-ES.po b/src/qt/languages/es-ES.po index 0923b9948..4c803a442 100644 --- a/src/qt/languages/es-ES.po +++ b/src/qt/languages/es-ES.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "&Método de filtrado" diff --git a/src/qt/languages/fi-FI.po b/src/qt/languages/fi-FI.po index ea250563d..2bfc8c1fc 100644 --- a/src/qt/languages/fi-FI.po +++ b/src/qt/languages/fi-FI.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "&Suodatusmetodi" diff --git a/src/qt/languages/fr-FR.po b/src/qt/languages/fr-FR.po index 98a5f60fa..beb98e567 100644 --- a/src/qt/languages/fr-FR.po +++ b/src/qt/languages/fr-FR.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Methode Filtre" diff --git a/src/qt/languages/hr-HR.po b/src/qt/languages/hr-HR.po index 7b9cd71ea..c39644c00 100644 --- a/src/qt/languages/hr-HR.po +++ b/src/qt/languages/hr-HR.po @@ -76,6 +76,24 @@ msgstr "1,&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Metoda filtriranja" diff --git a/src/qt/languages/hu-HU.po b/src/qt/languages/hu-HU.po index 022523ff9..7d3d524c9 100644 --- a/src/qt/languages/hu-HU.po +++ b/src/qt/languages/hu-HU.po @@ -76,6 +76,24 @@ msgstr "1,&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Szűrési mód" diff --git a/src/qt/languages/it-IT.po b/src/qt/languages/it-IT.po index a32efc320..d7b2c5006 100644 --- a/src/qt/languages/it-IT.po +++ b/src/qt/languages/it-IT.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Metodo filtro" diff --git a/src/qt/languages/ja-JP.po b/src/qt/languages/ja-JP.po index 146275c74..790ea1ebc 100644 --- a/src/qt/languages/ja-JP.po +++ b/src/qt/languages/ja-JP.po @@ -76,6 +76,24 @@ msgstr "1.5x(&5)" msgid "&2x" msgstr "2x(&2)" +msgid "&3x" +msgstr "3x(&3)" + +msgid "&4x" +msgstr "4x(&4)" + +msgid "&5x" +msgstr "5x(&5)" + +msgid "&6x" +msgstr "6x(&6)" + +msgid "&7x" +msgstr "7x(&7)" + +msgid "&8x" +msgstr "8x(&8)" + msgid "Filter method" msgstr "フィルター方式" diff --git a/src/qt/languages/ko-KR.po b/src/qt/languages/ko-KR.po index 13f5be067..05d8dcf59 100644 --- a/src/qt/languages/ko-KR.po +++ b/src/qt/languages/ko-KR.po @@ -76,6 +76,24 @@ msgstr "1.5배(&5)" msgid "&2x" msgstr "2배(&2)" +msgid "&3x" +msgstr "3배(&3)" + +msgid "&4x" +msgstr "4배(&4)" + +msgid "&5x" +msgstr "5배(&5)" + +msgid "&6x" +msgstr "6배(&6)" + +msgid "&7x" +msgstr "7배(&7)" + +msgid "&8x" +msgstr "8배(&8)" + msgid "Filter method" msgstr "필터 형식" diff --git a/src/qt/languages/pl-PL.po b/src/qt/languages/pl-PL.po index 1a17217d6..71d109e2a 100644 --- a/src/qt/languages/pl-PL.po +++ b/src/qt/languages/pl-PL.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Metoda filtrowania" diff --git a/src/qt/languages/pt-BR.po b/src/qt/languages/pt-BR.po index 44c03cfec..29e6031a6 100644 --- a/src/qt/languages/pt-BR.po +++ b/src/qt/languages/pt-BR.po @@ -76,6 +76,24 @@ msgstr "1,&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Método de filtragem" diff --git a/src/qt/languages/pt-PT.po b/src/qt/languages/pt-PT.po index 1cf187a0c..8349f7035 100644 --- a/src/qt/languages/pt-PT.po +++ b/src/qt/languages/pt-PT.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Método de filtragem" diff --git a/src/qt/languages/ru-RU.po b/src/qt/languages/ru-RU.po index b483fabb3..9e0b4101d 100644 --- a/src/qt/languages/ru-RU.po +++ b/src/qt/languages/ru-RU.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Метод фильтрации" diff --git a/src/qt/languages/sl-SI.po b/src/qt/languages/sl-SI.po index 6ea64a7c2..80f36a022 100644 --- a/src/qt/languages/sl-SI.po +++ b/src/qt/languages/sl-SI.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "&Metoda filtriranja" diff --git a/src/qt/languages/tr-TR.po b/src/qt/languages/tr-TR.po index 58f2c08bb..aa0273c79 100644 --- a/src/qt/languages/tr-TR.po +++ b/src/qt/languages/tr-TR.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "&Filtre metodu" diff --git a/src/qt/languages/uk-UA.po b/src/qt/languages/uk-UA.po index 5b16fa84c..f40e4d826 100644 --- a/src/qt/languages/uk-UA.po +++ b/src/qt/languages/uk-UA.po @@ -76,6 +76,24 @@ msgstr "1.&5x" msgid "&2x" msgstr "&2x" +msgid "&3x" +msgstr "&3x" + +msgid "&4x" +msgstr "&4x" + +msgid "&5x" +msgstr "&5x" + +msgid "&6x" +msgstr "&6x" + +msgid "&7x" +msgstr "&7x" + +msgid "&8x" +msgstr "&8x" + msgid "Filter method" msgstr "Метод фільтрації" diff --git a/src/qt/languages/zh-CN.po b/src/qt/languages/zh-CN.po index b83ab1d46..a863fc4b3 100644 --- a/src/qt/languages/zh-CN.po +++ b/src/qt/languages/zh-CN.po @@ -76,6 +76,24 @@ msgstr "1.5x(&5)" msgid "&2x" msgstr "2x(&2)" +msgid "&3x" +msgstr "3x(&3)" + +msgid "&4x" +msgstr "4x(&4)" + +msgid "&5x" +msgstr "5x(&5)" + +msgid "&6x" +msgstr "6x(&6)" + +msgid "&7x" +msgstr "7x(&7)" + +msgid "&8x" +msgstr "8x(&8)" + msgid "Filter method" msgstr "过滤方式"