diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-07 11:06:23 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-07 14:53:12 +0100 |
commit | b43508ce40afc61dc62a496a3452aa7cf79af168 (patch) | |
tree | 384adbb575de212ac5942c9abee5da924f45834e /gfx | |
parent | 0053dfe8319d2fd87bb17345a63890090d2378e9 (diff) | |
download | aura-central-b43508ce40afc61dc62a496a3452aa7cf79af168.tar.gz |
Issue mcp-graveyard/UXP%1274 - Part 4: Remove some unnecessary checks for old Windows versions.
This gets rid of deprecated GetVersionEx() calls as a bonus.
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/cairo/cairo/src/cairo-win32-font.c | 14 | ||||
-rw-r--r-- | gfx/cairo/cairo/src/cairo-win32-surface.c | 18 |
2 files changed, 4 insertions, 28 deletions
diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c index 5891799c9..ccdd16187 100644 --- a/gfx/cairo/cairo/src/cairo-win32-font.c +++ b/gfx/cairo/cairo/src/cairo-win32-font.c @@ -216,18 +216,8 @@ _compute_transform (cairo_win32_scaled_font_t *scaled_font, static cairo_bool_t _have_cleartype_quality (void) { - OSVERSIONINFO version_info; - - version_info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); - - if (!GetVersionEx (&version_info)) { - _cairo_win32_print_gdi_error ("_have_cleartype_quality"); - return FALSE; - } - - return (version_info.dwMajorVersion > 5 || - (version_info.dwMajorVersion == 5 && - version_info.dwMinorVersion >= 1)); /* XP or newer */ + // All supported versions have cleartype + return TRUE; } BYTE diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c index 989e411cc..2d7395590 100644 --- a/gfx/cairo/cairo/src/cairo-win32-surface.c +++ b/gfx/cairo/cairo/src/cairo-win32-surface.c @@ -915,28 +915,14 @@ _composite_alpha_blend (cairo_win32_surface_t *dst, BLENDFUNCTION blend_function; - /* Check for AlphaBlend dynamically to allow compiling on - * MSVC 6 and use on older windows versions - */ + /* Check for AlphaBlend dynamically */ if (!alpha_blend_checked) { - OSVERSIONINFO os; - - os.dwOSVersionInfoSize = sizeof (os); - GetVersionEx (&os); - - /* If running on Win98, disable using AlphaBlend() - * to avoid Win98 AlphaBlend() bug */ - if (VER_PLATFORM_WIN32_WINDOWS != os.dwPlatformId || - os.dwMajorVersion != 4 || os.dwMinorVersion != 10) - { HMODULE msimg32_dll = LoadLibraryW (L"msimg32"); if (msimg32_dll != NULL) alpha_blend = (cairo_alpha_blend_func_t)GetProcAddress (msimg32_dll, "AlphaBlend"); - } - - alpha_blend_checked = TRUE; + alpha_blend_checked = TRUE; } if (alpha_blend == NULL) |