From 10f599fd5b8f6430b87ab9e57e0df22772d75a7e Mon Sep 17 00:00:00 2001 From: mjbudd77 Date: Fri, 28 May 2021 20:31:58 -0400 Subject: [PATCH] Removed old unused blocks of code from SDL video for Qt GUI. --- src/CMakeLists.txt | 1 - src/drivers/Qt/sdl-video.cpp | 62 ------------------------------------ 2 files changed, 63 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a9f5d72..3add2776 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -100,7 +100,6 @@ else(WIN32) pkg_search_module( LUA lua5.1 lua-5.1 ) add_definitions( -DHAVE_ASPRINTF ) # What system wouldn't have this? - #add_definitions( -DCREATE_AVI ) if(APPLE) set( OPENGL_LDFLAGS "-framework OpenGL" ) diff --git a/src/drivers/Qt/sdl-video.cpp b/src/drivers/Qt/sdl-video.cpp index 464864fa..44026e57 100644 --- a/src/drivers/Qt/sdl-video.cpp +++ b/src/drivers/Qt/sdl-video.cpp @@ -479,68 +479,6 @@ BlitScreen(uint8 *XBuf) aviRecordAddFrame(); -#ifdef CREATE_AVI - { int fps = FCEUI_GetDesiredFPS(); - static unsigned char* result = NULL; - static unsigned resultsize = 0; - int width = NWIDTH, height = s_tlines; - if(!result || resultsize != width*height*3*2) - { - if(result) free(result); - result = (unsigned char*) FCEU_dmalloc(resultsize = width*height*3*2); - } - switch(s_curbpp) - { - #if 0 - case 24: case 32: case 15: case 16: - /* Convert to I420 if possible, because our I420 conversion is optimized - * and it'll produce less network traffic, hence faster throughput than - * anything else. And H.264 eats only I420, so it'd be converted sooner - * or later anyway if we didn't do it. Win-win situation. - */ - switch(s_curbpp) - { - case 32: Convert32To_I420Frame(s_screen->pixels, &result[0], width*height, width); break; - case 24: Convert24To_I420Frame(s_screen->pixels, &result[0], width*height, width); break; - case 15: Convert15To_I420Frame(s_screen->pixels, &result[0], width*height, width); break; - case 16: Convert16To_I420Frame(s_screen->pixels, &result[0], width*height, width); break; - } - NESVideoLoggingVideo(&result[0], width,height, fps, 12); - break; - #endif - default: - NESVideoLoggingVideo( dest, width,height, fps, s_curbpp); - } - } -#endif // CREATE_AVI - -#if REALTIME_LOGGING - { - static struct timeval last_time; - static int first_time=1; - extern long soundrate; - - struct timeval cur_time; - gettimeofday(&cur_time, NULL); - - double timediff = - (cur_time.tv_sec *1e6 + cur_time.tv_usec - - (last_time.tv_sec *1e6 + last_time.tv_usec)) / 1e6; - - int nframes = timediff * 60 - 1; - if(first_time) - first_time = 0; - else while(nframes > 0) - { - static const unsigned char Buf[800*4] = {0}; - NESVideoLoggingVideo(screen->pixels, 256,tlines, FCEUI_GetDesiredFPS(), s_curbpp); - NESVideoLoggingAudio(Buf, soundrate,16,1, soundrate/60.0); - --nframes; - } - memcpy(&last_time, &cur_time, sizeof(last_time)); - } -#endif // REALTIME_LOGGING - } /**