summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2012-10-30 16:34:02 +0000
committerwm4 <wm4@nowhere>2012-10-31 22:30:09 +0100
commit17f2166b73f665cb6b293708ba758ceaa467a832 (patch)
tree6e53548ccd3a71e54dcb06a88a113fbfcd2f8290
parente2a9215e9bdd9d57233e8a85e7704f892054553f (diff)
downloadmpv-17f2166b73f665cb6b293708ba758ceaa467a832.tar.bz2
mpv-17f2166b73f665cb6b293708ba758ceaa467a832.tar.xz
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
-rw-r--r--libvo/x11_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 06ffcaef54..1e097bfeaf 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -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;
}
}