mirror of
https://github.com/yawut/SDL.git
synced 2026-07-19 01:11:38 -05:00
Fix for deleting the last uncommit character
This commit is contained in:
parent
40a17f8980
commit
885a15db6b
|
|
@ -144,6 +144,8 @@
|
|||
{
|
||||
[_markedText release];
|
||||
_markedText = nil;
|
||||
|
||||
SDL_SendEditingText("", 0, 0);
|
||||
}
|
||||
|
||||
- (NSRect) firstRectForCharacterRange: (NSRange) theRange
|
||||
|
|
|
|||
|
|
@ -136,11 +136,13 @@ static void RenderText(SDL_Surface *sur,
|
|||
int x, int y,
|
||||
SDL_Color color)
|
||||
{
|
||||
SDL_Surface *textSur = TTF_RenderUTF8_Blended(font, text, color);
|
||||
SDL_Rect dest = { x, y, textSur->w, textSur->h };
|
||||
if (text && strlen(text)) {
|
||||
SDL_Surface *textSur = TTF_RenderUTF8_Blended(font, text, color);
|
||||
SDL_Rect dest = { x, y, textSur->w, textSur->h };
|
||||
|
||||
SDL_BlitSurface(textSur, NULL, sur, &dest);
|
||||
SDL_FreeSurface(textSur);
|
||||
SDL_BlitSurface(textSur, NULL, sur, &dest);
|
||||
SDL_FreeSurface(textSur);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user