{
int l = 0, r = 0, t = 0, b = 0;
{
int l = 0, r = 0, t = 0, b = 0;
- if (*w > g_menuscreen_w)
- l = r = (*w - g_menuscreen_w) / 2;
- if (*h > g_menuscreen_h)
- t = b = (*h - g_menuscreen_h) / 2;
+ if (w > g_menuscreen_w) {
+ l = r = (w - g_menuscreen_w) / 2;
+ w -= l + r;
+ }
+ if (h > g_menuscreen_h) {
+ t = b = (h - g_menuscreen_h) / 2;
+ h -= t + b;
+ }
- vout_fbdev_clear(layer_fb);
- buf = vout_fbdev_resize(layer_fb, *w, *h, *bpp,
+ buf = vout_fbdev_resize(layer_fb, w, h, *bpp,