mirror of
https://github.com/opencv/opencv.git
synced 2024-11-30 22:40:17 +08:00
highgui: drop legacy waitkey behavior
This commit is contained in:
parent
55105719dd
commit
25b67bc99e
@ -119,7 +119,6 @@ Links:
|
||||
|
||||
|
||||
## backends
|
||||
OPENCV_LEGACY_WAITKEY
|
||||
Some modules have multiple available backends, following variables allow choosing specific backend or changing default priorities in which backends will be probed (e.g. when opening a video file).
|
||||
|
||||
| name | type | default | description |
|
||||
@ -327,7 +326,6 @@ Some external dependencies can be detached into a dynamic library, which will be
|
||||
|
||||
| name | type | default | description |
|
||||
|------|------|---------|-------------|
|
||||
| OPENCV_LEGACY_WAITKEY | non-null | | switch `waitKey` return result (default behavior: `return code & 0xff` (or -1), legacy behavior: `return code`) |
|
||||
| $XDG_RUNTIME_DIR | | | Wayland backend specific - create shared memory-mapped file for interprocess communication (named `opencv-shared-??????`) |
|
||||
| OPENCV_HIGHGUI_FB_MODE | string | `FB` | Selects output mode for the framebuffer backend (`FB` - regular frambuffer, `EMU` - emulation, perform internal checks but does nothing, `XVFB` - compatible with _xvfb_ virtual frambuffer) |
|
||||
| OPENCV_HIGHGUI_FB_DEVICE | file path | | Path to frambuffer device to use (will be checked first) |
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user