os_core: linux port for memory, thread info, filesystem apis

This commit is contained in:
Ryan Fleury
2024-07-16 13:24:54 -07:00
parent 1b74fb0760
commit 3cc51038df
42 changed files with 17931 additions and 17128 deletions
+790
View File
@@ -1,2 +1,792 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
////////////////////////////////
//~ rjf: Helpers
internal DateTime
os_lnx_date_time_from_tm(tm in, U32 msec)
{
DateTime dt = {0};
dt.sec = in.tm_sec;
dt.min = in.tm_min;
dt.hour = in.tm_hour;
dt.day = in.tm_mday-1;
dt.mon = in.tm_mon;
dt.year = in.tm_year+1900;
dt.msec = msec;
return dt;
}
internal tm
os_lnx_tm_from_date_time(DateTime dt)
{
tm result = {0};
result.tm_sec = dt.sec;
result.tm_min = dt.min;
result.tm_hour= dt.hour;
result.tm_mday= dt.day+1;
result.tm_mon = dt.mon;
result.tm_year= dt.year-1900;
return result;
}
internal timespec
os_lnx_timespec_from_date_time(DateTime dt)
{
tm tm_val = os_lnx_tm_from_date_time(dt);
time_t seconds = timegm(&tm_val);
timespec result = {0};
result.tv_sec = seconds;
return result;
}
internal DenseTime
os_lnx_dense_time_from_timespec(timespec in)
{
DenseTime result = 0;
{
struct tm tm_time = {0};
gmtime_r(&in.tv_sec, &tm_time);
DateTime date_time = os_lnx_date_time_from_tm(tm_time, in.tv_nsec/Million(1));
result = dense_time_from_date_time(date_time);
}
return result;
}
internal FileProperties
os_lnx_file_properties_from_stat(struct stat *s)
{
FileProperties props = {0};
props.size = s->st_size;
props.created = os_lnx_dense_time_from_timespec(s->st_ctim);
props.modified = os_lnx_dense_time_from_timespec(s->st_mtim);
if(s->st_mode & S_IFDIR)
{
props.flags |= FilePropertyFlag_IsFolder;
}
return props;
}
////////////////////////////////
//~ rjf: @os_hooks System/Process Info (Implemented Per-OS)
internal OS_SystemInfo *
os_get_system_info(void)
{
return &os_lnx_state.system_info;
}
internal OS_ProcessInfo *
os_get_process_info(void)
{
return &os_lnx_state.process_info;
}
internal String8
os_get_current_path(Arena *arena)
{
char *cwdir = getcwd(0, 0);
String8 string = push_str8_copy(arena, str8_cstring(cwdir));
return string;
}
////////////////////////////////
//~ rjf: @os_hooks Memory Allocation (Implemented Per-OS)
//- rjf: basic
internal void *
os_reserve(U64 size)
{
void *result = mmap(0, size, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
return result;
}
internal B32
os_commit(void *ptr, U64 size)
{
mprotect(ptr, size, PROT_READ|PROT_WRITE);
return 1;
}
internal void
os_decommit(void *ptr, U64 size)
{
madvise(ptr, size, MADV_DONTNEED);
mprotect(ptr, size, PROT_NONE);
}
internal void
os_release(void *ptr, U64 size)
{
munmap(ptr, size);
}
//- rjf: large pages
internal void *
os_reserve_large(U64 size)
{
void *result = mmap(0, size, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_HUGETLB, -1, 0);
return result;
}
internal B32
os_commit_large(void *ptr, U64 size)
{
mprotect(ptr, size, PROT_READ|PROT_WRITE);
return 1;
}
////////////////////////////////
//~ rjf: @os_hooks Thread Info (Implemented Per-OS)
internal U32
os_tid(void)
{
U32 result = 0;
#if defined(SYS_gettid)
result = syscall(SYS_gettid);
#else
result = gettid();
#endif
return result;
}
internal void
os_set_thread_name(String8 name)
{
Temp scratch = scratch_begin(0, 0);
String8 name_copy = push_str8_copy(scratch.arena, name);
pthread_t current_thread = pthread_self();
pthread_setname_np(current_thread, (char *)name_copy.str);
scratch_end(scratch);
}
////////////////////////////////
//~ rjf: @os_hooks Aborting (Implemented Per-OS)
internal void
os_abort(S32 exit_code)
{
exit(exit_code);
}
////////////////////////////////
//~ rjf: @os_hooks File System (Implemented Per-OS)
//- rjf: files
internal OS_Handle
os_file_open(OS_AccessFlags flags, String8 path)
{
Temp scratch = scratch_begin(0, 0);
String8 path_copy = push_str8_copy(scratch.arena, path);
int lnx_flags = 0;
if(flags & (OS_AccessFlag_Read|OS_AccessFlag_Write))
{
lnx_flags = O_RDWR;
}
else if(flags & OS_AccessFlag_Write)
{
lnx_flags = O_WRONLY;
}
else if(flags & OS_AccessFlag_Read)
{
lnx_flags = O_RDONLY;
}
if(flags & OS_AccessFlag_Append)
{
lnx_flags |= O_APPEND;
}
int fd = open((char *)path_copy.str, lnx_flags);
OS_Handle handle = {0};
if(fd != -1)
{
handle.u64[0] = fd;
}
scratch_end(scratch);
return handle;
}
internal void
os_file_close(OS_Handle file)
{
if(os_handle_match(file, os_handle_zero())) { return; }
int fd = (int)file.u64[0];
close(fd);
}
internal U64
os_file_read(OS_Handle file, Rng1U64 rng, void *out_data)
{
if(os_handle_match(file, os_handle_zero())) { return 0; }
int fd = (int)file.u64[0];
if(rng.min != 0)
{
lseek(fd, rng.min, SEEK_SET);
}
U64 total_num_bytes_to_read = dim_1u64(rng);
U64 total_num_bytes_read = 0;
U64 total_num_bytes_left_to_read = total_num_bytes_to_read;
for(;total_num_bytes_left_to_read > 0;)
{
int read_result = read(fd, (U8 *)out_data + total_num_bytes_read, total_num_bytes_left_to_read);
if(read_result >= 0)
{
total_num_bytes_read += read_result;
total_num_bytes_left_to_read -= read_result;
}
else if(errno != EINTR)
{
break;
}
}
return total_num_bytes_read;
}
internal U64
os_file_write(OS_Handle file, Rng1U64 rng, void *data)
{
if(os_handle_match(file, os_handle_zero())) { return 0; }
int fd = (int)file.u64[0];
if(rng.min != 0)
{
lseek(fd, rng.min, SEEK_SET);
}
U64 total_num_bytes_to_write = dim_1u64(rng);
U64 total_num_bytes_written = 0;
U64 total_num_bytes_left_to_write = total_num_bytes_to_write;
for(;total_num_bytes_left_to_write > 0;)
{
int write_result = write(fd, (U8 *)data + total_num_bytes_written, total_num_bytes_left_to_write);
if(write_result >= 0)
{
total_num_bytes_written += write_result;
total_num_bytes_left_to_write -= write_result;
}
else if(errno != EINTR)
{
break;
}
}
return total_num_bytes_written;
}
internal B32
os_file_set_times(OS_Handle file, DateTime date_time)
{
if(os_handle_match(file, os_handle_zero())) { return 0; }
int fd = (int)file.u64[0];
timespec time = os_lnx_timespec_from_date_time(date_time);
timespec times[2] = {time, time};
int futimens_result = futimens(fd, times);
B32 good = (futimens_result != -1);
return good;
}
internal FileProperties
os_properties_from_file(OS_Handle file)
{
if(os_handle_match(file, os_handle_zero())) { return (FileProperties){0}; }
int fd = (int)file.u64[0];
struct stat fd_stat = {0};
int fstat_result = fstat(fd, &fd_stat);
FileProperties props = {0};
if(fstat_result != -1)
{
props = os_lnx_file_properties_from_stat(&fd_stat);
}
return props;
}
internal OS_FileID
os_id_from_file(OS_Handle file)
{
if(os_handle_match(file, os_handle_zero())) { return (OS_FileID){0}; }
int fd = (int)file.u64[0];
struct stat fd_stat = {0};
int fstat_result = fstat(fd, &fd_stat);
OS_FileID id = {0};
if(fstat_result != -1)
{
id.v[0] = fd_stat.st_dev;
id.v[1] = fd_stat.st_ino;
}
return id;
}
internal B32
os_delete_file_at_path(String8 path)
{
Temp scratch = scratch_begin(0, 0);
B32 result = 0;
String8 path_copy = push_str8_copy(scratch.arena, path);
if(remove((char*)path_copy.str) != -1)
{
result = 1;
}
scratch_end(scratch);
return result;
}
internal B32
os_copy_file_path(String8 dst, String8 src)
{
B32 result = 0;
OS_Handle src_h = os_file_open(OS_AccessFlag_Read, src);
OS_Handle dst_h = os_file_open(OS_AccessFlag_Write, dst);
if(!os_handle_match(src_h, os_handle_zero()) &&
!os_handle_match(dst_h, os_handle_zero()))
{
FileProperties src_props = os_properties_from_file(src_h);
U64 size = src_props.size;
U64 total_bytes_copied = 0;
U64 bytes_left_to_copy = size;
for(;bytes_left_to_copy > 0;)
{
Temp scratch = scratch_begin(0, 0);
U64 buffer_size = Min(bytes_left_to_copy, MB(8));
U8 *buffer = push_array_no_zero(scratch.arena, U8, buffer_size);
U64 bytes_read = os_file_read(src_h, r1u64(total_bytes_copied, total_bytes_copied+buffer_size), buffer);
U64 bytes_written = os_file_write(dst_h, r1u64(total_bytes_copied, total_bytes_copied+bytes_read), buffer);
U64 bytes_copied = Min(bytes_read, bytes_written);
bytes_left_to_copy -= bytes_copied;
total_bytes_copied += bytes_copied;
scratch_end(scratch);
if(bytes_copied == 0)
{
break;
}
}
}
os_file_close(src_h);
os_file_close(dst_h);
return result;
}
internal String8
os_full_path_from_path(Arena *arena, String8 path)
{
Temp scratch = scratch_begin(&arena, 1);
String8 path_copy = push_str8_copy(scratch.arena, path);
char buffer[PATH_MAX] = {0};
realpath((char *)path_copy.str, buffer);
String8 result = push_str8_copy(arena, str8_cstring(buffer));
scratch_end(scratch);
return result;
}
internal B32
os_file_path_exists(String8 path)
{
Temp scratch = scratch_begin(0, 0);
String8 path_copy = push_str8_copy(scratch.arena, path);
int access_result = access((char *)path_copy.str, F_OK);
B32 result = 0;
if(access_result == 0)
{
result = 1;
}
scratch_end(scratch);
return result;
}
internal FileProperties
os_properties_from_file_path(String8 path)
{
Temp scratch = scratch_begin(0, 0);
String8 path_copy = push_str8_copy(scratch.arena, path);
struct stat f_stat = {0};
int stat_result = stat((char *)path_copy.str, &f_stat);
FileProperties props = {0};
if(stat_result != -1)
{
props = os_lnx_file_properties_from_stat(&f_stat);
}
scratch_end(scratch);
return props;
}
//- rjf: file maps
internal OS_Handle
os_file_map_open(OS_AccessFlags flags, OS_Handle file)
{
NotImplemented;
}
internal void
os_file_map_close(OS_Handle map)
{
NotImplemented;
}
internal void *
os_file_map_view_open(OS_Handle map, OS_AccessFlags flags, Rng1U64 range)
{
NotImplemented;
}
internal void
os_file_map_view_close(OS_Handle map, void *ptr)
{
NotImplemented;
}
//- rjf: directory iteration
internal OS_FileIter *
os_file_iter_begin(Arena *arena, String8 path, OS_FileIterFlags flags)
{
NotImplemented;
}
internal B32
os_file_iter_next(Arena *arena, OS_FileIter *iter, OS_FileInfo *info_out)
{
NotImplemented;
}
internal void
os_file_iter_end(OS_FileIter *iter)
{
NotImplemented;
}
//- rjf: directory creation
internal B32
os_make_directory(String8 path)
{
NotImplemented;
}
////////////////////////////////
//~ rjf: @os_hooks Shared Memory (Implemented Per-OS)
internal OS_Handle
os_shared_memory_alloc(U64 size, String8 name)
{
NotImplemented;
}
internal OS_Handle
os_shared_memory_open(String8 name)
{
NotImplemented;
}
internal void
os_shared_memory_close(OS_Handle handle)
{
NotImplemented;
}
internal void *
os_shared_memory_view_open(OS_Handle handle, Rng1U64 range)
{
NotImplemented;
}
internal void
os_shared_memory_view_close(OS_Handle handle, void *ptr)
{
NotImplemented;
}
////////////////////////////////
//~ rjf: @os_hooks Time (Implemented Per-OS)
internal U64
os_now_microseconds(void)
{
NotImplemented;
}
internal U32
os_now_unix(void)
{
NotImplemented;
}
internal DateTime
os_now_universal_time(void)
{
NotImplemented;
}
internal DateTime
os_universal_time_from_local(DateTime *date_time)
{
NotImplemented;
}
internal DateTime
os_local_time_from_universal(DateTime *date_time)
{
NotImplemented;
}
internal void
os_sleep_milliseconds(U32 msec)
{
NotImplemented;
}
////////////////////////////////
//~ rjf: @os_hooks Child Processes (Implemented Per-OS)
internal OS_Handle
os_process_launch(OS_ProcessLaunchParams *params)
{
NotImplemented;
}
internal B32
os_process_join(OS_Handle handle, U64 endt_us)
{
NotImplemented;
}
internal void
os_process_detach(OS_Handle handle)
{
NotImplemented;
}
////////////////////////////////
//~ rjf: @os_hooks Threads (Implemented Per-OS)
internal OS_Handle
os_thread_launch(OS_ThreadFunctionType *func, void *ptr, void *params)
{
NotImplemented;
}
internal B32
os_thread_join(OS_Handle handle, U64 endt_us)
{
NotImplemented;
}
internal void
os_thread_detach(OS_Handle thread)
{
NotImplemented;
}
////////////////////////////////
//~ rjf: @os_hooks Synchronization Primitives (Implemented Per-OS)
//- rjf: mutexes
internal OS_Handle
os_mutex_alloc(void)
{
NotImplemented;
}
internal void
os_mutex_release(OS_Handle mutex)
{
NotImplemented;
}
internal void
os_mutex_take(OS_Handle mutex)
{
NotImplemented;
}
internal void
os_mutex_drop(OS_Handle mutex)
{
NotImplemented;
}
//- rjf: reader/writer mutexes
internal OS_Handle
os_rw_mutex_alloc(void)
{
NotImplemented;
}
internal void
os_rw_mutex_release(OS_Handle rw_mutex)
{
NotImplemented;
}
internal void
os_rw_mutex_take_r(OS_Handle rw_mutex)
{
NotImplemented;
}
internal void
os_rw_mutex_drop_r(OS_Handle rw_mutex)
{
NotImplemented;
}
internal void
os_rw_mutex_take_w(OS_Handle rw_mutex)
{
NotImplemented;
}
internal void
os_rw_mutex_drop_w(OS_Handle rw_mutex)
{
NotImplemented;
}
//- rjf: condition variables
internal OS_Handle
os_condition_variable_alloc(void)
{
NotImplemented;
}
internal void
os_condition_variable_release(OS_Handle cv)
{
NotImplemented;
}
internal B32
os_condition_variable_wait(OS_Handle cv, OS_Handle mutex, U64 endt_us)
{
NotImplemented;
}
internal B32
os_condition_variable_wait_rw_r(OS_Handle cv, OS_Handle mutex_rw, U64 endt_us)
{
NotImplemented;
}
internal B32
os_condition_variable_wait_rw_w(OS_Handle cv, OS_Handle mutex_rw, U64 endt_us)
{
NotImplemented;
}
internal void
os_condition_variable_signal(OS_Handle cv)
{
NotImplemented;
}
internal void
os_condition_variable_broadcast(OS_Handle cv)
{
NotImplemented;
}
//- rjf: cross-process semaphores
internal OS_Handle
os_semaphore_alloc(U32 initial_count, U32 max_count, String8 name)
{
NotImplemented;
}
internal void
os_semaphore_release(OS_Handle semaphore)
{
NotImplemented;
}
internal OS_Handle
os_semaphore_open(String8 name)
{
NotImplemented;
}
internal void
os_semaphore_close(OS_Handle semaphore)
{
NotImplemented;
}
internal B32
os_semaphore_take(OS_Handle semaphore, U64 endt_us)
{
NotImplemented;
}
internal void
os_semaphore_drop(OS_Handle semaphore)
{
NotImplemented;
}
////////////////////////////////
//~ rjf: @os_hooks Dynamically-Loaded Libraries (Implemented Per-OS)
internal OS_Handle
os_library_open(String8 path)
{
Temp scratch = scratch_begin(0, 0);
char *path_cstr = (char *)push_str8_copy(scratch.arena, path).str;
void *so = dlopen(path_cstr, RTLD_LAZY);
OS_Handle lib = { (U64)so };
scratch_end(scratch);
return lib;
}
internal VoidProc*
os_library_load_proc(OS_Handle lib, String8 name)
{
Temp scratch = scratch_begin(0, 0);
void *so = (void *)lib.u64;
char *name_cstr = (char *)push_str8_copy(scratch.arena, name).str;
VoidProc *proc = (VoidProc *)dlsym(so, name_cstr);
scratch_end(scratch);
return proc;
}
internal void
os_library_close(OS_Handle lib)
{
void *so = (void *)lib.u64;
dlclose(so);
}
////////////////////////////////
//~ rjf: @os_hooks Safe Calls (Implemented Per-OS)
internal void
os_safe_call(OS_ThreadFunctionType *func, OS_ThreadFunctionType *fail_handler, void *ptr)
{
NotImplemented;
}
////////////////////////////////
//~ rjf: @os_hooks GUIDs (Implemented Per-OS)
internal OS_Guid
os_make_guid(void)
{
NotImplemented;
}
////////////////////////////////
//~ rjf: @os_hooks Entry Points (Implemented Per-OS)
int
main(int argc, char **argv)
{
//- rjf: set up OS layer
{
}
//- rjf: call into "real" entry point
main_thread_base_entry_point(entry_point, argv, (U64)argc);
}
+43
View File
@@ -4,4 +4,47 @@
#ifndef OS_CORE_LINUX_H
#define OS_CORE_LINUX_H
////////////////////////////////
//~ rjf: Includes
#define _GNU_SOURCE
#include <features.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/limits.h>
#include <time.h>
#include <dirent.h>
#include <pthread.h>
#include <sys/syscall.h>
#include <signal.h>
#include <errno.h>
#include <dlfcn.h>
#include <sys/sysinfo.h>
int pthread_setname_np(pthread_t thread, const char *name);
int pthread_getname_np(pthread_t thread, char *name, size_t size);
typedef struct tm tm;
typedef struct timespec timespec;
////////////////////////////////
//~ rjf: State
typedef struct OS_LNX_State OS_LNX_State;
struct OS_LNX_State
{
Arena *arena;
OS_SystemInfo system_info;
OS_ProcessInfo process_info;
};
////////////////////////////////
//~ rjf: Globals
global OS_LNX_State os_lnx_state = {0};
#endif // OS_CORE_LINUX_H
+1 -1
View File
@@ -1120,7 +1120,7 @@ os_file_read(OS_Handle file, Rng1U64 rng, void *out_data)
return 0;
}
internal void
internal U64
os_file_write(OS_Handle file, Rng1U64 rng, void *data)
{
NotImplemented;
+1 -3
View File
@@ -187,8 +187,6 @@ internal void os_decommit(void *ptr, U64 size);
internal void os_release(void *ptr, U64 size);
//- rjf: large pages
internal B32 os_set_large_pages_enabled(B32 flag);
internal B32 os_large_pages_enabled(void);
internal void *os_reserve_large(U64 size);
internal B32 os_commit_large(void *ptr, U64 size);
@@ -210,7 +208,7 @@ internal void os_abort(S32 exit_code);
internal OS_Handle os_file_open(OS_AccessFlags flags, String8 path);
internal void os_file_close(OS_Handle file);
internal U64 os_file_read(OS_Handle file, Rng1U64 rng, void *out_data);
internal void os_file_write(OS_Handle file, Rng1U64 rng, void *data);
internal U64 os_file_write(OS_Handle file, Rng1U64 rng, void *data);
internal B32 os_file_set_times(OS_Handle file, DateTime time);
internal FileProperties os_properties_from_file(OS_Handle file);
internal OS_FileID os_id_from_file(OS_Handle file);
+15 -40
View File
@@ -201,37 +201,6 @@ os_release(void *ptr, U64 size)
//- rjf: large pages
internal B32
os_set_large_pages_enabled(B32 flag)
{
B32 is_ok = 0;
HANDLE token;
if(OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &token))
{
LUID luid;
if(LookupPrivilegeValue(0, SE_LOCK_MEMORY_NAME, &luid))
{
TOKEN_PRIVILEGES priv;
priv.PrivilegeCount = 1;
priv.Privileges[0].Luid = luid;
priv.Privileges[0].Attributes = flag ? SE_PRIVILEGE_ENABLED: 0;
if(AdjustTokenPrivileges(token, 0, &priv, sizeof(priv), 0, 0))
{
os_w32_state.large_pages_enabled = flag;
is_ok = 1;
}
}
CloseHandle(token);
}
return is_ok;
}
internal B32
os_large_pages_enabled(void)
{
return os_w32_state.large_pages_enabled;
}
internal void *
os_reserve_large(U64 size)
{
@@ -385,14 +354,15 @@ os_file_read(OS_Handle file, Rng1U64 rng, void *out_data)
return total_read_size;
}
internal void
internal U64
os_file_write(OS_Handle file, Rng1U64 rng, void *data)
{
if(os_handle_match(file, os_handle_zero())) { return; }
if(os_handle_match(file, os_handle_zero())) { return 0; }
HANDLE win_handle = (HANDLE)file.u64[0];
U64 src_off = 0;
U64 dst_off = rng.min;
U64 bytes_to_write_total = rng.max-rng.min;
U64 total_bytes_written = 0;
for(;src_off < bytes_to_write_total;)
{
void *bytes_src = (void *)((U8 *)data + src_off);
@@ -409,17 +379,19 @@ os_file_write(OS_Handle file, Rng1U64 rng, void *data)
}
src_off += bytes_written;
dst_off += bytes_written;
total_bytes_written += bytes_written;
}
return total_bytes_written;
}
internal B32
os_file_set_times(OS_Handle file, DateTime time)
os_file_set_time(OS_Handle file, DateTime time)
{
if(os_handle_match(file, os_handle_zero())) { return 0; }
B32 result = 0;
HANDLE handle = (HANDLE)file.u64[0];
SYSTEMTIME system_time = {0};
w32_system_time_from_date_time(&system_time, &time);
os_w32_system_time_from_date_time(&system_time, &time);
FILETIME file_time = {0};
result = (SystemTimeToFileTime(&system_time, &file_time) &&
SetFileTime(handle, &file_time, &file_time, &file_time));
@@ -1232,27 +1204,30 @@ os_semaphore_drop(OS_Handle semaphore)
//~ rjf: @os_hooks Dynamically-Loaded Libraries (Implemented Per-OS)
internal OS_Handle
os_library_open(String8 path){
os_library_open(String8 path)
{
Temp scratch = scratch_begin(0, 0);
String16 path16 = str16_from_8(scratch.arena, path);
HMODULE mod = LoadLibraryW((LPCWSTR)path16.str);
OS_Handle result = { (U64)mod };
scratch_end(scratch);
return(result);
return result;
}
internal VoidProc*
os_library_load_proc(OS_Handle lib, String8 name){
os_library_load_proc(OS_Handle lib, String8 name)
{
Temp scratch = scratch_begin(0, 0);
HMODULE mod = (HMODULE)lib.u64[0];
name = push_str8_copy(scratch.arena, name);
VoidProc *result = (VoidProc*)GetProcAddress(mod, (LPCSTR)name.str);
scratch_end(scratch);
return(result);
return result;
}
internal void
os_library_close(OS_Handle lib){
os_library_close(OS_Handle lib)
{
HMODULE mod = (HMODULE)lib.u64[0];
FreeLibrary(mod);
}
-3
View File
@@ -82,9 +82,6 @@ struct OS_W32_State
OS_SystemInfo system_info;
OS_ProcessInfo process_info;
// rjf: large pages
B32 large_pages_enabled;
// rjf: entity storage
CRITICAL_SECTION entity_mutex;
Arena *entity_arena;
+302 -302
View File
@@ -1,302 +1,302 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
//- GENERATED CODE
C_LINKAGE_BEGIN
String8 os_g_key_display_string_table[143] =
{
str8_lit_comp("Invalid Key"),
str8_lit_comp("Escape"),
str8_lit_comp("F1"),
str8_lit_comp("F2"),
str8_lit_comp("F3"),
str8_lit_comp("F4"),
str8_lit_comp("F5"),
str8_lit_comp("F6"),
str8_lit_comp("F7"),
str8_lit_comp("F8"),
str8_lit_comp("F9"),
str8_lit_comp("F10"),
str8_lit_comp("F11"),
str8_lit_comp("F12"),
str8_lit_comp("F13"),
str8_lit_comp("F14"),
str8_lit_comp("F15"),
str8_lit_comp("F16"),
str8_lit_comp("F17"),
str8_lit_comp("F18"),
str8_lit_comp("F19"),
str8_lit_comp("F20"),
str8_lit_comp("F21"),
str8_lit_comp("F22"),
str8_lit_comp("F23"),
str8_lit_comp("F24"),
str8_lit_comp("Tick"),
str8_lit_comp("0"),
str8_lit_comp("1"),
str8_lit_comp("2"),
str8_lit_comp("3"),
str8_lit_comp("4"),
str8_lit_comp("5"),
str8_lit_comp("6"),
str8_lit_comp("7"),
str8_lit_comp("8"),
str8_lit_comp("9"),
str8_lit_comp("Minus"),
str8_lit_comp("Equal"),
str8_lit_comp("Backspace"),
str8_lit_comp("Tab"),
str8_lit_comp("Q"),
str8_lit_comp("W"),
str8_lit_comp("E"),
str8_lit_comp("R"),
str8_lit_comp("T"),
str8_lit_comp("Y"),
str8_lit_comp("U"),
str8_lit_comp("I"),
str8_lit_comp("O"),
str8_lit_comp("P"),
str8_lit_comp("Left Bracket"),
str8_lit_comp("Right Bracket"),
str8_lit_comp("Back Slash"),
str8_lit_comp("Caps Lock"),
str8_lit_comp("A"),
str8_lit_comp("S"),
str8_lit_comp("D"),
str8_lit_comp("F"),
str8_lit_comp("G"),
str8_lit_comp("H"),
str8_lit_comp("J"),
str8_lit_comp("K"),
str8_lit_comp("L"),
str8_lit_comp("Semicolon"),
str8_lit_comp("Quote"),
str8_lit_comp("Return"),
str8_lit_comp("Shift"),
str8_lit_comp("Z"),
str8_lit_comp("X"),
str8_lit_comp("C"),
str8_lit_comp("V"),
str8_lit_comp("B"),
str8_lit_comp("N"),
str8_lit_comp("M"),
str8_lit_comp("Comma"),
str8_lit_comp("Period"),
str8_lit_comp("Slash"),
str8_lit_comp("Ctrl"),
str8_lit_comp("Alt"),
str8_lit_comp("Space"),
str8_lit_comp("Menu"),
str8_lit_comp("Scroll Lock"),
str8_lit_comp("Pause"),
str8_lit_comp("Insert"),
str8_lit_comp("Home"),
str8_lit_comp("Page Up"),
str8_lit_comp("Delete"),
str8_lit_comp("End"),
str8_lit_comp("Page Down"),
str8_lit_comp("Up"),
str8_lit_comp("Left"),
str8_lit_comp("Down"),
str8_lit_comp("Right"),
str8_lit_comp("Ex0"),
str8_lit_comp("Ex1"),
str8_lit_comp("Ex2"),
str8_lit_comp("Ex3"),
str8_lit_comp("Ex4"),
str8_lit_comp("Ex5"),
str8_lit_comp("Ex6"),
str8_lit_comp("Ex7"),
str8_lit_comp("Ex8"),
str8_lit_comp("Ex9"),
str8_lit_comp("Ex10"),
str8_lit_comp("Ex11"),
str8_lit_comp("Ex12"),
str8_lit_comp("Ex13"),
str8_lit_comp("Ex14"),
str8_lit_comp("Ex15"),
str8_lit_comp("Ex16"),
str8_lit_comp("Ex17"),
str8_lit_comp("Ex18"),
str8_lit_comp("Ex19"),
str8_lit_comp("Ex20"),
str8_lit_comp("Ex21"),
str8_lit_comp("Ex22"),
str8_lit_comp("Ex23"),
str8_lit_comp("Ex24"),
str8_lit_comp("Ex25"),
str8_lit_comp("Ex26"),
str8_lit_comp("Ex27"),
str8_lit_comp("Ex28"),
str8_lit_comp("Ex29"),
str8_lit_comp("Num Lock"),
str8_lit_comp("Numpad Slash"),
str8_lit_comp("Numpad Star"),
str8_lit_comp("Numpad Minus"),
str8_lit_comp("Numpad Plus"),
str8_lit_comp("Numpad Period"),
str8_lit_comp("Numpad 0"),
str8_lit_comp("Numpad 1"),
str8_lit_comp("Numpad 2"),
str8_lit_comp("Numpad 3"),
str8_lit_comp("Numpad 4"),
str8_lit_comp("Numpad 5"),
str8_lit_comp("Numpad 6"),
str8_lit_comp("Numpad 7"),
str8_lit_comp("Numpad 8"),
str8_lit_comp("Numpad 9"),
str8_lit_comp("Left Mouse Button"),
str8_lit_comp("Middle Mouse Button"),
str8_lit_comp("Right Mouse Button"),
};
String8 os_g_key_cfg_string_table[143] =
{
str8_lit_comp("null"),
str8_lit_comp("esc"),
str8_lit_comp("f1"),
str8_lit_comp("f2"),
str8_lit_comp("f3"),
str8_lit_comp("f4"),
str8_lit_comp("f5"),
str8_lit_comp("f6"),
str8_lit_comp("f7"),
str8_lit_comp("f8"),
str8_lit_comp("f9"),
str8_lit_comp("f10"),
str8_lit_comp("f11"),
str8_lit_comp("f12"),
str8_lit_comp("f13"),
str8_lit_comp("f14"),
str8_lit_comp("f15"),
str8_lit_comp("f16"),
str8_lit_comp("f17"),
str8_lit_comp("f18"),
str8_lit_comp("f19"),
str8_lit_comp("f20"),
str8_lit_comp("f21"),
str8_lit_comp("f22"),
str8_lit_comp("f23"),
str8_lit_comp("f24"),
str8_lit_comp("tick"),
str8_lit_comp("0"),
str8_lit_comp("1"),
str8_lit_comp("2"),
str8_lit_comp("3"),
str8_lit_comp("4"),
str8_lit_comp("5"),
str8_lit_comp("6"),
str8_lit_comp("7"),
str8_lit_comp("8"),
str8_lit_comp("9"),
str8_lit_comp("minus"),
str8_lit_comp("equal"),
str8_lit_comp("backspace"),
str8_lit_comp("tab"),
str8_lit_comp("q"),
str8_lit_comp("w"),
str8_lit_comp("e"),
str8_lit_comp("r"),
str8_lit_comp("t"),
str8_lit_comp("y"),
str8_lit_comp("u"),
str8_lit_comp("i"),
str8_lit_comp("o"),
str8_lit_comp("p"),
str8_lit_comp("left_bracket"),
str8_lit_comp("right_bracket"),
str8_lit_comp("backslash"),
str8_lit_comp("caps_lock"),
str8_lit_comp("a"),
str8_lit_comp("s"),
str8_lit_comp("d"),
str8_lit_comp("f"),
str8_lit_comp("g"),
str8_lit_comp("h"),
str8_lit_comp("j"),
str8_lit_comp("k"),
str8_lit_comp("l"),
str8_lit_comp("semicolon"),
str8_lit_comp("quote"),
str8_lit_comp("return"),
str8_lit_comp("shift"),
str8_lit_comp("z"),
str8_lit_comp("x"),
str8_lit_comp("c"),
str8_lit_comp("v"),
str8_lit_comp("b"),
str8_lit_comp("n"),
str8_lit_comp("m"),
str8_lit_comp("comma"),
str8_lit_comp("period"),
str8_lit_comp("slash"),
str8_lit_comp("ctrl"),
str8_lit_comp("alt"),
str8_lit_comp("space"),
str8_lit_comp("menu"),
str8_lit_comp("scroll_lock"),
str8_lit_comp("pause"),
str8_lit_comp("insert"),
str8_lit_comp("home"),
str8_lit_comp("page_up"),
str8_lit_comp("delete"),
str8_lit_comp("end"),
str8_lit_comp("page_down"),
str8_lit_comp("up"),
str8_lit_comp("left"),
str8_lit_comp("down"),
str8_lit_comp("right"),
str8_lit_comp("ex0"),
str8_lit_comp("ex1"),
str8_lit_comp("ex2"),
str8_lit_comp("ex3"),
str8_lit_comp("ex4"),
str8_lit_comp("ex5"),
str8_lit_comp("ex6"),
str8_lit_comp("ex7"),
str8_lit_comp("ex8"),
str8_lit_comp("ex9"),
str8_lit_comp("ex10"),
str8_lit_comp("ex11"),
str8_lit_comp("ex12"),
str8_lit_comp("ex13"),
str8_lit_comp("ex14"),
str8_lit_comp("ex15"),
str8_lit_comp("ex16"),
str8_lit_comp("ex17"),
str8_lit_comp("ex18"),
str8_lit_comp("ex19"),
str8_lit_comp("ex20"),
str8_lit_comp("ex21"),
str8_lit_comp("ex22"),
str8_lit_comp("ex23"),
str8_lit_comp("ex24"),
str8_lit_comp("ex25"),
str8_lit_comp("ex26"),
str8_lit_comp("ex27"),
str8_lit_comp("ex28"),
str8_lit_comp("ex29"),
str8_lit_comp("num_lock"),
str8_lit_comp("numpad_slash"),
str8_lit_comp("numpad_star"),
str8_lit_comp("numpad_minus"),
str8_lit_comp("numpad_plus"),
str8_lit_comp("numpad_period"),
str8_lit_comp("numpad_0"),
str8_lit_comp("numpad_1"),
str8_lit_comp("numpad_2"),
str8_lit_comp("numpad_3"),
str8_lit_comp("numpad_4"),
str8_lit_comp("numpad_5"),
str8_lit_comp("numpad_6"),
str8_lit_comp("numpad_7"),
str8_lit_comp("numpad_8"),
str8_lit_comp("numpad_9"),
str8_lit_comp("left_mouse"),
str8_lit_comp("middle_mouse"),
str8_lit_comp("right_mouse"),
};
C_LINKAGE_END
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
//- GENERATED CODE
C_LINKAGE_BEGIN
String8 os_g_key_display_string_table[143] =
{
str8_lit_comp("Invalid Key"),
str8_lit_comp("Escape"),
str8_lit_comp("F1"),
str8_lit_comp("F2"),
str8_lit_comp("F3"),
str8_lit_comp("F4"),
str8_lit_comp("F5"),
str8_lit_comp("F6"),
str8_lit_comp("F7"),
str8_lit_comp("F8"),
str8_lit_comp("F9"),
str8_lit_comp("F10"),
str8_lit_comp("F11"),
str8_lit_comp("F12"),
str8_lit_comp("F13"),
str8_lit_comp("F14"),
str8_lit_comp("F15"),
str8_lit_comp("F16"),
str8_lit_comp("F17"),
str8_lit_comp("F18"),
str8_lit_comp("F19"),
str8_lit_comp("F20"),
str8_lit_comp("F21"),
str8_lit_comp("F22"),
str8_lit_comp("F23"),
str8_lit_comp("F24"),
str8_lit_comp("Tick"),
str8_lit_comp("0"),
str8_lit_comp("1"),
str8_lit_comp("2"),
str8_lit_comp("3"),
str8_lit_comp("4"),
str8_lit_comp("5"),
str8_lit_comp("6"),
str8_lit_comp("7"),
str8_lit_comp("8"),
str8_lit_comp("9"),
str8_lit_comp("Minus"),
str8_lit_comp("Equal"),
str8_lit_comp("Backspace"),
str8_lit_comp("Tab"),
str8_lit_comp("Q"),
str8_lit_comp("W"),
str8_lit_comp("E"),
str8_lit_comp("R"),
str8_lit_comp("T"),
str8_lit_comp("Y"),
str8_lit_comp("U"),
str8_lit_comp("I"),
str8_lit_comp("O"),
str8_lit_comp("P"),
str8_lit_comp("Left Bracket"),
str8_lit_comp("Right Bracket"),
str8_lit_comp("Back Slash"),
str8_lit_comp("Caps Lock"),
str8_lit_comp("A"),
str8_lit_comp("S"),
str8_lit_comp("D"),
str8_lit_comp("F"),
str8_lit_comp("G"),
str8_lit_comp("H"),
str8_lit_comp("J"),
str8_lit_comp("K"),
str8_lit_comp("L"),
str8_lit_comp("Semicolon"),
str8_lit_comp("Quote"),
str8_lit_comp("Return"),
str8_lit_comp("Shift"),
str8_lit_comp("Z"),
str8_lit_comp("X"),
str8_lit_comp("C"),
str8_lit_comp("V"),
str8_lit_comp("B"),
str8_lit_comp("N"),
str8_lit_comp("M"),
str8_lit_comp("Comma"),
str8_lit_comp("Period"),
str8_lit_comp("Slash"),
str8_lit_comp("Ctrl"),
str8_lit_comp("Alt"),
str8_lit_comp("Space"),
str8_lit_comp("Menu"),
str8_lit_comp("Scroll Lock"),
str8_lit_comp("Pause"),
str8_lit_comp("Insert"),
str8_lit_comp("Home"),
str8_lit_comp("Page Up"),
str8_lit_comp("Delete"),
str8_lit_comp("End"),
str8_lit_comp("Page Down"),
str8_lit_comp("Up"),
str8_lit_comp("Left"),
str8_lit_comp("Down"),
str8_lit_comp("Right"),
str8_lit_comp("Ex0"),
str8_lit_comp("Ex1"),
str8_lit_comp("Ex2"),
str8_lit_comp("Ex3"),
str8_lit_comp("Ex4"),
str8_lit_comp("Ex5"),
str8_lit_comp("Ex6"),
str8_lit_comp("Ex7"),
str8_lit_comp("Ex8"),
str8_lit_comp("Ex9"),
str8_lit_comp("Ex10"),
str8_lit_comp("Ex11"),
str8_lit_comp("Ex12"),
str8_lit_comp("Ex13"),
str8_lit_comp("Ex14"),
str8_lit_comp("Ex15"),
str8_lit_comp("Ex16"),
str8_lit_comp("Ex17"),
str8_lit_comp("Ex18"),
str8_lit_comp("Ex19"),
str8_lit_comp("Ex20"),
str8_lit_comp("Ex21"),
str8_lit_comp("Ex22"),
str8_lit_comp("Ex23"),
str8_lit_comp("Ex24"),
str8_lit_comp("Ex25"),
str8_lit_comp("Ex26"),
str8_lit_comp("Ex27"),
str8_lit_comp("Ex28"),
str8_lit_comp("Ex29"),
str8_lit_comp("Num Lock"),
str8_lit_comp("Numpad Slash"),
str8_lit_comp("Numpad Star"),
str8_lit_comp("Numpad Minus"),
str8_lit_comp("Numpad Plus"),
str8_lit_comp("Numpad Period"),
str8_lit_comp("Numpad 0"),
str8_lit_comp("Numpad 1"),
str8_lit_comp("Numpad 2"),
str8_lit_comp("Numpad 3"),
str8_lit_comp("Numpad 4"),
str8_lit_comp("Numpad 5"),
str8_lit_comp("Numpad 6"),
str8_lit_comp("Numpad 7"),
str8_lit_comp("Numpad 8"),
str8_lit_comp("Numpad 9"),
str8_lit_comp("Left Mouse Button"),
str8_lit_comp("Middle Mouse Button"),
str8_lit_comp("Right Mouse Button"),
};
String8 os_g_key_cfg_string_table[143] =
{
str8_lit_comp("null"),
str8_lit_comp("esc"),
str8_lit_comp("f1"),
str8_lit_comp("f2"),
str8_lit_comp("f3"),
str8_lit_comp("f4"),
str8_lit_comp("f5"),
str8_lit_comp("f6"),
str8_lit_comp("f7"),
str8_lit_comp("f8"),
str8_lit_comp("f9"),
str8_lit_comp("f10"),
str8_lit_comp("f11"),
str8_lit_comp("f12"),
str8_lit_comp("f13"),
str8_lit_comp("f14"),
str8_lit_comp("f15"),
str8_lit_comp("f16"),
str8_lit_comp("f17"),
str8_lit_comp("f18"),
str8_lit_comp("f19"),
str8_lit_comp("f20"),
str8_lit_comp("f21"),
str8_lit_comp("f22"),
str8_lit_comp("f23"),
str8_lit_comp("f24"),
str8_lit_comp("tick"),
str8_lit_comp("0"),
str8_lit_comp("1"),
str8_lit_comp("2"),
str8_lit_comp("3"),
str8_lit_comp("4"),
str8_lit_comp("5"),
str8_lit_comp("6"),
str8_lit_comp("7"),
str8_lit_comp("8"),
str8_lit_comp("9"),
str8_lit_comp("minus"),
str8_lit_comp("equal"),
str8_lit_comp("backspace"),
str8_lit_comp("tab"),
str8_lit_comp("q"),
str8_lit_comp("w"),
str8_lit_comp("e"),
str8_lit_comp("r"),
str8_lit_comp("t"),
str8_lit_comp("y"),
str8_lit_comp("u"),
str8_lit_comp("i"),
str8_lit_comp("o"),
str8_lit_comp("p"),
str8_lit_comp("left_bracket"),
str8_lit_comp("right_bracket"),
str8_lit_comp("backslash"),
str8_lit_comp("caps_lock"),
str8_lit_comp("a"),
str8_lit_comp("s"),
str8_lit_comp("d"),
str8_lit_comp("f"),
str8_lit_comp("g"),
str8_lit_comp("h"),
str8_lit_comp("j"),
str8_lit_comp("k"),
str8_lit_comp("l"),
str8_lit_comp("semicolon"),
str8_lit_comp("quote"),
str8_lit_comp("return"),
str8_lit_comp("shift"),
str8_lit_comp("z"),
str8_lit_comp("x"),
str8_lit_comp("c"),
str8_lit_comp("v"),
str8_lit_comp("b"),
str8_lit_comp("n"),
str8_lit_comp("m"),
str8_lit_comp("comma"),
str8_lit_comp("period"),
str8_lit_comp("slash"),
str8_lit_comp("ctrl"),
str8_lit_comp("alt"),
str8_lit_comp("space"),
str8_lit_comp("menu"),
str8_lit_comp("scroll_lock"),
str8_lit_comp("pause"),
str8_lit_comp("insert"),
str8_lit_comp("home"),
str8_lit_comp("page_up"),
str8_lit_comp("delete"),
str8_lit_comp("end"),
str8_lit_comp("page_down"),
str8_lit_comp("up"),
str8_lit_comp("left"),
str8_lit_comp("down"),
str8_lit_comp("right"),
str8_lit_comp("ex0"),
str8_lit_comp("ex1"),
str8_lit_comp("ex2"),
str8_lit_comp("ex3"),
str8_lit_comp("ex4"),
str8_lit_comp("ex5"),
str8_lit_comp("ex6"),
str8_lit_comp("ex7"),
str8_lit_comp("ex8"),
str8_lit_comp("ex9"),
str8_lit_comp("ex10"),
str8_lit_comp("ex11"),
str8_lit_comp("ex12"),
str8_lit_comp("ex13"),
str8_lit_comp("ex14"),
str8_lit_comp("ex15"),
str8_lit_comp("ex16"),
str8_lit_comp("ex17"),
str8_lit_comp("ex18"),
str8_lit_comp("ex19"),
str8_lit_comp("ex20"),
str8_lit_comp("ex21"),
str8_lit_comp("ex22"),
str8_lit_comp("ex23"),
str8_lit_comp("ex24"),
str8_lit_comp("ex25"),
str8_lit_comp("ex26"),
str8_lit_comp("ex27"),
str8_lit_comp("ex28"),
str8_lit_comp("ex29"),
str8_lit_comp("num_lock"),
str8_lit_comp("numpad_slash"),
str8_lit_comp("numpad_star"),
str8_lit_comp("numpad_minus"),
str8_lit_comp("numpad_plus"),
str8_lit_comp("numpad_period"),
str8_lit_comp("numpad_0"),
str8_lit_comp("numpad_1"),
str8_lit_comp("numpad_2"),
str8_lit_comp("numpad_3"),
str8_lit_comp("numpad_4"),
str8_lit_comp("numpad_5"),
str8_lit_comp("numpad_6"),
str8_lit_comp("numpad_7"),
str8_lit_comp("numpad_8"),
str8_lit_comp("numpad_9"),
str8_lit_comp("left_mouse"),
str8_lit_comp("middle_mouse"),
str8_lit_comp("right_mouse"),
};
C_LINKAGE_END
+163 -163
View File
@@ -1,163 +1,163 @@
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
//- GENERATED CODE
#ifndef OS_GFX_META_H
#define OS_GFX_META_H
typedef enum OS_Key
{
OS_Key_Null,
OS_Key_Esc,
OS_Key_F1,
OS_Key_F2,
OS_Key_F3,
OS_Key_F4,
OS_Key_F5,
OS_Key_F6,
OS_Key_F7,
OS_Key_F8,
OS_Key_F9,
OS_Key_F10,
OS_Key_F11,
OS_Key_F12,
OS_Key_F13,
OS_Key_F14,
OS_Key_F15,
OS_Key_F16,
OS_Key_F17,
OS_Key_F18,
OS_Key_F19,
OS_Key_F20,
OS_Key_F21,
OS_Key_F22,
OS_Key_F23,
OS_Key_F24,
OS_Key_Tick,
OS_Key_0,
OS_Key_1,
OS_Key_2,
OS_Key_3,
OS_Key_4,
OS_Key_5,
OS_Key_6,
OS_Key_7,
OS_Key_8,
OS_Key_9,
OS_Key_Minus,
OS_Key_Equal,
OS_Key_Backspace,
OS_Key_Tab,
OS_Key_Q,
OS_Key_W,
OS_Key_E,
OS_Key_R,
OS_Key_T,
OS_Key_Y,
OS_Key_U,
OS_Key_I,
OS_Key_O,
OS_Key_P,
OS_Key_LeftBracket,
OS_Key_RightBracket,
OS_Key_BackSlash,
OS_Key_CapsLock,
OS_Key_A,
OS_Key_S,
OS_Key_D,
OS_Key_F,
OS_Key_G,
OS_Key_H,
OS_Key_J,
OS_Key_K,
OS_Key_L,
OS_Key_Semicolon,
OS_Key_Quote,
OS_Key_Return,
OS_Key_Shift,
OS_Key_Z,
OS_Key_X,
OS_Key_C,
OS_Key_V,
OS_Key_B,
OS_Key_N,
OS_Key_M,
OS_Key_Comma,
OS_Key_Period,
OS_Key_Slash,
OS_Key_Ctrl,
OS_Key_Alt,
OS_Key_Space,
OS_Key_Menu,
OS_Key_ScrollLock,
OS_Key_Pause,
OS_Key_Insert,
OS_Key_Home,
OS_Key_PageUp,
OS_Key_Delete,
OS_Key_End,
OS_Key_PageDown,
OS_Key_Up,
OS_Key_Left,
OS_Key_Down,
OS_Key_Right,
OS_Key_Ex0,
OS_Key_Ex1,
OS_Key_Ex2,
OS_Key_Ex3,
OS_Key_Ex4,
OS_Key_Ex5,
OS_Key_Ex6,
OS_Key_Ex7,
OS_Key_Ex8,
OS_Key_Ex9,
OS_Key_Ex10,
OS_Key_Ex11,
OS_Key_Ex12,
OS_Key_Ex13,
OS_Key_Ex14,
OS_Key_Ex15,
OS_Key_Ex16,
OS_Key_Ex17,
OS_Key_Ex18,
OS_Key_Ex19,
OS_Key_Ex20,
OS_Key_Ex21,
OS_Key_Ex22,
OS_Key_Ex23,
OS_Key_Ex24,
OS_Key_Ex25,
OS_Key_Ex26,
OS_Key_Ex27,
OS_Key_Ex28,
OS_Key_Ex29,
OS_Key_NumLock,
OS_Key_NumSlash,
OS_Key_NumStar,
OS_Key_NumMinus,
OS_Key_NumPlus,
OS_Key_NumPeriod,
OS_Key_Num0,
OS_Key_Num1,
OS_Key_Num2,
OS_Key_Num3,
OS_Key_Num4,
OS_Key_Num5,
OS_Key_Num6,
OS_Key_Num7,
OS_Key_Num8,
OS_Key_Num9,
OS_Key_LeftMouseButton,
OS_Key_MiddleMouseButton,
OS_Key_RightMouseButton,
OS_Key_COUNT,
} OS_Key;
C_LINKAGE_BEGIN
extern String8 os_g_key_display_string_table[143];
extern String8 os_g_key_cfg_string_table[143];
C_LINKAGE_END
#endif // OS_GFX_META_H
// Copyright (c) 2024 Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
//- GENERATED CODE
#ifndef OS_GFX_META_H
#define OS_GFX_META_H
typedef enum OS_Key
{
OS_Key_Null,
OS_Key_Esc,
OS_Key_F1,
OS_Key_F2,
OS_Key_F3,
OS_Key_F4,
OS_Key_F5,
OS_Key_F6,
OS_Key_F7,
OS_Key_F8,
OS_Key_F9,
OS_Key_F10,
OS_Key_F11,
OS_Key_F12,
OS_Key_F13,
OS_Key_F14,
OS_Key_F15,
OS_Key_F16,
OS_Key_F17,
OS_Key_F18,
OS_Key_F19,
OS_Key_F20,
OS_Key_F21,
OS_Key_F22,
OS_Key_F23,
OS_Key_F24,
OS_Key_Tick,
OS_Key_0,
OS_Key_1,
OS_Key_2,
OS_Key_3,
OS_Key_4,
OS_Key_5,
OS_Key_6,
OS_Key_7,
OS_Key_8,
OS_Key_9,
OS_Key_Minus,
OS_Key_Equal,
OS_Key_Backspace,
OS_Key_Tab,
OS_Key_Q,
OS_Key_W,
OS_Key_E,
OS_Key_R,
OS_Key_T,
OS_Key_Y,
OS_Key_U,
OS_Key_I,
OS_Key_O,
OS_Key_P,
OS_Key_LeftBracket,
OS_Key_RightBracket,
OS_Key_BackSlash,
OS_Key_CapsLock,
OS_Key_A,
OS_Key_S,
OS_Key_D,
OS_Key_F,
OS_Key_G,
OS_Key_H,
OS_Key_J,
OS_Key_K,
OS_Key_L,
OS_Key_Semicolon,
OS_Key_Quote,
OS_Key_Return,
OS_Key_Shift,
OS_Key_Z,
OS_Key_X,
OS_Key_C,
OS_Key_V,
OS_Key_B,
OS_Key_N,
OS_Key_M,
OS_Key_Comma,
OS_Key_Period,
OS_Key_Slash,
OS_Key_Ctrl,
OS_Key_Alt,
OS_Key_Space,
OS_Key_Menu,
OS_Key_ScrollLock,
OS_Key_Pause,
OS_Key_Insert,
OS_Key_Home,
OS_Key_PageUp,
OS_Key_Delete,
OS_Key_End,
OS_Key_PageDown,
OS_Key_Up,
OS_Key_Left,
OS_Key_Down,
OS_Key_Right,
OS_Key_Ex0,
OS_Key_Ex1,
OS_Key_Ex2,
OS_Key_Ex3,
OS_Key_Ex4,
OS_Key_Ex5,
OS_Key_Ex6,
OS_Key_Ex7,
OS_Key_Ex8,
OS_Key_Ex9,
OS_Key_Ex10,
OS_Key_Ex11,
OS_Key_Ex12,
OS_Key_Ex13,
OS_Key_Ex14,
OS_Key_Ex15,
OS_Key_Ex16,
OS_Key_Ex17,
OS_Key_Ex18,
OS_Key_Ex19,
OS_Key_Ex20,
OS_Key_Ex21,
OS_Key_Ex22,
OS_Key_Ex23,
OS_Key_Ex24,
OS_Key_Ex25,
OS_Key_Ex26,
OS_Key_Ex27,
OS_Key_Ex28,
OS_Key_Ex29,
OS_Key_NumLock,
OS_Key_NumSlash,
OS_Key_NumStar,
OS_Key_NumMinus,
OS_Key_NumPlus,
OS_Key_NumPeriod,
OS_Key_Num0,
OS_Key_Num1,
OS_Key_Num2,
OS_Key_Num3,
OS_Key_Num4,
OS_Key_Num5,
OS_Key_Num6,
OS_Key_Num7,
OS_Key_Num8,
OS_Key_Num9,
OS_Key_LeftMouseButton,
OS_Key_MiddleMouseButton,
OS_Key_RightMouseButton,
OS_Key_COUNT,
} OS_Key;
C_LINKAGE_BEGIN
extern String8 os_g_key_display_string_table[143];
extern String8 os_g_key_cfg_string_table[143];
C_LINKAGE_END
#endif // OS_GFX_META_H