disabled some more assembly.
trying out passing NULL to SDL_GL_LoadLibrary by default.
This commit is contained in:
parent
785c016a28
commit
0e484b73da
3 changed files with 18 additions and 14 deletions
13
src/main.c
13
src/main.c
|
@ -73,7 +73,7 @@ static int WantCDRom = 1;
|
||||||
static int WantJoystick = 1;
|
static int WantJoystick = 1;
|
||||||
|
|
||||||
/* originally was "/usr/lib/libGL.so.1:/usr/lib/tls/libGL.so.1:/usr/X11R6/lib/libGL.so" */
|
/* originally was "/usr/lib/libGL.so.1:/usr/lib/tls/libGL.so.1:/usr/X11R6/lib/libGL.so" */
|
||||||
static const char * opengl_library = "libGL.so.1";
|
static const char * opengl_library = NULL;
|
||||||
|
|
||||||
/* ** */
|
/* ** */
|
||||||
|
|
||||||
|
@ -432,11 +432,16 @@ static void load_opengl_library(const char *lib)
|
||||||
size_t len, copylen;
|
size_t len, copylen;
|
||||||
|
|
||||||
if (lib == NULL) {
|
if (lib == NULL) {
|
||||||
fprintf(stderr, "ERROR: no opengl libraries given\n");
|
if (SDL_GL_LoadLibrary(NULL) == 0) {
|
||||||
exit(EXIT_FAILURE);
|
/* success */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf( stderr, "ERROR: no opengl libraries given\n" );
|
||||||
|
exit( EXIT_FAILURE );
|
||||||
}
|
}
|
||||||
|
|
||||||
while (*lib) {
|
while (lib != NULL && *lib) {
|
||||||
len = strcspn(lib, ":");
|
len = strcspn(lib, ":");
|
||||||
|
|
||||||
copylen = min(len, PATH_MAX-1);
|
copylen = min(len, PATH_MAX-1);
|
||||||
|
|
|
@ -574,7 +574,7 @@ typedef struct matrixch {
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern volatile int sqrt_temp;
|
volatile int sqrt_temp;
|
||||||
|
|
||||||
int SqRoot32(int A)
|
int SqRoot32(int A)
|
||||||
{
|
{
|
||||||
|
@ -589,6 +589,7 @@ int SqRoot32(int A)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0
|
||||||
__asm__ volatile
|
__asm__ volatile
|
||||||
("finit \n\t"
|
("finit \n\t"
|
||||||
"fildl %0 \n\t"
|
"fildl %0 \n\t"
|
||||||
|
@ -601,6 +602,9 @@ __asm__ volatile
|
||||||
);
|
);
|
||||||
|
|
||||||
return sqrt_temp;
|
return sqrt_temp;
|
||||||
|
#else
|
||||||
|
return sqrt( (float)A );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -610,12 +614,12 @@ __asm__ volatile
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern volatile float fti_fptmp;
|
volatile float fti_fptmp;
|
||||||
extern volatile int fti_itmp;
|
volatile int fti_itmp;
|
||||||
|
|
||||||
void FloatToInt()
|
void FloatToInt()
|
||||||
{
|
{
|
||||||
#if 1
|
#if 0
|
||||||
__asm__ volatile
|
__asm__ volatile
|
||||||
("flds fti_fptmp \n\t"
|
("flds fti_fptmp \n\t"
|
||||||
"fistpl fti_itmp \n\t"
|
"fistpl fti_itmp \n\t"
|
||||||
|
|
|
@ -17,11 +17,6 @@
|
||||||
#include "kshape.h"
|
#include "kshape.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* globals from inline.h */
|
|
||||||
int sqrt_temp;
|
|
||||||
float fti_fptmp;
|
|
||||||
int fti_itmp;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Platform Specific Functions
|
Platform Specific Functions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue