diff --git a/libvisual/examples/simple/simple_example.cpp b/libvisual/examples/simple/simple_example.cpp index 9a19a1ee5..45e0e23b5 100644 --- a/libvisual/examples/simple/simple_example.cpp +++ b/libvisual/examples/simple/simple_example.cpp @@ -97,7 +97,7 @@ LV::VideoPtr SimpleExample::create_display (int width, int height, VisVideoDepth m_sdl_screen = nullptr; if (depth == VISUAL_VIDEO_DEPTH_GL) { - int flags = SDL_OPENGL | SDL_GL_DOUBLEBUFFER | SDL_RESIZABLE; + int flags = SDL_OPENGL | SDL_RESIZABLE; SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 8); SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 8); diff --git a/libvisual/libvisual/lv_cpu.c b/libvisual/libvisual/lv_cpu.c index 1876a838e..d5c670e8d 100644 --- a/libvisual/libvisual/lv_cpu.c +++ b/libvisual/libvisual/lv_cpu.c @@ -432,6 +432,7 @@ static void print_cpu_info (void) #endif /* VISUAL_ARCH_X86 || VISUAL_ARCH_X86_64 */ } +__attribute__((no_sanitize("address"))) void visual_cpu_initialize () { visual_mem_set (&cpu_caps, 0, sizeof (VisCPU)); diff --git a/libvisual/tools/lv-tool/display/sdl_driver.cpp b/libvisual/tools/lv-tool/display/sdl_driver.cpp index 73e193412..8dbb12401 100644 --- a/libvisual/tools/lv-tool/display/sdl_driver.cpp +++ b/libvisual/tools/lv-tool/display/sdl_driver.cpp @@ -108,15 +108,10 @@ namespace { return nullptr; } - videoflags |= SDL_OPENGL | SDL_GL_DOUBLEBUFFER; + videoflags |= SDL_OPENGL; if (videoinfo->hw_available) videoflags |= SDL_HWSURFACE; - else - videoflags |= SDL_SWSURFACE; - - if (videoinfo->blit_hw) - videoflags |= SDL_HWACCEL; if (vidoptions) { for (unsigned int i = VISUAL_GL_ATTRIBUTE_NONE; i < VISUAL_GL_ATTRIBUTE_LAST; i++) { @@ -130,6 +125,8 @@ namespace { } } + SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); + int bpp = videoinfo->vfmt->BitsPerPixel; m_screen = SDL_SetVideoMode (width, height, bpp, videoflags); diff --git a/libvisual/tools/lv-tool/display/stdout_sdl_driver.cpp b/libvisual/tools/lv-tool/display/stdout_sdl_driver.cpp index e4872a491..19a723ace 100644 --- a/libvisual/tools/lv-tool/display/stdout_sdl_driver.cpp +++ b/libvisual/tools/lv-tool/display/stdout_sdl_driver.cpp @@ -121,15 +121,10 @@ namespace { return nullptr; } - videoflags |= SDL_OPENGL | SDL_GL_DOUBLEBUFFER; + videoflags |= SDL_OPENGL; if (videoinfo->hw_available) videoflags |= SDL_HWSURFACE; - else - videoflags |= SDL_SWSURFACE; - - if (videoinfo->blit_hw) - videoflags |= SDL_HWACCEL; if (vidoptions) { for (unsigned int i = VISUAL_GL_ATTRIBUTE_NONE; i < VISUAL_GL_ATTRIBUTE_LAST; i++) { @@ -144,6 +139,8 @@ namespace { } } + SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); + bpp = videoinfo->vfmt->BitsPerPixel; unsigned int buffer_size = width * height * 3; diff --git a/libvisual/tools/lv-tool/lv-tool.cpp b/libvisual/tools/lv-tool/lv-tool.cpp index 39aaae4aa..41f6897ce 100644 --- a/libvisual/tools/lv-tool/lv-tool.cpp +++ b/libvisual/tools/lv-tool/lv-tool.cpp @@ -6,6 +6,7 @@ // Authors: Daniel Hiepler // Chong Kai Xiong // Dennis Smit +// Scott Sibley // // This file is part of lv-tool. // @@ -38,12 +39,16 @@ #include // Defaults -#define DEFAULT_ACTOR "lv_analyzer" +#ifdef HAVE_GL +# define DEFAULT_ACTOR "lv_gltest" +#else +# define DEFAULT_ACTOR "lv_analyzer" +#endif #define DEFAULT_INPUT "debug" #define DEFAULT_MORPH "slide_left" #define DEFAULT_WIDTH 320 #define DEFAULT_HEIGHT 200 -#define DEFAULT_FPS 30 +#define DEFAULT_FPS 60 #define DEFAULT_COLOR_DEPTH 0 #if HAVE_SDL