Skip to content

Commit

Permalink
Further work on getting alt codes working
Browse files Browse the repository at this point in the history
More testing required, but SDL_iconv_utf8_ucs4() seems to do the trick!
  • Loading branch information
bradharding committed Jan 15, 2023
1 parent 68cbba8 commit ca7f8ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/i_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ static void I_GetEvent(void)
case SDL_TEXTINPUT:
{
ev.type = ev_textinput;
ev.data1 = Event->text.text[strlen(Event->text.text) - 1];
ev.data1 = ((char *)SDL_iconv_utf8_ucs4(Event->text.text))[0];

This comment has been minimized.

Copy link
@devnexen

devnexen Feb 15, 2023

Contributor

Unfortunately it seems to be buggy, just checked with Doom 2, SDL_iconv_utf8_ucs4 return NULL constantly here. Also side note if I read correctly the doc, it s dynamically allocated otherwise.

This comment has been minimized.

Copy link
@bradharding

bradharding Feb 16, 2023

Author Owner

Ah! Thanks David! This'll likely be the cause of issue #766 then. I'll work on checking if SDL_iconv_utf8_ucs4 is NULL.

D_PostEvent(&ev);
break;
}
Expand Down

0 comments on commit ca7f8ba

Please sign in to comment.