| Summary: | SDL_TEXTEDITINGEVENT_TEXT_SIZE is too small for Japanese | ||
|---|---|---|---|
| Product: | SDL | Reporter: | tamo <ttakah+sdl> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
increase buffer size
malloc the text, hoping it will be freed |
||
|
Description
tamo
2019-08-28 00:03:33 UTC
Created attachment 3934 [details]
increase buffer size
I attached a file, but it is not ready for building. Without quite a big change in code, the buffer size cannot be increased over 36. (struct size limit is 56, and SDL_TextEditingEvent has 5 Uint32s, so 56-5*4==36) Can you consider a malloc/free or some better ways to get larger size? 36 is much better than 32, but we need more. Created attachment 3939 [details]
malloc the text, hoping it will be freed
I successfully built SDL2.dll with this patch and tried testime.exe on Windows.
This works for me. But take it as a PoC, not a finished work. I don't know anything about its performance impact, API breakage, or how to implement the same change for other platforms.
|