Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1358232
| From | Samuel Thibault <samuel.thibault@ens-lyon.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] Staging: speakup: Clear hi font bit from attributes |
| Date | 2016-03-15 21:40 +0100 |
| Message-ID | <rd3V0-7gd-15@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Previously, speakup would see the hi-font bit in attributes.
Since this bit has nothing to do with attributes, we need to clear it.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -267,7 +267,7 @@ static struct notifier_block vt_notifier
static unsigned char get_attributes(struct vc_data *vc, u16 *pos)
{
pos = screen_pos(vc, pos - (u16 *)vc->vc_origin, 1);
- return (u_char) (scr_readw(pos) >> 8);
+ return (scr_readw(pos) & ~vc->vc_hi_font_mask) >> 8;
}
static void speakup_date(struct vc_data *vc)
@@ -477,8 +477,10 @@ static u16 get_char(struct vc_data *vc,
w = scr_readw(pos);
c = w & 0xff;
- if (w & vc->vc_hi_font_mask)
+ if (w & vc->vc_hi_font_mask) {
+ w &= ~vc->vc_hi_font_mask;
c |= 0x100;
+ }
ch = inverse_translate(vc, c, 0);
*attribs = (w & 0xff00) >> 8;
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] Staging: speakup: Clear hi font bit from attributes Samuel Thibault <samuel.thibault@ens-lyon.org> - 2016-03-15 21:40 +0100
csiph-web