Half of day 38 complete.

This commit is contained in:
igor
2026-04-21 23:12:00 -07:00
parent 40c34f2b9d
commit 61ace3a058
4 changed files with 169 additions and 18 deletions
+7 -5
View File
@@ -16,12 +16,12 @@
#include <unistd.h> /* close, write, read, readlink, unlink */
#include <dlfcn.h> /* dlopen */
#include <sys/stat.h> /* stat */
#if __APPLE__ && __MACH__
#if OS_MACOS
#include <mach-o/dyld.h> /* _NSGetExecutablePath */
#endif
/* NOTE: This is so it compiles on ARM. */
#if __x86_64__ || __i386__
#if ARCHITECTURE_X64 || ARCHITECTURE_X86
#include <x86intrin.h>
#endif
@@ -447,7 +447,7 @@ static void SDLUnloadGameCode(sdl_game_code *GameCode)
void GetExecutablePath(char *path, size_t path_size)
{
#if __APPLE__ && __MACH__
#if OS_MACOS
U32 size;
#else
ssize_t size;
@@ -456,7 +456,7 @@ void GetExecutablePath(char *path, size_t path_size)
if(path_size > 0) {
path[0] = '\0';
#if __APPLE__ && __MACH__
#if OS_MACOS
size = path_size;
if(_NSGetExecutablePath(path, &size) != 0) { /* NOTE: Not an
absolute
@@ -490,7 +490,7 @@ static void SDLGetDLLPath(char *path, size_t path_size, char *exe_path)
snprintf(path, path_size, "%s%s", exe_path, GAME_DLL_NAME);
}
#if !(__x86_64__ || __i386__)
#if !(ARCHITECTURE_X64 || ARCHITECTURE_X86)
U64 __rdtsc()
{
return 0;
@@ -529,8 +529,10 @@ void SDLSetProgramIcon(SDL_Window *Window)
} else {
/* TODO: This didn't work . . . SDL_GetError() */
}
}
#include "handmade_intrinsics.h"
S32 main(S32 argc, char *argv[])
{
sdl_state SDLState;