From 6ec6374d6f2190ec8ff1e7005e0b7f465f086c8f Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 28 Aug 2006 20:38:31 +0000 Subject: Cosmetics: reindent, remove tabs and break overlong lines. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19586 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 145 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 70 insertions(+), 75 deletions(-) (limited to 'libvo') diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index fa544b8169..3040177636 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -20,10 +20,10 @@ static vo_info_t info = { - "X11 (OpenGL)", - "gl", - "Arpad Gereoffy ", - "" + "X11 (OpenGL)", + "gl", + "Arpad Gereoffy ", + "" }; LIBVO_EXTERN(gl) @@ -373,26 +373,26 @@ static int initGl(uint32_t d_width, uint32_t d_height) { 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 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin 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_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); + 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); + 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); + /* Wait for map. */ + do { + XNextEvent(mDisplay, &xev); + } while (xev.type != MapNotify || xev.xmap.event != vo_window); - XSelectInput(mDisplay, vo_window, NoEventMask); + XSelectInput(mDisplay, vo_window, NoEventMask); - XSync(mDisplay, False); + 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 @@ glconfig: 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 @@ static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) 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) { -- cgit v1.2.3