diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide index 250e80475..14f9994ff 100755 --- a/amiga/dist/NetSurf.guide +++ b/amiga/dist/NetSurf.guide @@ -44,6 +44,7 @@ There are a couple of Amiga-specific options which can only be changed directly @{b}printer_unit@{ub} Specifies which printer.device unit to print to @{b}drag_save_icons@{ub} Enables displaying Workbench-style transparent icons under the pointer when performing drag saves (ctrl-drag of objects available if NetSurf is running on the Workbench screen) and text selection drags. If set to 0 the pointer style will change instead. OS 4.0 users may want to set this to 0 as icons will appear opaque and obscure the drop position. @{b}cairo_renderer@{ub} Set rendering engine (SObjs version only). 0 = graphics.library, 1 = Cairo/graphics.library mixed (recommended), 2 = Full Cairo. +@{b}amiga_ydpi@{ub} Set vertical screen resolution in DPI (horizontal resolution is calculated automatically). To find the correct value, divide the number of pixels on the screen vertically by the physical height of the screen in inches. Default = 72 @{b}url_file@{ub} Path to URL database file @{b}hotlist_file@{ub} Path to Hotlist file diff --git a/amiga/font.c b/amiga/font.c index c8404e2ca..f884d9dc2 100644 --- a/amiga/font.c +++ b/amiga/font.c @@ -623,8 +623,10 @@ void ami_font_setdevicedpi(int id) DisplayInfoHandle dih; struct DisplayInfo dinfo; Point dinfo_res; - ULONG ydpi = FIXTOINT(nscss_screen_dpi); - ULONG xdpi = ydpi; + ULONG ydpi = option_amiga_ydpi; + ULONG xdpi = option_amiga_ydpi; + + nscss_screen_dpi = INTTOFIX(option_amiga_ydpi); if(id) { diff --git a/amiga/gui.c b/amiga/gui.c index fbdb249a7..880901b9d 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -476,7 +476,6 @@ void gui_init(int argc, char** argv) quirks_stylesheet_url = "file:///PROGDIR:Resources/quirks.css"; adblock_stylesheet_url = "file:///PROGDIR:Resources/adblock.css"; - nscss_screen_dpi = INTTOFIX(72); ami_font_setdevicedpi(0); /* for early font requests, eg treeview init */ scroll_widget_fg_colour = 0x00aaaaaa; diff --git a/amiga/options.h b/amiga/options.h index 93bb1223c..cd42c8d81 100644 --- a/amiga/options.h +++ b/amiga/options.h @@ -65,6 +65,7 @@ extern int option_cookies_window_xsize; extern int option_cookies_window_ysize; extern int option_cairo_renderer; extern bool option_direct_render; +extern int option_amiga_ydpi; #define EXTRA_OPTION_DEFINE \ char *option_url_file = 0; \ @@ -112,6 +113,7 @@ int option_cookies_window_xsize = 0; \ int option_cookies_window_ysize = 0; \ int option_cairo_renderer = 1; \ bool option_direct_render = false; \ +int option_amiga_ydpi = 72; \ #define EXTRA_OPTION_TABLE \ { "url_file", OPTION_STRING, &option_url_file }, \ @@ -158,5 +160,6 @@ bool option_direct_render = false; \ { "cookies_window_xsize", OPTION_INTEGER, &option_cookies_window_xsize}, \ { "cookies_window_ysize", OPTION_INTEGER, &option_cookies_window_ysize}, \ { "cairo_renderer", OPTION_INTEGER, &option_cairo_renderer}, \ -{ "direct_render", OPTION_BOOL, &option_direct_render}, +{ "direct_render", OPTION_BOOL, &option_direct_render}, \ +{ "amiga_ydpi", OPTION_INTEGER, &option_amiga_ydpi}, #endif