Share enum definition for det_monrec_parameter sync_source
There were two separate enum definitions, one inside det_monrec_parameter struct and one for a local variable (which was then stored inside the struct). Sharing a single definition makes the code more obviously correct while making the compiler happier. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
4b55b2cf8a
commit
fbbadca7e8
|
@ -1495,12 +1495,16 @@ GuessRangeFromModes(MonPtr mon, DisplayModePtr mode)
|
||||||
mon->vrefresh[0].lo = 58.0;
|
mon->vrefresh[0].lo = 58.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum det_monrec_source {
|
||||||
|
sync_config, sync_edid, sync_default
|
||||||
|
};
|
||||||
|
|
||||||
struct det_monrec_parameter {
|
struct det_monrec_parameter {
|
||||||
MonRec *mon_rec;
|
MonRec *mon_rec;
|
||||||
int *max_clock;
|
int *max_clock;
|
||||||
Bool set_hsync;
|
Bool set_hsync;
|
||||||
Bool set_vrefresh;
|
Bool set_vrefresh;
|
||||||
enum { sync_config, sync_edid, sync_default } *sync_source;
|
enum det_monrec_source *sync_source;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void handle_detailed_monrec(struct detailed_monitor_section *det_mon,
|
static void handle_detailed_monrec(struct detailed_monitor_section *det_mon,
|
||||||
|
@ -1563,7 +1567,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY)
|
||||||
Bool add_default_modes = TRUE;
|
Bool add_default_modes = TRUE;
|
||||||
Bool debug_modes = config->debug_modes ||
|
Bool debug_modes = config->debug_modes ||
|
||||||
xf86Initialising;
|
xf86Initialising;
|
||||||
enum { sync_config, sync_edid, sync_default } sync_source = sync_default;
|
enum det_monrec_source sync_source = sync_default;
|
||||||
|
|
||||||
while (output->probed_modes != NULL)
|
while (output->probed_modes != NULL)
|
||||||
xf86DeleteMode(&output->probed_modes, output->probed_modes);
|
xf86DeleteMode(&output->probed_modes, output->probed_modes);
|
||||||
|
|
Loading…
Reference in New Issue