# HG changeset patch # User diego # Date 1180787075 0 # Node ID c45f009ce3a7246b77f72df42a3105c17f4e823e # Parent 2e79a9d381dcb09af088df52d0d28770388973d7 Get rid of superfluous MPLAYER #define, it was always enabled and cluttered the code. Blessed by Reimar. diff -r 2e79a9d381dc -r c45f009ce3a7 loader/Makefile --- a/loader/Makefile Sat Jun 02 10:26:37 2007 +0000 +++ b/loader/Makefile Sat Jun 02 12:24:35 2007 +0000 @@ -2,7 +2,7 @@ LIBNAME_COMMON = libloader.a -CFLAGS= -DMPLAYER -D__WINE__ -DNOAVIFILE_HEADERS +CFLAGS= -D__WINE__ -DNOAVIFILE_HEADERS #CFLAGS+=-Ddbg_printf=__vprintf -DTRACE=__vprintf -DDETAILED_OUT SRCS_COMMON = driver.c afl.c vfl.c diff -r 2e79a9d381dc -r c45f009ce3a7 loader/driver.c --- a/loader/driver.c Sat Jun 02 10:26:37 2007 +0000 +++ b/loader/driver.c Sat Jun 02 12:24:35 2007 +0000 @@ -153,12 +153,10 @@ char unknown[0x124]; const char* filename = (const char*) ((ICOPEN*) lParam2)->pV1Reserved; -#ifdef MPLAYER #ifdef WIN32_LOADER Setup_LDT_Keeper(); #endif printf("Loading codec DLL: '%s'\n",filename); -#endif hDriver = (NPDRVR) malloc(sizeof(DRVR)); if (!hDriver) diff -r 2e79a9d381dc -r c45f009ce3a7 loader/registry.c --- a/loader/registry.c Sat Jun 02 10:26:37 2007 +0000 +++ b/loader/registry.c Sat Jun 02 12:24:35 2007 +0000 @@ -306,31 +306,8 @@ // can't be free-ed - it's static and probably thread // unsafe structure which is stored in glibc -#ifdef MPLAYER regpathname = get_path("registry"); localregpathname = regpathname; -#else - // regpathname is an external pointer - // - // registry.c is holding its own internal pointer - // localregpathname - which is being allocate/deallocated - - if (localregpathname == 0) - { - const char* pthn = regpathname; - if (!regpathname) - { - // avifile - for now reading data from user's home - struct passwd* pwent; - pwent = getpwuid(geteuid()); - pthn = pwent->pw_dir; - } - - localregpathname = malloc(strlen(pthn)+20); - strcpy(localregpathname, pthn); - strcat(localregpathname, "/.registry"); - } -#endif open_registry(); insert_handle(HKEY_LOCAL_MACHINE, "HKLM"); diff -r 2e79a9d381dc -r c45f009ce3a7 loader/win32.c --- a/loader/win32.c Sat Jun 02 10:26:37 2007 +0000 +++ b/loader/win32.c Sat Jun 02 12:24:35 2007 +0000 @@ -20,13 +20,11 @@ #include "config.h" #include "mangle.h" -#ifdef MPLAYER #ifdef USE_QTX_CODECS #define QTX #endif #define REALPLAYER //#define LOADLIB_TRY_NATIVE -#endif #ifdef QTX #define PSEUDO_SCREEN_WIDTH /*640*/800 @@ -192,9 +190,7 @@ longcount(z); } -#ifdef MPLAYER #include "mp_msg.h" -#endif int LOADER_DEBUG=1; // active only if compiled with -DDETAILED_OUT //#define DETAILED_OUT static inline void dbgprintf(char* fmt, ...) @@ -217,7 +213,6 @@ va_end(va); } #endif -#ifdef MPLAYER if ( mp_msg_test(MSGT_WIN32,MSGL_DBG3) ) { va_list va; @@ -228,7 +223,6 @@ va_end(va); } fflush(stdout); -#endif } @@ -960,7 +954,6 @@ cachedsi.wProcessorLevel = 5; /* pentium */ cachedsi.wProcessorRevision = 0x0101; -#ifdef MPLAYER /* mplayer's way to detect PF's */ { #include "cpudetect.h" @@ -993,41 +986,6 @@ cachedsi.wProcessorRevision = gCpuCaps.cpuStepping; cachedsi.dwNumberOfProcessors = 1; /* hardcoded */ } -#endif - -/* disable cpuid based detection (mplayer's cpudetect.c does this - see above) */ -#ifndef MPLAYER -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__svr4__) || defined(__DragonFly__) - do_cpuid(1, regs); - switch ((regs[0] >> 8) & 0xf) { // cpu family - case 3: cachedsi.dwProcessorType = PROCESSOR_INTEL_386; - cachedsi.wProcessorLevel= 3; - break; - case 4: cachedsi.dwProcessorType = PROCESSOR_INTEL_486; - cachedsi.wProcessorLevel= 4; - break; - case 5: cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM; - cachedsi.wProcessorLevel= 5; - break; - case 6: cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM; - cachedsi.wProcessorLevel= 5; - break; - default:cachedsi.dwProcessorType = PROCESSOR_INTEL_PENTIUM; - cachedsi.wProcessorLevel= 5; - break; - } - cachedsi.wProcessorRevision = regs[0] & 0xf; // stepping - if (regs[3] & (1 << 8)) - PF[PF_COMPARE_EXCHANGE_DOUBLE] = TRUE; - if (regs[3] & (1 << 23)) - PF[PF_MMX_INSTRUCTIONS_AVAILABLE] = TRUE; - if (regs[3] & (1 << 25)) - PF[PF_XMMI_INSTRUCTIONS_AVAILABLE] = TRUE; - if (regs[3] & (1 << 31)) - PF[PF_AMD3D_INSTRUCTIONS_AVAILABLE] = TRUE; - cachedsi.dwNumberOfProcessors=1; -#endif -#endif /* MPLAYER */ /* MPlayer: linux detection enabled (based on proc/cpuinfo) for checking fdiv_bug and fpu emulation flags -- alex/MPlayer */ @@ -1039,11 +997,9 @@ if (!f) { -#ifdef MPLAYER mp_msg(MSGT_WIN32, MSGL_WARN, "expGetSystemInfo: " "/proc/cpuinfo not readable! " "Expect bad performance and/or weird behaviour\n"); -#endif goto exit; } while (fgets(line,200,f)!=NULL) { @@ -5080,9 +5036,7 @@ /* needed by frapsvid.dll */ {"strstr",-1,(char *)&strstr}, {"qsort",-1,(void *)&qsort}, -#ifdef MPLAYER FF(_EH_prolog,-1) -#endif FF(calloc,-1) {"ceil",-1,(void*)&ceil}, /* needed by imagepower mjpeg2k */