diff options
author | Kevin Brace <kevinbrace@gmx.com> | 2020-01-13 15:29:28 -0600 |
---|---|---|
committer | Kevin Brace <kevinbrace@gmx.com> | 2020-01-13 15:29:28 -0600 |
commit | eec9af1c0e28d697b9c99247d9dec5f211b99140 (patch) | |
tree | 7a0910da9ecd55b4549b521bb5608d3b66c68948 /src | |
parent | f2c731085ae7cddc3ec93f0e85b0c257897c10b6 (diff) |
Preserve displayWidth member of ScrnInfoRec struct when resizing
The preserved value is used only when the original setting is being
restored due to an error.
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/via_driver.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/via_driver.c b/src/via_driver.c index dc87deb..e3d5545 100644 --- a/src/via_driver.c +++ b/src/via_driver.c @@ -660,7 +660,7 @@ via_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) Bool ret; ScreenPtr screen; uint32_t old_fb_id; - int i, pitch, old_width, old_height, old_pitch; + int i, pitch, old_width, old_height, old_displayWidth; int cpp = (scrn->bitsPerPixel + 7) / 8; PixmapPtr ppix; void *new_pixels; @@ -684,7 +684,7 @@ via_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) * be restored. */ old_width = scrn->virtualX; old_height = scrn->virtualY; - old_pitch = drmmode->front_bo->pitch; + old_displayWidth = scrn->displayWidth; old_fb_id = drmmode->fb_id; old_front = drmmode->front_bo; @@ -788,7 +788,7 @@ fail: scrn->virtualX = old_width; scrn->virtualY = old_height; - scrn->displayWidth = old_pitch / cpp; + scrn->displayWidth = old_displayWidth; drmmode->fb_id = old_fb_id; drmmode->front_bo = old_front; |