sdlquake:

- Better fix for finding resource folders.

git-svn-id: svn://kolibrios.org@8663 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
turbocat 2021-04-02 21:11:15 +00:00
parent e54c8af781
commit 9aefaa6765
3 changed files with 17 additions and 6 deletions

View File

@ -834,11 +834,6 @@ Host_Init
*/
void Host_Init (quakeparms_t *parms)
{
#ifdef _KOLIBRI
#include "dirname.c"
parms->basedir=dirname(parms->argv[0]);
#endif
if (standard_quake)
minimum_memory = MINIMUM_MEMORY;
else

View File

@ -1,3 +1,6 @@
#ifndef _KOLIBRI_H_
#define _KOLIBRI_H_
#include <string.h>
#include <stdlib.h>
@ -47,4 +50,13 @@ char *dirname (char *path)
found and so a static and constant string is required. */
path = (char *) dot;
return path;
}
}
void _ksys_setcwd(char* dir){
__asm__ __volatile__ (
"int $0x40"
::"a"(30), "b"(1), "c"(dir)
);
};
#endif

View File

@ -384,6 +384,10 @@ void moncontrol(int x)
int main (int c, char **v)
{
#ifdef _KOLIBRI
#include "kolibri.h"
_ksys_setcwd(dirname(v[0]));
#endif
double time, oldtime, newtime;
quakeparms_t parms;