Skip to content

Commit

Permalink
Fix field counts in other places
Browse files Browse the repository at this point in the history
  • Loading branch information
gspencergoog committed Oct 26, 2023
1 parent a25ad01 commit d7db7bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/ui/window/key_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

namespace flutter {

// If this value changes, update the encoding code in the following files:
//
// * KeyData.java (KeyData.FIELD_COUNT)
// * platform_dispatcher.dart (_kKeyDataFieldCount)
// If this value changes, update the encoding code in the following files:
//
// * KeyData.java (KeyData.FIELD_COUNT)
// * platform_dispatcher.dart (_kKeyDataFieldCount)
static constexpr int kKeyDataFieldCount = 6;
static constexpr int kBytesPerKeyField = sizeof(int64_t);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ public KeyData(@NonNull ByteBuffer buffer) {

long timestamp;
Type type;
DeviceType deviceType;
long physicalKey;
long logicalKey;
boolean synthesized;
DeviceType deviceType;

/** The character of this key data encoded in UTF-8. */
@Nullable String character;
Expand Down Expand Up @@ -173,7 +173,7 @@ ByteBuffer toBytes() {
packet.putLong(physicalKey);
packet.putLong(logicalKey);
packet.putLong(synthesized ? 1L : 0L);
packet.putLong(deviceType);
packet.putLong(deviceType.getValue());
if (charBytes != null) {
packet.put(charBytes);
}
Expand Down

0 comments on commit d7db7bf

Please sign in to comment.