mirror of
https://github.com/yawut/SDL.git
synced 2026-08-24 09:45:09 -05:00
Fix for deleting the last uncommit character
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user