fix Event structure alignment between C and D

This commit is contained in:
josh committed 2020-07-09 15:06:48 -04:00
1 parent acb25132e4
commit a30b4b7ff8
2 files changed
+5 -3

No files matched your search

+3 -2
View File
@@ -8,7 +8,7 @@ import jtk.timer;
struct Event struct Event
{ {
enum Type : ubyte enum : uint
{ {
WINDOW_CLOSE, WINDOW_CLOSE,
WINDOW_EXPOSE, WINDOW_EXPOSE,
@@ -41,7 +41,8 @@ struct Event
uint height; uint height;
}; };
Type type; uint type;
uint _pad;
union union
{ {
KeyEvent key_event; KeyEvent key_event;
+2 -1
View File
@@ -339,7 +339,8 @@ typedef struct {
} jtk_window_resize_event_t; } jtk_window_resize_event_t;
typedef struct { typedef struct {
uint8_t type; uint32_t type;
uint32_t _pad;
union { union {
jtk_key_event_t key_event; jtk_key_event_t key_event;
jtk_button_event_t button_event; jtk_button_event_t button_event;