1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

highgui: drop legacy waitkey behavior

This commit is contained in:
Maksim Shabunin
2024-11-05 15:01:53 +03:00
parent 55105719dd
commit 25b67bc99e
2 changed files with 1 additions and 12 deletions
+1 -10
View File
@@ -646,16 +646,7 @@ int cv::waitKeyEx(int delay)
int cv::waitKey(int delay)
{
CV_TRACE_FUNCTION();
int code = waitKeyEx(delay);
#ifndef WINRT
static int use_legacy = -1;
if (use_legacy < 0)
{
use_legacy = getenv("OPENCV_LEGACY_WAITKEY") != NULL ? 1 : 0;
}
if (use_legacy > 0)
return code;
#endif
const int code = waitKeyEx(delay);
return (code != -1) ? (code & 0xff) : -1;
}