This will be used (later) to store the list of all enabled display devices. Add a global variable gpmdev (should really be stored in DISPLAYINFO structure) Replace global variable gppdevPrimary by pmdev->ppdevGlobal.