Skip to content

Commit

Permalink
changed input reset time, updated project structs after init (they we…
Browse files Browse the repository at this point in the history
…re getting leaked before)
  • Loading branch information
LucAlexander committed Oct 11, 2022
1 parent 7a015a1 commit c506613
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion graphicsutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ void loadFont(GraphicsHandler* ghandle, const char* src, const char* name){
printf("[!] font with name \'%s\' already loaded\n%s\n", src, SDL_GetError());
return;
}
f = TTF_OpenFont(src, 8);
f = TTF_OpenFont(src, 16);
if (f == NULL){
TTF_CloseFont(f);
f = NULL;
Expand Down
3 changes: 2 additions & 1 deletion xi.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ void xi_init(program_state* state){
xi_entities_spawn(&xi);
xisetup(state, &xi);
xistart(&xi);
state->project = xi.project;
}

void xi_persistent(SYSTEM_ARG_REQUIREMENTS){
Expand Down Expand Up @@ -175,11 +176,11 @@ void do_frame_try(program_state* state){
xi_run_system_group(state, XI_STATE_UPDATE_PRE);
xi_run_system_group(state, XI_STATE_UPDATE);
xi_run_system_group(state, XI_STATE_UPDATE_POST);
newInputFrame(&state->user_input);
renderClear(&state->graphics);
renderSetColor(&state->graphics, 0, 0, 0, 255);
xi_run_system_group_queued(state, XI_STATE_RENDER);
renderFlip(&state->graphics);
newInputFrame(&state->user_input);
tick_reset(state);
}

Expand Down

0 comments on commit c506613

Please sign in to comment.