bring back renderer session scan

This commit is contained in:
Vaxry 2024-06-23 19:43:47 +02:00
parent ac78133b4c
commit 2dbb77b16b

View file

@ -26,24 +26,23 @@ static int cursorTicker(void* data) {
CHyprRenderer::CHyprRenderer() { CHyprRenderer::CHyprRenderer() {
if (g_pCompositor->m_pAqBackend->hasSession()) { if (g_pCompositor->m_pAqBackend->hasSession()) {
// wlr_device* dev; for (auto& dev : g_pCompositor->m_pAqBackend->session->sessionDevices) {
// FIXME: const auto DRMV = drmGetVersion(dev->fd);
// wl_list_for_each(dev, &g_pCompositor->m_sWLRSession->devices, link) { if (!DRMV)
// const auto DRMV = drmGetVersion(dev->fd); continue;
std::string name = std::string{DRMV->name, DRMV->name_len};
std::transform(name.begin(), name.end(), name.begin(), tolower);
// std::string name = std::string{DRMV->name, DRMV->name_len}; if (name.contains("nvidia"))
// std::transform(name.begin(), name.end(), name.begin(), tolower); m_bNvidia = true;
// if (name.contains("nvidia")) Debug::log(LOG, "DRM driver information: {} v{}.{}.{} from {} description {}", name, DRMV->version_major, DRMV->version_minor, DRMV->version_patchlevel,
// m_bNvidia = true; std::string{DRMV->date, DRMV->date_len}, std::string{DRMV->desc, DRMV->desc_len});
// Debug::log(LOG, "DRM driver information: {} v{}.{}.{} from {} description {}", name, DRMV->version_major, DRMV->version_minor, DRMV->version_patchlevel, drmFreeVersion(DRMV);
// std::string{DRMV->date, DRMV->date_len}, std::string{DRMV->desc, DRMV->desc_len}); }
// drmFreeVersion(DRMV);
// }
} else { } else {
Debug::log(LOG, "m_sWLRSession is null, omitting full DRM node checks"); Debug::log(LOG, "Aq backend has no session, omitting full DRM node checks");
const auto DRMV = drmGetVersion(g_pCompositor->m_iDRMFD); const auto DRMV = drmGetVersion(g_pCompositor->m_iDRMFD);