sys_info: add is_screen_reader

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2024-01-05 17:36:05 +01:00
parent c5feba2ed0
commit 790c26789a

View File

@ -207,6 +207,19 @@ namespace stdex
#endif #endif
} }
///
/// Is screen reader currently active?
///
static bool is_screen_reader()
{
#ifdef _WIN32
BOOL b;
return SystemParametersInfo(SPI_GETSCREENREADER, 0, &b, 0) && b;
#else
return false;
#endif
}
protected: protected:
#ifndef _WIN32 #ifndef _WIN32
struct utsname m_utsn; struct utsname m_utsn;