summaryrefslogtreecommitdiffstats
path: root/libvo/vo_ggi.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-21 01:44:53 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 13:46:40 +0300
commita2212a71a74718d71673336a6b08b11f6cf1535b (patch)
treef76460a6e4c662cb56b7ffece75e40834241684d /libvo/vo_ggi.c
parentce76dfdd4ac46e955cc57c6f5c7ae98d8018abab (diff)
downloadmpv-a2212a71a74718d71673336a6b08b11f6cf1535b.tar.bz2
mpv-a2212a71a74718d71673336a6b08b11f6cf1535b.tar.xz
Remove vo_depthonscreen references from non-X VOs
X-specific code uses this global as its internal variable (assuming that X is initialized if it is set). While using non-X VOs the variable is not accessed outside the VO. So make those VOs use their own variables instead of the global vo_depthonscreen.
Diffstat (limited to 'libvo/vo_ggi.c')
-rw-r--r--libvo/vo_ggi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libvo/vo_ggi.c b/libvo/vo_ggi.c
index 009c3c2e2b..a4ded390a6 100644
--- a/libvo/vo_ggi.c
+++ b/libvo/vo_ggi.c
@@ -67,6 +67,8 @@ static struct ggi_conf_s {
} flushregion;
int voflags;
+
+ int depthonscreen;
} ggi_conf;
@@ -194,7 +196,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
ggiSetFlags(ggi_conf.drawvis, GGIFLAG_ASYNC);
}
- vo_depthonscreen = GT_DEPTH(mode.graphtype);
+ ggi_conf.depthonscreen = GT_DEPTH(mode.graphtype);
vo_screenwidth = mode.virt.x;
vo_screenheight = mode.virt.y;
@@ -358,9 +360,9 @@ static int query_format(uint32_t format)
| VFCAP_CSP_SUPPORTED_BY_HW
| VFCAP_ACCEPT_STRIDE;
- if ((!vo_depthonscreen || !vo_dbpp) && ggi_conf.vis) {
+ if ((!ggi_conf.depthonscreen || !vo_dbpp) && ggi_conf.vis) {
if (ggiGetMode(ggi_conf.vis, &mode) == 0) {
- vo_depthonscreen = GT_DEPTH(mode.graphtype);
+ ggi_conf.depthonscreen = GT_DEPTH(mode.graphtype);
vo_dbpp = GT_SIZE(mode.graphtype);
}
if (GT_SCHEME(mode.graphtype) == GT_AUTO) {
@@ -368,7 +370,7 @@ static int query_format(uint32_t format)
}
if (GT_SCHEME(mode.graphtype) != GT_TRUECOLOR) {
mode.graphtype = GT_32BIT;
- vo_depthonscreen = GT_DEPTH(mode.graphtype);
+ ggi_conf.depthonscreen = GT_DEPTH(mode.graphtype);
vo_dbpp = GT_SIZE(mode.graphtype);
}
}