mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-compiler: Check whether the source format is binary when checking if the output is a tty, when preprocessing.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
b40b191498
commit
10ab0ff124
@ -639,12 +639,21 @@ int main(int argc, char **argv)
|
|||||||
if (!(output = open_output(options.output_filename, &close_output)))
|
if (!(output = open_output(options.output_filename, &close_output)))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
if (!options.output_filename && get_target_type_info(options.target_type)->is_binary
|
if (!options.output_filename && isatty(fileno(output)))
|
||||||
&& isatty(fileno(output)))
|
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Output is a tty and output format is binary, exiting.\n"
|
bool is_binary;
|
||||||
"If this is really what you intended, specify the output explicitly.\n");
|
|
||||||
goto done;
|
if (options.preprocess_only)
|
||||||
|
is_binary = get_source_type_info(options.source_type)->is_binary;
|
||||||
|
else
|
||||||
|
is_binary = get_target_type_info(options.target_type)->is_binary;
|
||||||
|
|
||||||
|
if (is_binary)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Output is a tty and output format is binary, exiting.\n"
|
||||||
|
"If this is really what you intended, specify the output explicitly.\n");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options.explicit_colour && has_colour(output))
|
if (!options.explicit_colour && has_colour(output))
|
||||||
|
Reference in New Issue
Block a user