Skip to content
Snippets Groups Projects
Commit df3223f9 authored by Dirk Eibach's avatar Dirk Eibach Committed by Tom Rini
Browse files

gdsys: osd: Allow osdsize on valid screens only


Limit "osdsize"-command to access valid screens only.

Signed-off-by: default avatarDirk Eibach <dirk.eibach@gdsys.cc>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent 52b13f27
No related branches found
No related tags found
No related merge requests found
......@@ -469,6 +469,9 @@ int osd_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
for (screen = 0; screen < MAX_OSD_SCREEN; ++screen) {
if (!(osd_screen_mask & (1 << screen)))
continue;
OSD_SET_REG(screen, xy_size, ((x - 1) << 8) | (y - 1));
OSD_SET_REG(screen, x_pos, 32767 * (640 - 12 * x) / 65535);
OSD_SET_REG(screen, y_pos, 32767 * (480 - 18 * y) / 65535);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment