|
25 | 25 |
|
26 | 26 | #include "vim.h" |
27 | 27 |
|
28 | | -#if defined(FEAT_DIRECTX) |
| 28 | +#ifdef FEAT_DIRECTX |
29 | 29 | # include "gui_dwrite.h" |
30 | 30 | #endif |
31 | 31 |
|
32 | | -#if defined(FEAT_DIRECTX) |
| 32 | +#ifdef FEAT_DIRECTX |
33 | 33 | static DWriteContext *s_dwc = NULL; |
34 | 34 | static int s_directx_enabled = 0; |
35 | 35 | static int s_directx_load_attempted = 0; |
@@ -74,7 +74,7 @@ gui_mch_set_rendering_options(char_u *s) |
74 | 74 | char_u name[128]; |
75 | 75 | char_u value[128]; |
76 | 76 |
|
77 | | - copy_option_part(&p, item, sizeof(item), ","); |
| 77 | + copy_option_part(&p, item, sizeof(item), ","); |
78 | 78 | if (p == NULL) |
79 | 79 | break; |
80 | 80 | q = &item[0]; |
@@ -1906,7 +1906,7 @@ gui_mch_set_shellsize(int width, int height, |
1906 | 1906 | GetSystemMetrics(SM_CXPADDEDBORDER)) * 2; |
1907 | 1907 | win_height = height + (GetSystemMetrics(SM_CYFRAME) + |
1908 | 1908 | GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 |
1909 | | - + GetSystemMetrics(SM_CYCAPTION) |
| 1909 | + + get_caption_height() |
1910 | 1910 | #ifdef FEAT_MENU |
1911 | 1911 | + gui_mswin_get_menu_height(FALSE) |
1912 | 1912 | #endif |
@@ -2625,7 +2625,7 @@ gui_mch_draw_string( |
2625 | 2625 | if (text[n] >= 0x80) |
2626 | 2626 | break; |
2627 | 2627 |
|
2628 | | -#if defined(FEAT_DIRECTX) |
| 2628 | +#ifdef FEAT_DIRECTX |
2629 | 2629 | /* Quick hack to enable DirectWrite. To use DirectWrite (antialias), it is |
2630 | 2630 | * required that unicode drawing routine, currently. So this forces it |
2631 | 2631 | * enabled. */ |
@@ -2691,14 +2691,14 @@ gui_mch_draw_string( |
2691 | 2691 | i += utfc_ptr2len_len(text + i, len - i); |
2692 | 2692 | ++clen; |
2693 | 2693 | } |
2694 | | -#if defined(FEAT_DIRECTX) |
| 2694 | +#ifdef FEAT_DIRECTX |
2695 | 2695 | if (IS_ENABLE_DIRECTX() && font_is_ttf_or_vector) |
2696 | 2696 | { |
2697 | 2697 | DWriteContext_DrawText(s_dwc, s_hdc, unicodebuf, wlen, |
2698 | 2698 | TEXT_X(col), TEXT_Y(row), FILL_X(cells), FILL_Y(1), |
2699 | 2699 | gui.char_width, gui.currFgColor); |
2700 | 2700 | } |
2701 | | - else |
| 2701 | + else |
2702 | 2702 | #endif |
2703 | 2703 | ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row), |
2704 | 2704 | foptions, pcliprect, unicodebuf, wlen, unicodepdy); |
@@ -2839,7 +2839,7 @@ gui_mch_get_screen_dimensions(int *screen_w, int *screen_h) |
2839 | 2839 | *screen_h = workarea_rect.bottom - workarea_rect.top |
2840 | 2840 | - (GetSystemMetrics(SM_CYFRAME) + |
2841 | 2841 | GetSystemMetrics(SM_CXPADDEDBORDER)) * 2 |
2842 | | - - GetSystemMetrics(SM_CYCAPTION) |
| 2842 | + - get_caption_height() |
2843 | 2843 | #ifdef FEAT_MENU |
2844 | 2844 | - gui_mswin_get_menu_height(FALSE) |
2845 | 2845 | #endif |
|
0 commit comments