mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
x11_common: make modecount variable global
Since the modecount variable is only ever initialized when the videmodes variable is, it also has to be a global variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35284 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e2a9215e9b
commit
17f2166b73
@ -95,6 +95,7 @@ char **vo_fstype_list;
|
||||
int metacity_hack = 0;
|
||||
|
||||
#ifdef CONFIG_XF86VM
|
||||
static int modecount;
|
||||
XF86VidModeModeInfo **vidmodes = NULL;
|
||||
XF86VidModeModeLine modeline;
|
||||
#endif
|
||||
@ -1654,8 +1655,6 @@ void vo_vm_switch(struct vo *vo)
|
||||
int X = vo->dwidth, Y = vo->dheight;
|
||||
int modeline_width, modeline_height;
|
||||
|
||||
int modecount;
|
||||
|
||||
if (XF86VidModeQueryExtension(mDisplay, &vm_event, &vm_error))
|
||||
{
|
||||
XF86VidModeQueryVersion(mDisplay, &vm_ver, &vm_rev);
|
||||
@ -1711,7 +1710,7 @@ void vo_vm_close(struct vo *vo)
|
||||
struct MPOpts *opts = vo->opts;
|
||||
if (vidmodes != NULL)
|
||||
{
|
||||
int i, modecount;
|
||||
int i;
|
||||
|
||||
free(vidmodes);
|
||||
vidmodes = NULL;
|
||||
@ -1731,6 +1730,7 @@ void vo_vm_close(struct vo *vo)
|
||||
XF86VidModeSwitchToMode(dpy, vo->x11->screen, vidmodes[i]);
|
||||
free(vidmodes);
|
||||
vidmodes = NULL;
|
||||
modecount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user