source/Platform/Unix: Rename XRandR to Xrandr
This commit is contained in:
parent
ca46bd0ef7
commit
f71fdea463
5 changed files with 11 additions and 11 deletions
|
|
@ -1,34 +0,0 @@
|
|||
#include "XRandR.h"
|
||||
#include <Spectre/System/Log.h>
|
||||
#include <algorithm>
|
||||
|
||||
namespace sp {
|
||||
|
||||
bool XRandR::FindMode(::Display* disp, unsigned int width, unsigned int height, unsigned int bpp, SizeID *id, short *rate)
|
||||
{
|
||||
::XRRScreenSize *xrrs;
|
||||
int num_sizes;
|
||||
|
||||
xrrs = XRRSizes(disp, 0, &num_sizes);
|
||||
for(int i = 0; i < num_sizes; i++) {
|
||||
|
||||
Log::debug("Mode %dx%d", xrrs[i].width, xrrs[i].height);
|
||||
|
||||
if (xrrs[i].width != width && xrrs[i].height != height) {
|
||||
continue;
|
||||
}
|
||||
|
||||
short *rates;
|
||||
int num_rates;
|
||||
|
||||
rates = XRRRates(disp, 0, i, &num_rates);
|
||||
if (num_rates > 0) {
|
||||
*id = i;
|
||||
*rate = rates[num_rates - 1];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace sp
|
||||
Loading…
Add table
Add a link
Reference in a new issue