WindowInfo: Linux build fix
This commit is contained in:
parent
1057e42956
commit
13b2cf6b1c
|
@ -87,7 +87,7 @@ bool WindowInfo::QueryRefreshRateForWindow(const WindowInfo& wi, float* refresh_
|
|||
|
||||
#ifdef USE_X11
|
||||
|
||||
#include "common/scope_guard.h"
|
||||
#include "common/scoped_guard.h"
|
||||
#include "gl/x11_window.h"
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
|
||||
|
@ -107,7 +107,7 @@ static bool GetRefreshRateFromXRandR(const WindowInfo& wi, float* refresh_rate)
|
|||
return false;
|
||||
}
|
||||
|
||||
Common::ScopeGuard res_guard([res]() { XRRFreeScreenResources(res); });
|
||||
ScopedGuard res_guard([res]() { XRRFreeScreenResources(res); });
|
||||
|
||||
int num_monitors;
|
||||
XRRMonitorInfo* mi = XRRGetMonitors(display, window, True, &num_monitors);
|
||||
|
@ -121,7 +121,7 @@ static bool GetRefreshRateFromXRandR(const WindowInfo& wi, float* refresh_rate)
|
|||
Log_WarningPrintf("XRRGetMonitors() returned %d monitors, using first", num_monitors);
|
||||
}
|
||||
|
||||
Common::ScopeGuard mi_guard([mi]() { XRRFreeMonitors(mi); });
|
||||
ScopedGuard mi_guard([mi]() { XRRFreeMonitors(mi); });
|
||||
if (mi->noutput <= 0)
|
||||
{
|
||||
Log_ErrorPrint("Monitor has no outputs");
|
||||
|
@ -139,7 +139,7 @@ static bool GetRefreshRateFromXRandR(const WindowInfo& wi, float* refresh_rate)
|
|||
return false;
|
||||
}
|
||||
|
||||
Common::ScopeGuard oi_guard([oi]() { XRRFreeOutputInfo(oi); });
|
||||
ScopedGuard oi_guard([oi]() { XRRFreeOutputInfo(oi); });
|
||||
|
||||
XRRCrtcInfo* ci = XRRGetCrtcInfo(display, res, oi->crtc);
|
||||
if (!ci)
|
||||
|
@ -148,7 +148,7 @@ static bool GetRefreshRateFromXRandR(const WindowInfo& wi, float* refresh_rate)
|
|||
return false;
|
||||
}
|
||||
|
||||
Common::ScopeGuard ci_guard([ci]() { XRRFreeCrtcInfo(ci); });
|
||||
ScopedGuard ci_guard([ci]() { XRRFreeCrtcInfo(ci); });
|
||||
|
||||
XRRModeInfo* mode = nullptr;
|
||||
for (int i = 0; i < res->nmode; i++)
|
||||
|
|
Loading…
Reference in New Issue