mirror of https://github.com/mpv-player/mpv
Make it compile on mingw again. Now it is finally possible to include windows.h in mplayer.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12359 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
bd4e50d10b
commit
0af4151b05
|
@ -27,7 +27,7 @@
|
||||||
#define CODECS_STATUS__MAX 2
|
#define CODECS_STATUS__MAX 2
|
||||||
|
|
||||||
|
|
||||||
#ifndef GUID_TYPE
|
#if !defined(GUID_TYPE) && !defined(GUID_DEFINED)
|
||||||
#define GUID_TYPE
|
#define GUID_TYPE
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned long f1;
|
unsigned long f1;
|
||||||
|
|
|
@ -12,7 +12,6 @@ char *get_path(char *filename){
|
||||||
if ((homedir = getenv("HOME")) == NULL)
|
if ((homedir = getenv("HOME")) == NULL)
|
||||||
#if defined(__MINGW32__)||defined(__CYGWIN__) /*hack to get fonts etc. loaded outside of cygwin environment*/
|
#if defined(__MINGW32__)||defined(__CYGWIN__) /*hack to get fonts etc. loaded outside of cygwin environment*/
|
||||||
{
|
{
|
||||||
int __stdcall GetModuleFileNameA(void* hModule,char* lpFilename,int nSize);
|
|
||||||
int i,imax=0;
|
int i,imax=0;
|
||||||
char exedir[260];
|
char exedir[260];
|
||||||
GetModuleFileNameA(NULL, exedir, 260);
|
GetModuleFileNameA(NULL, exedir, 260);
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
#define SIGQUIT 3
|
#define SIGQUIT 3
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#ifdef WIN32
|
||||||
|
#define _UWIN 1 /*disable Non-underscored versions of non-ANSI functions as otherwise int eof would conflict with eof()*/
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
@ -792,8 +796,6 @@ int gui_no_filename=0;
|
||||||
char tmppath[MAX_PATH*2 + 1];
|
char tmppath[MAX_PATH*2 + 1];
|
||||||
char win32path[MAX_PATH];
|
char win32path[MAX_PATH];
|
||||||
char realpath[MAX_PATH];
|
char realpath[MAX_PATH];
|
||||||
int WINAPI SetEnvironmentVariableA(char*,char*);
|
|
||||||
int WINAPI GetModuleFileNameA(void*,char*,int);
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
cygwin_conv_to_full_win32_path(WIN32_PATH,win32path);
|
cygwin_conv_to_full_win32_path(WIN32_PATH,win32path);
|
||||||
strcpy(tmppath,win32path);
|
strcpy(tmppath,win32path);
|
||||||
|
|
Loading…
Reference in New Issue