Changeset 67795 in vbox
- Timestamp:
- Jul 5, 2017 1:14:41 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 116717
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r67766 r67795 105 105 #endif 106 106 107 /* VGA text mode blinking constants (cursor and blinking chars). */ 108 #define VGA_BLINK_PERIOD_FULL (RT_NS_100MS * 4) /* Blink cycle length. */ 109 #define VGA_BLINK_PERIOD_ON (RT_NS_100MS * 2) /* How long cursor/text is visible. */ 107 110 108 111 /********************************************************************************************************************************* … … 1908 1911 for(cx = 0; cx < width; cx++) { 1909 1912 ch_attr = *(uint16_t *)src; 1910 if (full_update || ch_attr != (int)*ch_attr_ptr ) {1913 if (full_update || ch_attr != (int)*ch_attr_ptr || src == cursor_ptr) { 1911 1914 if (cx < cx_min) 1912 1915 cx_min = cx; … … 1941 1944 !(pThis->cr[0x0a] & 0x20)) { 1942 1945 int line_start, line_last, h; 1943 /* draw the cursor */ 1944 line_start = pThis->cr[0x0a] & 0x1f; 1945 line_last = pThis->cr[0x0b] & 0x1f; 1946 /* XXX: check that */ 1947 if (line_last > cheight - 1) 1948 line_last = cheight - 1; 1949 if (line_last >= line_start && line_start < cheight) { 1950 h = line_last - line_start + 1; 1951 d = d1 + (linesize * line_start << dscan); 1952 if (cw != 9) { 1953 if (pThis->fRenderVRAM) 1954 vga_draw_glyph8(d, linesize, 1955 cursor_glyph, h, fgcol, bgcol, dscan); 1956 } else { 1957 if (pThis->fRenderVRAM) 1958 vga_draw_glyph9(d, linesize, 1959 cursor_glyph, h, fgcol, bgcol, 1); 1946 uint64_t time_ns; 1947 1948 /* draw the cursor if within the visible period */ 1949 time_ns = PDMDevHlpTMTimeVirtGetNano(VGASTATE2DEVINS(pThis)); 1950 if (time_ns % VGA_BLINK_PERIOD_FULL < VGA_BLINK_PERIOD_ON) { 1951 line_start = pThis->cr[0x0a] & 0x1f; 1952 line_last = pThis->cr[0x0b] & 0x1f; 1953 /* XXX: check that */ 1954 if (line_last > cheight - 1) 1955 line_last = cheight - 1; 1956 if (line_last >= line_start && line_start < cheight) { 1957 h = line_last - line_start + 1; 1958 d = d1 + (linesize * line_start << dscan); 1959 if (cw != 9) { 1960 if (pThis->fRenderVRAM) 1961 vga_draw_glyph8(d, linesize, 1962 cursor_glyph, h, fgcol, bgcol, dscan); 1963 } else { 1964 if (pThis->fRenderVRAM) 1965 vga_draw_glyph9(d, linesize, 1966 cursor_glyph, h, fgcol, bgcol, 1); 1967 } 1960 1968 } 1961 1969 }
Note:
See TracChangeset
for help on using the changeset viewer.