Modes is a zero-based list, so preferred needs to be -1.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
This commit is contained in:
Chris Michael 2013-05-19 10:29:10 +01:00
parent cc919670fd
commit 012a05e571
1 changed files with 1 additions and 1 deletions

View File

@ -1034,7 +1034,7 @@ _e_randr_config_output_preferred_mode_get(E_Randr_Output_Config *cfg)
modes = ecore_x_randr_output_modes_get(root, cfg->xid, &n, &p);
if ((!modes) || (n == 0)) return 0;
mode = modes[p];
mode = modes[p - 1];
free(modes);
return mode;