fix Event structure alignment between C and D

This commit is contained in:
Josh Holtrop 2020-07-09 15:06:48 -04:00
parent acb25132e4
commit a30b4b7ff8
2 changed files with 5 additions and 3 deletions

View File

@ -8,7 +8,7 @@ import jtk.timer;
struct Event
{
enum Type : ubyte
enum : uint
{
WINDOW_CLOSE,
WINDOW_EXPOSE,
@ -41,7 +41,8 @@ struct Event
uint height;
};
Type type;
uint type;
uint _pad;
union
{
KeyEvent key_event;

View File

@ -339,7 +339,8 @@ typedef struct {
} jtk_window_resize_event_t;
typedef struct {
uint8_t type;
uint32_t type;
uint32_t _pad;
union {
jtk_key_event_t key_event;
jtk_button_event_t button_event;