1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-18 05:37:04 +00:00

Get rid of superfluous MPLAYER #define, it was always enabled and

cluttered the code. Blessed by Reimar.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23446 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2007-06-02 12:24:35 +00:00
parent 5fe0ff0e1b
commit 09ea65448e
4 changed files with 1 additions and 72 deletions

View File

@ -2,7 +2,7 @@ include ../config.mak
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

View File

@ -153,12 +153,10 @@ HDRVR DrvOpen(LPARAM lParam2)
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)

View File

@ -306,31 +306,8 @@ static void init_registry(void)
// 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");

View File

@ -20,13 +20,11 @@ for DLL to know too much about its environment.
#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 @@ static void longcount_stub(long long* z)
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 @@ static inline void dbgprintf(char* fmt, ...)
va_end(va);
}
#endif
#ifdef MPLAYER
if ( mp_msg_test(MSGT_WIN32,MSGL_DBG3) )
{
va_list va;
@ -228,7 +223,6 @@ static inline void dbgprintf(char* fmt, ...)
va_end(va);
}
fflush(stdout);
#endif
}
@ -960,7 +954,6 @@ static void WINAPI expGetSystemInfo(SYSTEM_INFO* si)
cachedsi.wProcessorLevel = 5; /* pentium */
cachedsi.wProcessorRevision = 0x0101;
#ifdef MPLAYER
/* mplayer's way to detect PF's */
{
#include "cpudetect.h"
@ -993,41 +986,6 @@ static void WINAPI expGetSystemInfo(SYSTEM_INFO* si)
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 @@ static void WINAPI expGetSystemInfo(SYSTEM_INFO* si)
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 @@ struct exports exp_msvcrt[]={
/* 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 */