mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 22:46:00 +01:00
bring back renderer session scan
This commit is contained in:
parent
484caf3b1c
commit
48bf839230
1 changed files with 13 additions and 14 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue