summaryrefslogtreecommitdiffstats
path: root/libvo/vo_gl2.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-06 22:23:06 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-06 22:23:06 +0000
commit6b9f08f720b23739e0ff7c9e3dbdf1f97e7867dd (patch)
treebf40d4cb0ede4c06bf4ece4a38c2f9bfa4b7b5db /libvo/vo_gl2.c
parent33d32ef1933c5b71618db26a1e202a902d7f80e2 (diff)
downloadmpv-6b9f08f720b23739e0ff7c9e3dbdf1f97e7867dd.tar.bz2
mpv-6b9f08f720b23739e0ff7c9e3dbdf1f97e7867dd.tar.xz
Get rid of most #ifdefs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17117 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_gl2.c')
-rw-r--r--libvo/vo_gl2.c42
1 files changed, 8 insertions, 34 deletions
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 4bac77ff76..102becc81f 100644
--- a/libvo/vo_gl2.c
+++ b/libvo/vo_gl2.c
@@ -905,24 +905,15 @@ static int gl_handlekey(int key)
return 1;
}
-#ifdef GL_WIN32
-
-static void check_events(void) {
- int e=vo_w32_check_events();
- if(e&VO_EVENT_RESIZE) resize(&vo_dwidth, &vo_dheight);
- if(e&VO_EVENT_EXPOSE && int_pause) flip_page();
-}
-
-#else
-
static void check_events(void)
{
+ int e;
+#ifndef GL_WIN32
XEvent Event;
char buf[100];
KeySym keySym;
int key;
static XComposeStatus stat;
- int e;
while ( XPending( mDisplay ) )
{
@@ -941,13 +932,12 @@ static void check_events(void)
break;
}
}
- e=vo_x11_check_events(mDisplay);
+#endif
+ e=vo_check_events();
if(e&VO_EVENT_RESIZE) resize(&vo_dwidth, &vo_dheight);
if(e&VO_EVENT_EXPOSE && int_pause) flip_page();
}
-#endif
-
static void draw_osd(void)
{
if (ImageData)
@@ -963,11 +953,7 @@ flip_page(void)
// glFlush();
if (use_glFinish)
glFinish();
-#ifdef GL_WIN32
- SwapBuffers(vo_hdc);
-#else
- glXSwapBuffers( mDisplay,vo_window );
-#endif
+ swapGlBuffers();
if (vo_fs) // Avoid flickering borders in fullscreen mode
glClear (GL_COLOR_BUFFER_BIT);
@@ -1070,11 +1056,7 @@ uninit(void)
free(texgrid);
texgrid = NULL;
}
-#ifdef GL_WIN32
- vo_w32_uninit();
-#else
- vo_x11_uninit();
-#endif
+ vo_uninit();
}
static opt_t subopts[] = {
@@ -1119,18 +1101,10 @@ static int control(uint32_t request, void *data, ...)
case VOCTRL_GUISUPPORT:
return VO_TRUE;
case VOCTRL_ONTOP:
-#ifdef GL_WIN32
- vo_w32_ontop();
-#else
- vo_x11_ontop();
-#endif
+ vo_ontop();
return VO_TRUE;
case VOCTRL_FULLSCREEN:
-#ifdef GL_WIN32
- vo_w32_fullscreen();
-#else
- vo_x11_fullscreen();
-#endif
+ vo_fullscreen();
if (setGlWindow(&gl_vinfo, &gl_context, vo_window) == SET_WINDOW_REINIT)
initGl(vo_dwidth, vo_dheight);
resize(&vo_dwidth, &vo_dheight);