[MPlayer-cvslog] r19586 - trunk/libvo/vo_gl.c
reimar
subversion at mplayerhq.hu
Mon Aug 28 22:38:31 CEST 2006
Author: reimar
Date: Mon Aug 28 22:38:31 2006
New Revision: 19586
Modified:
trunk/libvo/vo_gl.c
Log:
Cosmetics: reindent, remove tabs and break overlong lines.
Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c (original)
+++ trunk/libvo/vo_gl.c Mon Aug 28 22:38:31 2006
@@ -20,10 +20,10 @@
static vo_info_t info =
{
- "X11 (OpenGL)",
- "gl",
- "Arpad Gereoffy <arpi at esp-team.scene.hu>",
- ""
+ "X11 (OpenGL)",
+ "gl",
+ "Arpad Gereoffy <arpi at esp-team.scene.hu>",
+ ""
};
LIBVO_EXTERN(gl)
@@ -373,26 +373,26 @@
static int
config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
- image_height = height;
- image_width = width;
- image_format = format;
- glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type);
-
- int_pause = 0;
- vo_flipped = !!(flags & VOFLAG_FLIPPING);
-
- panscan_init();
- aspect_save_orig(width,height);
- aspect_save_prescale(d_width,d_height);
- update_xinerama_info();
-
- aspect(&d_width,&d_height,A_NOZOOM);
- vo_dx = (int)(vo_screenwidth - d_width) / 2;
- vo_dy = (int)(vo_screenheight - d_height) / 2;
- geometry(&vo_dx, &vo_dy, &d_width, &d_height,
- vo_screenwidth, vo_screenheight);
- vo_dx += xinerama_x;
- vo_dy += xinerama_y;
+ image_height = height;
+ image_width = width;
+ image_format = format;
+ glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type);
+
+ int_pause = 0;
+ vo_flipped = !!(flags & VOFLAG_FLIPPING);
+
+ panscan_init();
+ aspect_save_orig(width,height);
+ aspect_save_prescale(d_width,d_height);
+ update_xinerama_info();
+
+ aspect(&d_width,&d_height,A_NOZOOM);
+ vo_dx = (int)(vo_screenwidth - d_width) / 2;
+ vo_dy = (int)(vo_screenheight - d_height) / 2;
+ geometry(&vo_dx, &vo_dy, &d_width, &d_height,
+ vo_screenwidth, vo_screenheight);
+ vo_dx += xinerama_x;
+ vo_dy += xinerama_y;
#ifdef HAVE_NEW_GUI
if (use_gui) {
// GUI creates and manages window for us
@@ -416,63 +416,58 @@
goto glconfig;
}
if ( vo_window == None ) {
- unsigned int fg, bg;
- XSizeHints hint;
- XVisualInfo *vinfo;
- XEvent xev;
-
- vo_fs = VO_FALSE;
-
- hint.x = vo_dx;
- hint.y = vo_dy;
- hint.width = d_width;
- hint.height = d_height;
- hint.flags = PPosition | PSize;
-
- /* Get some colors */
-
- bg = WhitePixel(mDisplay, mScreen);
- fg = BlackPixel(mDisplay, mScreen);
-
- /* Make the window */
-
- vinfo=glXChooseVisual( mDisplay,mScreen,wsGLXAttrib );
- if (vinfo == NULL)
- {
- mp_msg(MSGT_VO, MSGL_ERR, "[gl] no GLX support present\n");
- return -1;
- }
-
+ unsigned int fg, bg;
+ XSizeHints hint;
+ XVisualInfo *vinfo;
+ XEvent xev;
+
+ vo_fs = VO_FALSE;
+
+ hint.x = vo_dx;
+ hint.y = vo_dy;
+ hint.width = d_width;
+ hint.height = d_height;
+ hint.flags = PPosition | PSize;
+
+ /* Get some colors */
+ bg = WhitePixel(mDisplay, mScreen);
+ fg = BlackPixel(mDisplay, mScreen);
+
+ /* Make the window */
+ vinfo=glXChooseVisual( mDisplay,mScreen,wsGLXAttrib );
+ if (vinfo == NULL)
+ {
+ mp_msg(MSGT_VO, MSGL_ERR, "[gl] no GLX support present\n");
+ return -1;
+ }
+ vo_window = vo_x11_create_smooth_window(mDisplay, mRootWin, vinfo->visual,
+ hint.x, hint.y, hint.width, hint.height, vinfo->depth,
+ XCreateColormap(mDisplay, mRootWin, vinfo->visual, AllocNone));
+
+ vo_x11_classhint( mDisplay,vo_window,"gl" );
+ vo_hidecursor(mDisplay,vo_window);
+
+ XSelectInput(mDisplay, vo_window, StructureNotifyMask);
+ /* Tell other applications about this window */
+ XSetStandardProperties(mDisplay, vo_window, title, title, None, NULL, 0, &hint);
+ /* Map window. */
+ XMapWindow(mDisplay, vo_window);
+
+ /* Wait for map. */
+ do {
+ XNextEvent(mDisplay, &xev);
+ } while (xev.type != MapNotify || xev.xmap.event != vo_window);
- vo_window = vo_x11_create_smooth_window(mDisplay, mRootWin, vinfo->visual, hint.x, hint.y, hint.width, hint.height,
- vinfo->depth, XCreateColormap(mDisplay, mRootWin, vinfo->visual, AllocNone));
+ XSelectInput(mDisplay, vo_window, NoEventMask);
- vo_x11_classhint( mDisplay,vo_window,"gl" );
- vo_hidecursor(mDisplay,vo_window);
+ XSync(mDisplay, False);
- XSelectInput(mDisplay, vo_window, StructureNotifyMask);
- /* Tell other applications about this window */
- XSetStandardProperties(mDisplay, vo_window, title, title, None, NULL, 0, &hint);
- /* Map window. */
- XMapWindow(mDisplay, vo_window);
-
- /* Wait for map. */
- do
- {
- XNextEvent(mDisplay, &xev);
- }
- while (xev.type != MapNotify || xev.xmap.event != vo_window);
-
- XSelectInput(mDisplay, vo_window, NoEventMask);
-
- XSync(mDisplay, False);
-
- vo_x11_selectinput_witherr(mDisplay, vo_window, StructureNotifyMask | KeyPressMask | PointerMotionMask
- | ButtonPressMask | ButtonReleaseMask | ExposureMask
- );
+ vo_x11_selectinput_witherr(mDisplay, vo_window,
+ StructureNotifyMask | KeyPressMask | PointerMotionMask |
+ ButtonPressMask | ButtonReleaseMask | ExposureMask);
}
- if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, vo_ontop);
+ if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, vo_ontop);
vo_x11_nofs_sizepos(vo_dx, vo_dy, d_width, d_height);
if (vo_fs ^ (flags & VOFLAG_FULLSCREEN))
@@ -485,7 +480,7 @@
setGlWindow(&gl_vinfo, &gl_context, vo_window);
initGl(vo_dwidth, vo_dheight);
- return 0;
+ return 0;
}
static void check_events(void)
@@ -649,7 +644,7 @@
x / 2, y / 2, w / 2, h / 2, slice_height);
ActiveTexture(GL_TEXTURE0);
}
- return 0;
+ return 0;
}
static uint32_t get_image(mp_image_t *mpi) {
More information about the MPlayer-cvslog
mailing list