mirror of
https://github.com/blendogames/quadrilateralcowboy.git
synced 2024-11-25 05:21:07 +00:00
22 lines
422 B
C
22 lines
422 B
C
|
#include <stdlib.h>
|
||
|
#include <stdint.h>
|
||
|
#include <mach-o/dyld.h>
|
||
|
|
||
|
int main(int argn, const char** argv)
|
||
|
{
|
||
|
char full[16384];
|
||
|
char path[16384];
|
||
|
uint32_t size = sizeof(path);
|
||
|
int i;
|
||
|
_NSGetExecutablePath(path, &size);
|
||
|
for (i=strlen(path)-1; i>=0; i--)
|
||
|
if (path[i] == '/') {
|
||
|
path[i] = 0;
|
||
|
break;
|
||
|
}
|
||
|
if (!i) strcpy(path, ".");
|
||
|
sprintf(full, "\"%s/doom3\" +set r_fullscreen 0", path);
|
||
|
system(full);
|
||
|
return 0;
|
||
|
}
|