[PATCH 1/5] server: Add support for additional fields in set_console_output_info.

Alexandre Julliard julliard at winehq.org
Tue Sep 10 12:54:57 CDT 2019


Gijs Vermeulen <gijsvrm at codeweavers.com> writes:

> @@ -1041,8 +1047,16 @@ static int set_console_output_info( struct screen_buffer *screen_buffer,
>      }
>      if (req->mask & SET_CONSOLE_OUTPUT_INFO_FONT)
>      {
> +        data_size_t total;
>          screen_buffer->font.width  = req->font_width;
>          screen_buffer->font.height = req->font_height;
> +        screen_buffer->font.weight = req->font_weight;
> +        screen_buffer->font.pitch_family = req->font_pitch_family;
> +        if (screen_buffer->font.face_name) free(screen_buffer->font.face_name);
> +        total = min( req->face_namelen, get_req_data_size() );
> +        screen_buffer->font.face_name = mem_alloc( total + sizeof(WCHAR) );
> +        memcpy( screen_buffer->font.face_name, get_req_data(), total );
> +        screen_buffer->font.face_name[total/sizeof(WCHAR)] = 0;

You should probably store it as a unicode_str. I suspect you also want
to put it after the color table in the request data. Either way you need
to handle the case when both are present.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list