Add window ID
This commit is contained in:
		| @@ -36,6 +36,7 @@ struct rect { | |||||||
| }; | }; | ||||||
|  |  | ||||||
| struct window { | struct window { | ||||||
|  |   u32 id; | ||||||
|   u64 width; |   u64 width; | ||||||
|   u64 height; |   u64 height; | ||||||
|   const char *title; |   const char *title; | ||||||
|   | |||||||
| @@ -20,6 +20,7 @@ bool init_window(window_t *wnd, const char *title, u64 width, u64 height) { | |||||||
|     return false; |     return false; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   wnd->id = SDL_GetWindowID(wnd->window); | ||||||
|   wnd->title = title; |   wnd->title = title; | ||||||
|   wnd->width = width; |   wnd->width = width; | ||||||
|   wnd->height = height; |   wnd->height = height; | ||||||
| @@ -38,7 +39,7 @@ void cleanup_window(window_t *wnd) { | |||||||
|     wnd->window = NULL; |     wnd->window = NULL; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   wnd->width = wnd->height = 0; |   wnd->width = wnd->height = wnd->id = 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| void set_colour(const window_t *wnd, colour_t colour) { | void set_colour(const window_t *wnd, colour_t colour) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user