Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix for deleting the last uncommit character
Browse files Browse the repository at this point in the history
  • Loading branch information
jjgod committed Aug 12, 2010
1 parent dd9ba32 commit 1c48525
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/video/cocoa/SDL_cocoakeyboard.m
Expand Up @@ -144,6 +144,8 @@ - (void) unmarkText
{
[_markedText release];
_markedText = nil;

SDL_SendEditingText("", 0, 0);
}

- (NSRect) firstRectForCharacterRange: (NSRange) theRange
Expand Down
10 changes: 6 additions & 4 deletions test/testime.c
Expand Up @@ -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

Expand Down

0 comments on commit 1c48525

Please sign in to comment.