From 117e61c91f0e3d77d7e4b9dc05f5b34423814e26 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Mon, 27 Nov 2017 14:14:58 -0500 Subject: [PATCH] Mac clipboard watching bug fixed --- platform_mac/mac_4ed.cpp | 4 ++-- platform_mac/mac_4ed.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform_mac/mac_4ed.cpp b/platform_mac/mac_4ed.cpp index a5ab297d..c7f171c8 100644 --- a/platform_mac/mac_4ed.cpp +++ b/platform_mac/mac_4ed.cpp @@ -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 diff --git a/platform_mac/mac_4ed.m b/platform_mac/mac_4ed.m index e7447046..19f76c0b 100644 --- a/platform_mac/mac_4ed.m +++ b/platform_mac/mac_4ed.m @@ -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);