mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
Fix to use always the first param as timeout if only that one was provided while keeping backwards compatability with 2 params.
This commit is contained in:
parent
c7ae7140ea
commit
db3322ebcd
@ -74,10 +74,12 @@ NamedWindow::BlockingWaitKey(const v8::Arguments& args){
|
|||||||
//SETUP_FUNCTION(NamedWindow)
|
//SETUP_FUNCTION(NamedWindow)
|
||||||
int time = 0;
|
int time = 0;
|
||||||
|
|
||||||
if (args.Length() > 0){
|
if (args.Length() > 1){
|
||||||
time = args[1]->IntegerValue();
|
time = args[1]->IntegerValue();
|
||||||
}else{
|
}else{
|
||||||
time = args[0]->IntegerValue();
|
if (args.Length() > 0){
|
||||||
|
time = args[0]->IntegerValue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int res = cv::waitKey(time);
|
int res = cv::waitKey(time);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user