Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Commit

Permalink
Made window title more portable.
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianKniephoff committed Jan 17, 2011
1 parent e83bc51 commit 0f7c43c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 279 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ image.jpg
cmake_install.cmake
CMakeFiles
CMakeCache.txt
Makefile
271 changes: 0 additions & 271 deletions Makefile

This file was deleted.

3 changes: 1 addition & 2 deletions energy_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ float
gradient_magnitude (Uint8 * image, int w, int h, int x, int y)
{
Uint8 *pixel;
Uint8 l1, l2;
float ddx, ddy;
float l1, l2, ddx, ddy;
/* TODO Better handling of the borders... */
/* d/dx */
if (x == 0)
Expand Down
8 changes: 2 additions & 6 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,9 @@ main (int argc, char *argv[])
fprintf (stderr, "Could not initialize SDL: %s\n", SDL_GetError ());
return (EXIT_FAILURE);
}
char *title;
asprintf (&title, "seamless - %s", image_path);
char title[FILENAME_MAX];
sprintf (title, "seamless - %s", image_path);
SDL_WM_SetCaption (title, title);
if (title)
{
free (title);
}
if (IMG_Init (0))
{
fprintf (stderr, "Could not initialize SDL_image: %s\n",
Expand Down

0 comments on commit 0f7c43c

Please sign in to comment.