summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-08-28 20:38:31 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-08-28 20:38:31 +0000
commit6ec6374d6f2190ec8ff1e7005e0b7f465f086c8f (patch)
tree01d5fdfdfbd937d7c4c2268d9d192e61bf3d92d3 /libvo
parent6fd61e1c4c830d03ee2224db9d6c28bd456ecbd6 (diff)
downloadmpv-6ec6374d6f2190ec8ff1e7005e0b7f465f086c8f.tar.bz2
mpv-6ec6374d6f2190ec8ff1e7005e0b7f465f086c8f.tar.xz
Cosmetics: reindent, remove tabs and break overlong lines.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19586 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c145
1 files changed, 70 insertions, 75 deletions
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 <arpi@esp-team.scene.hu>",
- ""
+ "X11 (OpenGL)",
+ "gl",
+ "Arpad Gereoffy <arpi@esp-team.scene.hu>",
+ ""
};
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) {