summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-07-05 19:45:14 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:14:20 +0200
commit4e151f79e981efe9e1d0e7bbdbefa2750244dc9f (patch)
tree140369cde744ba40e820623966fdc3f2d5ecd0f0 /libvo
parent14d00a65e9641c44721879c62a3a992fdd746c69 (diff)
downloadmpv-4e151f79e981efe9e1d0e7bbdbefa2750244dc9f.tar.bz2
mpv-4e151f79e981efe9e1d0e7bbdbefa2750244dc9f.tar.xz
vo_gl: Some small whitespace and {} cosmetics
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31639 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_gl.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index b8d35088ca..43b3a6a03a 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -220,10 +220,10 @@ static void resize(int x,int y){
if (!scaled_osd) {
#ifdef CONFIG_FREETYPE
- // adjust font size to display size
- force_load_font = 1;
+ // adjust font size to display size
+ force_load_font = 1;
#endif
- vo_osd_changed(OSDTYPE_OSD);
+ vo_osd_changed(OSDTYPE_OSD);
}
mpglClear(GL_COLOR_BUFFER_BIT);
redraw();
@@ -264,10 +264,10 @@ static void update_yuvconv(void) {
glSetupYUVConversion(&params);
if (custom_prog) {
FILE *f = fopen(custom_prog, "rb");
- if (!f)
+ if (!f) {
mp_msg(MSGT_VO, MSGL_WARN,
"[gl] Could not read customprog %s\n", custom_prog);
- else {
+ } else {
char *prog = calloc(1, MAX_CUSTOM_PROG_SIZE + 1);
fread(prog, 1, MAX_CUSTOM_PROG_SIZE, f);
fclose(f);
@@ -280,18 +280,18 @@ static void update_yuvconv(void) {
}
if (custom_tex) {
FILE *f = fopen(custom_tex, "rb");
- if (!f)
+ if (!f) {
mp_msg(MSGT_VO, MSGL_WARN,
"[gl] Could not read customtex %s\n", custom_tex);
- else {
+ } else {
int width, height, maxval;
mpglActiveTexture(GL_TEXTURE3);
if (glCreatePPMTex(custom_trect?GL_TEXTURE_RECTANGLE:GL_TEXTURE_2D, 0,
- custom_tlin?GL_LINEAR:GL_NEAREST,
- f, &width, &height, &maxval))
+ custom_tlin?GL_LINEAR:GL_NEAREST,
+ f, &width, &height, &maxval)) {
mpglProgramEnvParameter4f(GL_FRAGMENT_PROGRAM, 1,
1.0 / width, 1.0 / height, width, height);
- else
+ } else
mp_msg(MSGT_VO, MSGL_WARN,
"[gl] Error parsing customtex %s\n", custom_tex);
fclose(f);
@@ -608,9 +608,12 @@ static int create_window(uint32_t d_width, uint32_t d_height, uint32_t flags, co
#endif
#ifdef CONFIG_GL_X11
if (glctx.type == GLTYPE_X11) {
- static int default_glx_attribs[] = {GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None};
+ static int default_glx_attribs[] = {
+ GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1,
+ GLX_DOUBLEBUFFER, None
+ };
static int stereo_glx_attribs[] = {
- GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1,GLX_BLUE_SIZE, 1,
+ GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1,
GLX_DOUBLEBUFFER, GLX_STEREO, None
};
XVisualInfo *vinfo = NULL;
@@ -622,8 +625,7 @@ static int create_window(uint32_t d_width, uint32_t d_height, uint32_t flags, co
}
if (!vinfo)
vinfo = glXChooseVisual(mDisplay, mScreen, default_glx_attribs);
- if (vinfo == NULL)
- {
+ if (!vinfo) {
mp_msg(MSGT_VO, MSGL_ERR, "[gl] no GLX support present\n");
return -1;
}
@@ -828,11 +830,11 @@ static void do_render(void) {
mpi_flipped ^ vo_flipped);
glDisable3D(stereo_mode);
} else {
- glDrawTex(0, 0, image_width, image_height,
- 0, 0, image_width, image_height,
- texture_width, texture_height,
- use_rectangle == 1, is_yuv,
- mpi_flipped ^ vo_flipped);
+ glDrawTex(0, 0, image_width, image_height,
+ 0, 0, image_width, image_height,
+ texture_width, texture_height,
+ use_rectangle == 1, is_yuv,
+ mpi_flipped ^ vo_flipped);
}
if (is_yuv || custom_prog)
glDisableYUVConversion(gl_target, yuvconvtype);