hopefully sdl target should work a little better on mac.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4303 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
cc0e24142a
commit
5b2bd7fe87
1 changed files with 23 additions and 1 deletions
|
@ -211,7 +211,7 @@ int Sys_EnumerateFiles (const char *gpath, const char *match, int (*func)(const
|
||||||
|
|
||||||
return go;
|
return go;
|
||||||
}
|
}
|
||||||
#elif defined(linux) || defined(__unix__)
|
#elif defined(linux) || defined(__unix__) || defined(__MACH__)
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
int Sys_EnumerateFiles (const char *gpath, const char *match, int (*func)(const char *, int, void *, void *), void *parm, void *spath)
|
int Sys_EnumerateFiles (const char *gpath, const char *match, int (*func)(const char *, int, void *, void *), void *parm, void *spath)
|
||||||
{
|
{
|
||||||
|
@ -597,6 +597,28 @@ int QDECL main(int argc, char **argv)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
//our version of sdl_main.lib, which doesn't fight c runtimes.
|
||||||
|
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
||||||
|
{
|
||||||
|
int argc;
|
||||||
|
int i, l, c;
|
||||||
|
LPWSTR *argvw;
|
||||||
|
char **argv;
|
||||||
|
char utf8arg[1024];
|
||||||
|
argvw = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||||
|
argv = malloc(argc * sizeof(char*));
|
||||||
|
for (i = 0; i < argc; i++)
|
||||||
|
{
|
||||||
|
for(l = 0, c = 0; argvw[l]; l++)
|
||||||
|
c += utf8_encode(utf8arg+c, argvw[i][l], sizeof(utf8arg) - c-1);
|
||||||
|
utf8arg[c] = 0;
|
||||||
|
argv[i] = strdup(utf8arg);
|
||||||
|
}
|
||||||
|
return main(argc, argv);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
qboolean Sys_GetDesktopParameters(int *width, int *height, int *bpp, int *refreshrate)
|
qboolean Sys_GetDesktopParameters(int *width, int *height, int *bpp, int *refreshrate)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue