updated linux code

master
Allen Webster 2017-01-30 11:04:47 -05:00
parent 0417cab3d0
commit 1c327bdeaf
1 changed files with 3 additions and 11 deletions

View File

@ -1267,7 +1267,7 @@ Sys_Grow_Thread_Memory_Sig(system_grow_thread_memory){
system_acquire_lock(CANCEL_LOCK0 + memory->id - 1); system_acquire_lock(CANCEL_LOCK0 + memory->id - 1);
old_data = memory->data; old_data = memory->data;
old_size = memory->size; old_size = memory->size;
new_size = l_round_up(memory->size*2, KB(4)); new_size = l_round_up_i32(memory->size*2, KB(4));
memory->data = system_get_memory(new_size); memory->data = system_get_memory(new_size);
memory->size = new_size; memory->size = new_size;
if (old_data){ if (old_data){
@ -1975,16 +1975,8 @@ LinuxKeycodeInit(Display* dpy){
internal void internal void
LinuxPushKey(u8 code, u8 chr, u8 chr_nocaps, b8 (*mods)[MDFR_INDEX_COUNT], b32 is_hold) LinuxPushKey(u8 code, u8 chr, u8 chr_nocaps, b8 (*mods)[MDFR_INDEX_COUNT], b32 is_hold)
{ {
i32 *count; i32 *count = &linuxvars.input.keys.count;
Key_Event_Data *data; Key_Event_Data *data = linuxvars.input.keys.keys;
if(is_hold){
count = &linuxvars.input.keys.hold_count;
data = linuxvars.input.keys.hold;
} else {
count = &linuxvars.input.keys.press_count;
data = linuxvars.input.keys.press;
}
if(*count < KEY_INPUT_BUFFER_SIZE){ if(*count < KEY_INPUT_BUFFER_SIZE){
data[*count].keycode = code; data[*count].keycode = code;