Linux Beta 2.3 Fix

This commit is contained in:
StFi 2013-03-04 19:52:26 +01:00
parent e16722e2d2
commit 9736433110
11 changed files with 278 additions and 262 deletions

6
.gitignore vendored
View file

@ -1,3 +1,9 @@
#################
## Kdevelop 4.X
#################
.kdev4/
rpgxEF.kdev4
################# #################
## Eclipse ## Eclipse
################# #################

View file

@ -392,7 +392,6 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu"))
THREAD_LIBS=-lpthread THREAD_LIBS=-lpthread
LIBS=-ldl -lm LIBS=-ldl -lm
LIBS += -L/emul/linux/x86/usr/lib
CLIENT_LIBS=$(SDL_LIBS) CLIENT_LIBS=$(SDL_LIBS)
RENDERER_LIBS = $(SDL_LIBS) -lGL RENDERER_LIBS = $(SDL_LIBS) -lGL

View file

@ -36,7 +36,7 @@ This is the only way control passes into the module.
This must be the very first function compiled into the .q3vm file This must be the very first function compiled into the .q3vm file
================ ================
*/ */
int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 ) { Q_EXPORT intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 ) {
switch ( command ) { switch ( command ) {
case CG_INIT: case CG_INIT:
CG_Init( arg0, arg1 ); CG_Init( arg0, arg1 );

View file

@ -10,7 +10,7 @@
static intptr_t (QDECL *syscall)( intptr_t arg, ... ) = (intptr_t (QDECL *)( intptr_t, ...))-1; static intptr_t (QDECL *syscall)( intptr_t arg, ... ) = (intptr_t (QDECL *)( intptr_t, ...))-1;
void dllEntry( intptr_t (QDECL *syscallptr)( intptr_t arg,... ) ) { Q_EXPORT void dllEntry( intptr_t (QDECL *syscallptr)( intptr_t arg,... ) ) {
syscall = syscallptr; syscall = syscallptr;
} }

View file

@ -499,7 +499,7 @@ This is the only way control passes into the module.
This MUST be the very first function compiled into the .q3vm file This MUST be the very first function compiled into the .q3vm file
================ ================
*/ */
intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 ) { Q_EXPORT intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 ) {
switch ( command ) { switch ( command ) {
case GAME_INIT: case GAME_INIT:
G_InitGame( arg0, arg1, arg2 ); G_InitGame( arg0, arg1, arg2 );

View file

@ -7,7 +7,7 @@
static intptr_t (QDECL *syscall)( intptr_t arg, ... ) = (intptr_t (QDECL *)( intptr_t, ...))-1; static intptr_t (QDECL *syscall)( intptr_t arg, ... ) = (intptr_t (QDECL *)( intptr_t, ...))-1;
void dllEntry( intptr_t (QDECL *syscallptr)( intptr_t arg,... ) ) { Q_EXPORT void dllEntry( intptr_t (QDECL *syscallptr)( intptr_t arg,... ) ) {
syscall = syscallptr; syscall = syscallptr;
} }

View file

@ -44,6 +44,16 @@
#endif #endif
#endif #endif
#if (defined _MSC_VER)
#define Q_EXPORT __declspec(dllexport)
#elif (defined __SUNPRO_C)
#define Q_EXPORT __global
#elif ((__GNUC__ >= 3) && (!__EMX__) && (!sun))
#define Q_EXPORT __attribute__((visibility("default")))
#else
#define Q_EXPORT
#endif
/********************************************************************** /**********************************************************************
VM Considerations VM Considerations

View file

@ -60,14 +60,13 @@ char *Sys_DefaultHomePath(void)
Com_sprintf(homePath, sizeof(homePath), "%s%c", p, PATH_SEP); Com_sprintf(homePath, sizeof(homePath), "%s%c", p, PATH_SEP);
#ifdef ELITEFORCE #ifdef ELITEFORCE
#ifdef MACOS_X #ifdef MACOS_X
Q_strcat(homePath, sizeof(homePath), "/Library/Application Support/STVEF"); Q_strcat(homePath, sizeof(homePath), "Library/Application Support/STVEF");
#else #else
Q_strcat(homePath, sizeof(homePath), "/.stvef"); Q_strcat(homePath, sizeof(homePath), ".stvef");
#endif #endif
#else #else
#ifdef MACOS_X #ifdef MACOS_X
Q_strcat(homePath, sizeof(homePath), Q_strcat(homePath, sizeof(homePath), "Library/Application Support/");
"Library/Application Support/");
if(com_homepath->string[0]) if(com_homepath->string[0])
Q_strcat(homePath, sizeof(homePath), com_homepath->string); Q_strcat(homePath, sizeof(homePath), com_homepath->string);

View file

@ -20,7 +20,7 @@ This is the only way control passes into the module.
This must be the very first function compiled into the .qvm file This must be the very first function compiled into the .qvm file
================ ================
*/ */
int vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 ) { Q_EXPORT intptr_t vmMain( int command, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6 ) {
switch ( command ) { switch ( command ) {
case UI_GETAPIVERSION: case UI_GETAPIVERSION:
return UI_API_VERSION; return UI_API_VERSION;

View file

@ -10,7 +10,7 @@
static intptr_t (QDECL *syscall)( intptr_t arg, ... ) = (intptr_t (QDECL *)( intptr_t, ...))-1; static intptr_t (QDECL *syscall)( intptr_t arg, ... ) = (intptr_t (QDECL *)( intptr_t, ...))-1;
void dllEntry( intptr_t (QDECL *syscallptr)( intptr_t arg,... ) ) { Q_EXPORT void dllEntry( intptr_t (QDECL *syscallptr)( intptr_t arg,... ) ) {
syscall = syscallptr; syscall = syscallptr;
} }

View file

@ -109,6 +109,7 @@ static char *s_wideResolutions16x9[] =
{ {
"854x480", "854x480",
"1280x720", "1280x720",
"1366x768",
"1920x1080", "1920x1080",
0 0
}; };
@ -117,6 +118,7 @@ static videoResolutions_t videoResolutions16x9[] =
{ {
{ 854, 480 }, { 854, 480 },
{ 1280, 720 }, { 1280, 720 },
{ 1366, 768 },
{ 1920, 1080 } { 1920, 1080 }
}; };
@ -158,7 +160,7 @@ static int s_wideScreenSets = 2;
//store the number of resolutions in each array. //store the number of resolutions in each array.
//This will be necessary when we change the lists over //This will be necessary when we change the lists over
static int s_resolutionNums[] = {9,3,5}; static int s_resolutionNums[] = {9,4,5};
//finally for reference sake, use an enum //finally for reference sake, use an enum
typedef enum typedef enum