mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-04-08 08:21:00 -04:00
removed the custom_mode option because it's pretty useless
This commit is contained in:
parent
01807eb2a7
commit
b866774efd
2 changed files with 4 additions and 5 deletions
5
dwl.c
5
dwl.c
|
|
@ -193,7 +193,6 @@ typedef struct {
|
|||
int resy;
|
||||
int rate;
|
||||
bool adaptive_true;
|
||||
bool custom_mode;
|
||||
} MonitorRule;
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -816,13 +815,13 @@ createkeyboard(struct wlr_input_device *device)
|
|||
}
|
||||
void
|
||||
set_mode(struct wlr_output *output, int width, int height,
|
||||
float refresh_rate, bool custom) {
|
||||
float refresh_rate) {
|
||||
// Not all floating point integers can be represented exactly
|
||||
// as (int)(1000 * mHz / 1000.f)
|
||||
// round() the result to avoid any error
|
||||
int mhz = (int)round(refresh_rate * 1000);
|
||||
|
||||
if (wl_list_empty(&output->modes) || custom) {
|
||||
if (wl_list_empty(&output->modes)) {
|
||||
wlr_output_set_custom_mode(output, width, height,
|
||||
refresh_rate > 0 ? mhz : 0);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue