- int val = FP_EVENT_VCR_SB_CHANGED; // ask only for this event
- if (ioctl(m_fp_fd, FP_IOCTL_GET_EVENT, &val) < 0)
- eDebug("FP_IOCTL_GET_EVENT failed (%m)");
- else if (val & FP_EVENT_VCR_SB_CHANGED)
- /* emit */ vcr_sb_notifier(getVCRSlowBlanking());
+ FILE *f = fopen("/proc/stb/fp/events", "r");
+ if (f)
+ {
+ int events;
+ if (fscanf(f, "%d", &events) != 1)
+ eDebug("read /proc/stb/fp/events failed!! (%m)");
+ else if (events & FP_EVENT_VCR_SB_CHANGED)
+ /* emit */ vcr_sb_notifier(getVCRSlowBlanking());
+ fclose(f);
+ }
+ else
+ {
+ int val = FP_EVENT_VCR_SB_CHANGED; // ask only for this event
+ if (ioctl(m_fp_fd, FP_IOCTL_GET_EVENT, &val) < 0)
+ eDebug("FP_IOCTL_GET_EVENT failed (%m)");
+ else if (val & FP_EVENT_VCR_SB_CHANGED)
+ /* emit */ vcr_sb_notifier(getVCRSlowBlanking());
+ }