From 30efd37a75ab41794a3999cf949a41dcb1c1dc1d Mon Sep 17 00:00:00 2001 From: Erwan Tulou Date: Thu, 10 Jun 2010 18:09:42 +0200 Subject: [PATCH] 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 :) --- src/video_output/display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_output/display.c b/src/video_output/display.c index 43062f75f0..af80213e15 100644 --- a/src/video_output/display.c +++ b/src/video_output/display.c @@ -255,7 +255,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; } @@ -267,7 +267,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; } } -- 2.39.2