|
69 | 69 | // Ubuntu has left widget alignment/margin problem. |
70 | 70 | // NK_COLOR_SLIDER_CURSOR_ACTIVE not working linux? |
71 | 71 | // |
| 72 | +// Window Close dialog does not return on Cancel!! [Done] |
| 73 | +// |
| 74 | +//-lmingw32 |
| 75 | +// |
| 76 | +// Fix NK shutdown tasks!!! [Done] |
| 77 | + //nk_allegro5_del_image(logo);[Done] |
| 78 | + //nk_allegro5_del_image(backgrounds);[Done] |
| 79 | + //al_destroy_event_queue(event_queue);[Done] |
| 80 | + |
| 81 | + //nk_allegro5_shutdown();[Done] |
72 | 82 | //------------------------------------------------------------------------------ |
73 | 83 |
|
74 | 84 | #include <stdio.h> |
@@ -298,7 +308,7 @@ int main(void) |
298 | 308 | nk_input_end(ctx); |
299 | 309 |
|
300 | 310 | // GUI |
301 | | - //nk_theme(ctx, display, table, logo, &img_select, nk_bk_color, font, font_l, &alpha_flag, &alpha_all, &quit_app); |
| 311 | + nk_theme(ctx, display, table, logo, &img_select, nk_bk_color, font, font_l, &alpha_flag, &alpha_all, &quit_app); |
302 | 312 |
|
303 | 313 | // Draw |
304 | 314 |
|
@@ -334,13 +344,21 @@ int main(void) |
334 | 344 |
|
335 | 345 | } |
336 | 346 |
|
337 | | - // check cleanup tasks!! |
| 347 | + // Do cleanup tasks. |
338 | 348 | al_shutdown_native_dialog_addon(); |
339 | 349 | nk_allegro5_font_del(font); |
| 350 | + nk_allegro5_font_del(font_l); |
| 351 | + nk_allegro5_del_image(logo); |
340 | 352 | nk_allegro5_shutdown(); |
341 | | - al_destroy_display(display); // Is the order correct? |
342 | | - //nk_allegro5_del_image(logo); |
| 353 | + |
| 354 | + al_destroy_bitmap(icon); |
| 355 | + al_destroy_bitmap(background[0]); |
| 356 | + al_destroy_bitmap(background[1]); |
| 357 | + al_destroy_bitmap(background[2]); |
343 | 358 | al_destroy_event_queue(event_queue); |
| 359 | + al_destroy_display(display); |
| 360 | + al_uninstall_keyboard(); |
| 361 | + al_uninstall_mouse(); |
344 | 362 |
|
345 | 363 | return 0; |
346 | 364 | } |
|
0 commit comments