Mac clipboard watching bug fixed
parent
62a884bf02
commit
117e61c91f
|
@ -608,10 +608,10 @@ osx_step(void){
|
|||
|
||||
// NOTE(allen): Frame Clipboard Input
|
||||
if (osx_objc.has_clipboard_item){
|
||||
osxvars.input.clipboard = make_string(osx_objc.clipboard_data, (i32)osx_objc.clipboard_size);
|
||||
frame_input.clipboard = make_string(osx_objc.clipboard_data, (i32)osx_objc.clipboard_size);
|
||||
}
|
||||
else{
|
||||
osxvars.input.clipboard = null_string;
|
||||
frame_input.clipboard = null_string;
|
||||
}
|
||||
|
||||
// HACK(allen): Got this all messed up with respect to how everyone else (other OS layers) work
|
||||
|
|
|
@ -185,7 +185,7 @@ static i32 did_update_for_clipboard = true;
|
|||
if (data != nil){
|
||||
u32 copy_length = data.length;
|
||||
if (copy_length > 0){
|
||||
if (copy_length + 1 >= osx_objc.clipboard_max){
|
||||
if (copy_length + 1 > osx_objc.clipboard_max){
|
||||
osx_free(osx_objc.clipboard_data, osx_objc.clipboard_max);
|
||||
osx_objc.clipboard_max = l_round_up_u32(copy_length + 1, KB(4));
|
||||
osx_objc.clipboard_data = osx_allocate(osx_objc.clipboard_max);
|
||||
|
|
Loading…
Reference in New Issue