1.1 --- a/src/context.c Tue Nov 07 21:13:04 2023 +0100 1.2 +++ b/src/context.c Tue Nov 07 21:24:06 2023 +0100 1.3 @@ -39,7 +39,7 @@ 1.4 void asc_context_initialize(void) { 1.5 if (asc_test_flag(asc_context.flags, ASC_FLAG_INITILIZED)) 1.6 return; 1.7 - asc_clear_flag(&asc_context.flags, ASC_FLAG_HAS_ERROR); 1.8 + memset(&asc_context, 0, sizeof(AscContext)); 1.9 1.10 // initialize error buffer 1.11 cxBufferInit( 1.12 @@ -50,9 +50,6 @@ 1.13 CX_BUFFER_AUTO_EXTEND 1.14 ); 1.15 1.16 - // initialize data 1.17 - memset(asc_context.windows, 0, sizeof (asc_context.windows)); 1.18 - 1.19 // initialize SDL 1.20 if (SDL_Init(SDL_INIT_VIDEO) < 0) { 1.21 asc_error(SDL_GetError()); 1.22 @@ -71,6 +68,7 @@ 1.23 for (unsigned int i = 0 ; i < ASC_MAX_WINDOWS ; i++) { 1.24 asc_window_destroy(&asc_context.windows[i]); 1.25 } 1.26 + asc_font_cache_clear(); 1.27 1.28 // quit SDL 1.29 if (TTF_WasInit())