summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2011-10-11 17:58:14 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2011-10-11 17:58:14 +0000
commit69f83ed262fc95d528d38706d13d4daa36161694 (patch)
tree789245df0b6b56a36bca92873dc81e0797e96386 /amiga
parent606d7cc64e67fe989476dbfb3e4352f58eabe626 (diff)
downloadnetsurf-69f83ed262fc95d528d38706d13d4daa36161694.tar.gz
netsurf-69f83ed262fc95d528d38706d13d4daa36161694.tar.bz2
Be more flexible with the aspect ratios we correct to.
svn path=/trunk/netsurf/; revision=13036
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/dist/NetSurf.guide4
-rw-r--r--amiga/font.c10
-rw-r--r--amiga/options.h9
3 files changed, 14 insertions, 9 deletions
diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide
index 1d63bae67..39ea6c5a4 100755
--- a/amiga/dist/NetSurf.guide
+++ b/amiga/dist/NetSurf.guide
@@ -69,7 +69,9 @@ For most users, installing and selecting @{"Code2000" rxs "address netsurf 'open
@{b}Font sizes@{ub}
-The default and minimum font sizes can also be set. NB: The resolution setting on the "Rendering" tab in NetSurf's preferences affects how big text appears on screen (the conversion between point and pixel sizes) amongst other things. To find the correct value, divide the number of pixels on the screen vertically by the physical height of the screen in inches (horizontal resolution is calculated automatically if NetSurf is running on a custom screen, square pixels are assumed on all other screens).
+The default and minimum font sizes can also be set.
+NB: The resolution setting on the "Rendering" tab in NetSurf's preferences affects how big text appears on screen (the conversion between point and pixel sizes) amongst other things. To find the correct value, divide the number of pixels on the screen vertically by the physical height of the screen in inches (horizontal resolution is calculated automatically if NetSurf is running on a custom screen, square pixels are assumed on all other screens).
+If the monitor is widescreen, monitor_aspect_x and monitor_aspect_y values in Resources/Options will also need modifying.
@endnode
@node Themes
diff --git a/amiga/font.c b/amiga/font.c
index 1876eedb8..3accd6650 100644
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -662,7 +662,7 @@ void ami_font_setdevicedpi(int id)
nscss_screen_dpi = INTTOFIX(option_amiga_ydpi);
- if(id)
+ if(id && (option_monitor_aspect_x != 0) && (option_monitor_aspect_y != 0))
{
if(dih = FindDisplayInfo(id))
{
@@ -672,12 +672,12 @@ void ami_font_setdevicedpi(int id)
int xres = dinfo.Resolution.x;
int yres = dinfo.Resolution.y;
- if(option_widescreen)
+ if((option_monitor_aspect_x != 4) || (option_monitor_aspect_y != 3))
{
/* AmigaOS sees 4:3 modes as square in the DisplayInfo database,
- * so we correct 16:10 modes to square for widescreen displays. */
- xres = (xres * 16) / 4;
- yres = (yres * 10) / 3;
+ * so we correct other modes to "4:3 equiv" here. */
+ xres = (xres * option_monitor_aspect_x) / 4;
+ yres = (yres * option_monitor_aspect_y) / 3;
}
xdpi = (yres * ydpi) / xres;
diff --git a/amiga/options.h b/amiga/options.h
index 68cde5761..74fe5a265 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -64,7 +64,8 @@ extern int option_cookies_window_ysize;
extern int option_cairo_renderer;
extern bool option_direct_render;
extern int option_amiga_ydpi;
-extern bool option_widescreen;
+extern int option_monitor_aspect_x;
+extern int option_monitor_aspect_y;
extern bool option_accept_lang_locale;
#define EXTRA_OPTION_DEFINE \
@@ -112,7 +113,8 @@ int option_cookies_window_ysize = 0; \
int option_cairo_renderer = 1; \
bool option_direct_render = false; \
int option_amiga_ydpi = 72; \
-bool option_widescreen = false; \
+int option_monitor_aspect_x = 4; \
+int option_monitor_aspect_y = 3; \
bool option_accept_lang_locale = true; \
#define EXTRA_OPTION_TABLE \
@@ -160,6 +162,7 @@ bool option_accept_lang_locale = true; \
{ "cairo_renderer", OPTION_INTEGER, &option_cairo_renderer}, \
{ "direct_render", OPTION_BOOL, &option_direct_render}, \
{ "amiga_ydpi", OPTION_INTEGER, &option_amiga_ydpi}, \
-{ "widescreen", OPTION_BOOL, &option_widescreen}, \
+{ "monitor_aspect_x", OPTION_INTEGER, &option_monitor_aspect_x}, \
+{ "monitor_aspect_y", OPTION_INTEGER, &option_monitor_aspect_y}, \
{ "accept_lang_locale", OPTION_BOOL, &option_accept_lang_locale},
#endif