Fixed input event buffer issues

Queue doesn't properly act as a ring buffer had to roll my own.
I want to make a allocated ring buffer as well...
This commit is contained in:
2024-06-23 03:04:38 -04:00
parent ce1d31f0d4
commit 55b80da8e5
17 changed files with 390 additions and 139 deletions

View File

@ -172,8 +172,8 @@ LRU_reload :: proc( cache : ^LRU_Cache, allocator : Allocator )
LRU_hash_key :: #force_inline proc( key : u64 ) -> ( hash : u64 ) {
bytes := transmute( [8]byte ) key
// hash = fnv64a( bytes[:] )
hash = cast(u64) crc64( bytes[:] )
hash = fnv64a( bytes[:] )
// hash = cast(u64) crc64( bytes[:] )
return
}

View File

@ -754,7 +754,7 @@ reset_batch_codepoint_state :: proc( ctx : ^Context ) {
shape_text_cached :: proc( ctx : ^Context, font : FontID, text_utf8 : string ) -> ^ShapedText
{
font := font
hash := cast(u64) crc32( transmute([]u8) text_utf8 )
hash := cast(u64) crc64( transmute([]u8) text_utf8 )
// hash := label_hash( text_utf8 )
shape_cache := & ctx.shape_cache