diff options
author | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> | 2014-07-15 19:00:59 +0900 |
---|---|---|
committer | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp> | 2014-08-21 21:50:56 +0900 |
commit | 9c052f0980a4b50bbdeb0542d49c4d6261d731a0 (patch) | |
tree | b06e42d6ec2126a4e74121a347489690167fc049 | |
parent | d39e6caa19eb4df39ded990b1a7f11acce97905b (diff) | |
download | weston-9c052f0980a4b50bbdeb0542d49c4d6261d731a0.tar.gz |
To get resolution of a screen, refer width and height of screen's of weston_output.
Priviously, this code refers width and height of current_mode. However it is not always available. E.g. on Tizen.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-rw-r--r-- | ivi-shell/ivi-layout.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 39b7a968..5ed55131 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -1576,8 +1576,10 @@ ivi_layout_getScreenResolution(struct ivi_layout_screen *iviscrn, } output = iviscrn->output; - *pWidth = output->current_mode->width; - *pHeight = output->current_mode->height; + weston_log("ivi-shell uses %s as a screen.\n", output->name); + *pWidth = output->width; + *pHeight = output->height; + weston_log("ivi-shell: screen resolution is (%i,%i).\n", *pWidth,*pHeight); return 0; } |