Commit 5beedc23 authored by Erwan Tulou's avatar Erwan Tulou Committed by Jean-Baptiste Kempf

core: fix a wrong division

Dividing an unsigned int by 2 is different from dividing an int by 2

This division was the cause for vlc(Win32) displaying a black screen
when zooming exceeded the display size (alt-'o')

Weirdly, there was no problem for Linux !!?? and also no regression :)
(cherry picked from commit 30efd37a)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8a1be16f
......@@ -253,7 +253,7 @@ void vout_display_PlacePicture(vout_display_place_t *place,
place->x = cfg->display.width - place->width;
break;
default:
place->x = (cfg->display.width - place->width) / 2;
place->x = ((int)cfg->display.width - (int)place->width) / 2;
break;
}
......@@ -265,7 +265,7 @@ void vout_display_PlacePicture(vout_display_place_t *place,
place->y = cfg->display.height - place->height;
break;
default:
place->y = (cfg->display.height - place->height) / 2;
place->y = ((int)cfg->display.height - (int)place->height) / 2;
break;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment