removed the custom_mode option because it's pretty useless

This commit is contained in:
Palanix 2021-08-07 11:52:05 +02:00
parent 01807eb2a7
commit b866774efd
2 changed files with 4 additions and 5 deletions

5
dwl.c
View file

@ -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;