Commit d015b55e authored by Alexander Alekhin's avatar Alexander Alekhin

highgui: preserve waitKey -1 return value

parent 7dd3723a
......@@ -218,7 +218,7 @@ int cv::waitKey(int delay)
if (use_legacy > 0)
return code;
#endif
return code & 0xff;
return (code != -1) ? (code & 0xff) : -1;
}
int cv::createTrackbar(const String& trackbarName, const String& winName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment