mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
ncls: use NCSCALE_HIRES with NCBLIT_PIXEL by default
This commit is contained in:
parent
89b95c2612
commit
a21113a66a
@ -32,7 +32,7 @@ ncls - List paths with rendering of multimedia
|
|||||||
**-a**|**--align** ***type***: Align images on **left**, **center**, or **right**.
|
**-a**|**--align** ***type***: Align images on **left**, **center**, or **right**.
|
||||||
|
|
||||||
**-b**|**--blitter** ***blitter***: Blitter, one of **ascii**, **half**,
|
**-b**|**--blitter** ***blitter***: Blitter, one of **ascii**, **half**,
|
||||||
**quad**, **sex**, **braille**, or **pixel**. The default is ***pixel***.
|
**quad**, **sex**, **braille**, or **pixel**. The default is **pixel**.
|
||||||
If the chosen blitter is unavailable, **ncls** will degrade (see
|
If the chosen blitter is unavailable, **ncls** will degrade (see
|
||||||
**notcurses_visual(3)**).
|
**notcurses_visual(3)**).
|
||||||
|
|
||||||
@ -42,6 +42,9 @@ If the chosen blitter is unavailable, **ncls** will degrade (see
|
|||||||
paths: Run on the specified paths. If none are supplied, run on the current
|
paths: Run on the specified paths. If none are supplied, run on the current
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
|
If no scaling is specified, **hires** will be used with the **pixel** blitter,
|
||||||
|
and **scalehi** will be used otherwise.
|
||||||
|
|
||||||
# NOTES
|
# NOTES
|
||||||
|
|
||||||
Optimal display requires a terminal advertising the **rgb** terminfo(5)
|
Optimal display requires a terminal advertising the **rgb** terminfo(5)
|
||||||
|
@ -185,6 +185,7 @@ int main(int argc, char* const * argv){
|
|||||||
bool recursedirs = false;
|
bool recursedirs = false;
|
||||||
bool longlisting = false;
|
bool longlisting = false;
|
||||||
bool dereflinks = false;
|
bool dereflinks = false;
|
||||||
|
bool specified_scaling = false;
|
||||||
ncpp::NCAlign alignment = ncpp::NCAlign::Right;
|
ncpp::NCAlign alignment = ncpp::NCAlign::Right;
|
||||||
ncblitter_e blitter = NCBLIT_PIXEL;
|
ncblitter_e blitter = NCBLIT_PIXEL;
|
||||||
ncscale_e scale = NCSCALE_SCALE_HIRES;
|
ncscale_e scale = NCSCALE_SCALE_HIRES;
|
||||||
@ -227,6 +228,7 @@ int main(int argc, char* const * argv){
|
|||||||
<< optarg << ")" << std::endl;
|
<< optarg << ")" << std::endl;
|
||||||
usage(std::cerr, argv[0], EXIT_FAILURE);
|
usage(std::cerr, argv[0], EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
specified_scaling = true;
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
directories = true;
|
directories = true;
|
||||||
@ -266,6 +268,11 @@ int main(int argc, char* const * argv){
|
|||||||
blitter,
|
blitter,
|
||||||
scale,
|
scale,
|
||||||
};
|
};
|
||||||
|
if(blitter == NCBLIT_PIXEL && !specified_scaling){
|
||||||
|
if(ctx.nc.check_pixel_support() > 0){
|
||||||
|
ctx.scaling = NCSCALE_NONE_HIRES;
|
||||||
|
}
|
||||||
|
}
|
||||||
ctx.nc.cursor_disable();
|
ctx.nc.cursor_disable();
|
||||||
keep_working = true;
|
keep_working = true;
|
||||||
for(auto s = 0u ; s < procs ; ++s){
|
for(auto s = 0u ; s < procs ; ++s){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user