Mercurial > audlegacy
changeset 42:5a432360e41e trunk
[svn] libvisual-proxy fixes.
author | nenolod |
---|---|
date | Wed, 26 Oct 2005 15:08:53 -0700 |
parents | d26bb1168d00 |
children | 23c9ae8118c9 |
files | Visualization/libvisual-proxy/lv_bmp_config.c Visualization/libvisual-proxy/main.c |
diffstat | 2 files changed, 33 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/Visualization/libvisual-proxy/lv_bmp_config.c Wed Oct 26 11:32:09 2005 -0700 +++ b/Visualization/libvisual-proxy/lv_bmp_config.c Wed Oct 26 15:08:53 2005 -0700 @@ -365,6 +365,7 @@ void lv_bmp_config_window () { +#if 0 if (config_win != NULL) { gtk_widget_grab_default (config_win->button_cancel); gtk_widget_show (config_win->window_main); @@ -409,6 +410,7 @@ config_win_load_morph_plugin_list (); gtk_widget_show (config_win->window_main); +#endif } static void on_checkbutton_fullscreen_toggled (GtkToggleButton *togglebutton, gpointer user_data)
--- a/Visualization/libvisual-proxy/main.c Wed Oct 26 11:32:09 2005 -0700 +++ b/Visualization/libvisual-proxy/main.c Wed Oct 26 15:08:53 2005 -0700 @@ -78,7 +78,7 @@ NULL, /* (void*) handle, filled in by xmms */ NULL, /* (char*) Filename, filled in by xmms */ 0, /* The session ID for attaching to the control socket */ - PACKAGE_STRING, /* description */ + "libvisual proxy plugin", /* description */ 2, /* Numbers of PCM channels wanted in the call to render_pcm */ 0, /* Numbers of freq channels wanted in the call to render_freq */ lv_bmp_init, /* init */ @@ -455,52 +455,45 @@ visual_songinfo_set_simple_name (songinfo, song_name); - if ((SDL_GetAppState () & SDL_APPACTIVE) == FALSE) { - usleep (100000); - } else { - /* On depth change */ - if (visual_bin_depth_changed (bin) == TRUE) { - if (SDL_MUSTLOCK (screen) == SDL_TRUE) - SDL_LockSurface (screen); + /* On depth change */ + if (visual_bin_depth_changed (bin) == TRUE) { + if (SDL_MUSTLOCK (screen) == SDL_TRUE) + SDL_LockSurface (screen); - visual_video_set_buffer (video, screen->pixels); - if (visual_bin_get_depth (bin) == VISUAL_VIDEO_DEPTH_GL) - gl_plug = 1; - else - gl_plug = 0; + visual_video_set_buffer (video, screen->pixels); + if (visual_bin_get_depth (bin) == VISUAL_VIDEO_DEPTH_GL) + gl_plug = 1; + else + gl_plug = 0; - sdl_create (options->width, options->height); - visual_bin_sync (bin, TRUE); + sdl_create (options->width, options->height); + visual_bin_sync (bin, TRUE); - if (SDL_MUSTLOCK (screen) == SDL_TRUE) - SDL_UnlockSurface (screen); - } - - render_time = SDL_GetTicks (); - if (gl_plug == 1) { - visual_bin_run (bin); + if (SDL_MUSTLOCK (screen) == SDL_TRUE) + SDL_UnlockSurface (screen); + } + + if (gl_plug == 1) { + visual_bin_run (bin); - SDL_GL_SwapBuffers (); - } else { - if (SDL_MUSTLOCK (screen) == SDL_TRUE) - SDL_LockSurface (screen); + SDL_GL_SwapBuffers (); + } else { + if (SDL_MUSTLOCK (screen) == SDL_TRUE) + SDL_LockSurface (screen); - visual_video_set_buffer (video, screen->pixels); - visual_bin_run (bin); + printf("About to run visual plugin\n"); + visual_bin_run (bin); - if (SDL_MUSTLOCK (screen) == SDL_TRUE) - SDL_UnlockSurface (screen); + if (SDL_MUSTLOCK (screen) == SDL_TRUE) + SDL_UnlockSurface (screen); - pal = visual_bin_get_palette (bin); - sdl_set_pal (); + pal = visual_bin_get_palette (bin); + sdl_set_pal (); - sdl_draw (screen); - } + sdl_draw (screen); + } - now = SDL_GetTicks (); -// if ((idle_time = (now - render_time)) < frame_length) - // usleep (idle_time*900); - } + usleep(500); sdl_event_handle ();