This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via ded09ff77c3cb7e8a5f0666434806f7be8aebf63 (commit) from a9450959b372c0d3c47b09b1714c7563808756ee (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/ded09ff77c3cb7e8a5f0666434806f7be8aeb...
commit ded09ff77c3cb7e8a5f0666434806f7be8aebf63 Author: Cyril Hrubis metan@ucw.cz Date: Fri Aug 10 22:43:02 2012 +0200
tests: Remove SDL based showimage.
Similar test already exists.
diff --git a/tests/SDL/Makefile b/tests/SDL/Makefile index 6f83335..c11568d 100644 --- a/tests/SDL/Makefile +++ b/tests/SDL/Makefile @@ -8,7 +8,7 @@ ifeq ($(HAVE_LIBSDL),yes) CSOURCES=$(shell echo *.c)
APPS=pixeltest fonttest linetest randomshapetest- symbolstest textaligntest trianglefps blittest subcontext showimage+ symbolstest textaligntest trianglefps blittest subcontext aatest mixpixeltest endif
diff --git a/tests/SDL/showimage.c b/tests/SDL/showimage.c deleted file mode 100644 index a63ba78..0000000 --- a/tests/SDL/showimage.c +++ /dev/null @@ -1,127 +0,0 @@ -/***************************************************************************** - * This file is part of gfxprim library. * - * * - * Gfxprim is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Lesser General Public * - * License as published by the Free Software Foundation; either * - * version 2.1 of the License, or (at your option) any later version. * - * * - * Gfxprim is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with gfxprim; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * Copyright (C) 2009-2011 Cyril Hrubis metan@ucw.cz * - * * - *****************************************************************************/ - -#include <stdlib.h> -#include <stdio.h> -#include <errno.h> -#include <SDL/SDL.h> - -#include "GP.h" -#include "GP_SDL.h" - -SDL_Surface *display = NULL; -GP_Context context, *bitmap; - -int brightness = 0; - -void event_loop(void) -{ - SDL_Event event; - GP_Context *res; - - while (SDL_WaitEvent(&event) > 0) { - - switch (event.type) { - - case SDL_KEYDOWN: - switch (event.key.keysym.sym) { - case SDLK_ESCAPE: - return; - case SDLK_UP: - brightness+=2; - case SDLK_DOWN: { - brightness-=1; - - GP_FILTER_PARAMS(bitmap->pixel_type, param); - GP_FilterParamSetIntAll(param, brightness); - res = GP_FilterBrightness(bitmap, NULL, param, NULL); - - printf("brightness = %i %ux%un", brightness, res->w, res->h); - - GP_Blit(res, 0, 0, res->w, res->h, &context, 0, 0); - SDL_Flip(display); - GP_ContextFree(res); - } break; - default: - break; - } - break; - case SDL_QUIT: - return; - default: - break; - } - } -} - -int main(int argc, char *argv[]) -{ - /* Bits per pixel to be set for the display surface. */ - int display_bpp = 0; - - int i; - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "-16") == 0) { - display_bpp = 16; - } - else if (strcmp(argv[i], "-24") == 0) { - display_bpp = 24; - } - else if (strcmp(argv[i], "-32") == 0) { - display_bpp = 32; - } - } - - GP_SetDebugLevel(10); - - if ((bitmap = GP_LoadImage(argv[1], NULL)) == NULL) { - fprintf(stderr, "Failed to load bitmap: %sn", strerror(errno)); - return 1; - } - - /* Initialize SDL */ - if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0) { - fprintf(stderr, "Could not initialize SDL: %sn", SDL_GetError()); - return 1; - } - - /* Create a window with a software back surface */ - display = SDL_SetVideoMode(bitmap->w, bitmap->h, display_bpp, SDL_SWSURFACE); - if (display == NULL) { - fprintf(stderr, "Could not open display: %sn", SDL_GetError()); - goto fail; - } - - GP_SDL_ContextFromSurface(&context, display); - - GP_Blit(bitmap, 0, 0, bitmap->w, bitmap->h, &context, 0, 0); - SDL_Flip(display); - - event_loop(); - - SDL_Quit(); - return 0; -fail: - SDL_Quit(); - return 1; -} -
-----------------------------------------------------------------------
Summary of changes: tests/SDL/Makefile | 2 +- tests/SDL/showimage.c | 127 ------------------------------------------------- 2 files changed, 1 insertions(+), 128 deletions(-) delete mode 100644 tests/SDL/showimage.c
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.