Mercurial > hg > dmlib
diff tests/blittest.c @ 958:985225a93aeb
Add error code parameter to dmError() and dmErrorVA().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 27 Feb 2015 03:58:25 +0200 |
parents | 90a879277ca2 |
children | 186cf6a7d634 |
line wrap: on
line diff
--- a/tests/blittest.c Fri Feb 27 02:21:57 2015 +0200 +++ b/tests/blittest.c Fri Feb 27 03:58:25 2015 +0200 @@ -61,7 +61,7 @@ { if (w < 320 || h < 200 || w > 3200 || h > 3200) { - dmError("Invalid width or height: %d x %d\n", w, h); + dmErrorMsg("Invalid width or height: %d x %d\n", w, h); return FALSE; } optScrWidth = w; @@ -69,7 +69,7 @@ } else { - dmError("Invalid size argument '%s'.\n", optArg); + dmErrorMsg("Invalid size argument '%s'.\n", optArg); return FALSE; } } @@ -80,7 +80,7 @@ break; default: - dmError("Unknown option '%s'.\n", currArg); + dmErrorMsg("Unknown option '%s'.\n", currArg); return FALSE; } @@ -115,7 +115,7 @@ *screen = SDL_SetVideoMode(optScrWidth, optScrHeight, optScrDepth, optVFlags | SDL_RESIZABLE); if (*screen == NULL) { - dmError("Can't SDL_SetVideoMode(): %s\n", SDL_GetError()); + dmErrorMsg("Can't SDL_SetVideoMode(): %s\n", SDL_GetError()); return FALSE; } @@ -295,7 +295,7 @@ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0) { - dmError("Could not initialize SDL: %s\n", SDL_GetError()); + dmErrorMsg("Could not initialize SDL: %s\n", SDL_GetError()); goto error_exit; } initSDL = TRUE; @@ -303,7 +303,7 @@ if (TTF_Init() < 0) { - dmError("Could not initialize FreeType/TTF: %s\n", SDL_GetError()); + dmErrorMsg("Could not initialize FreeType/TTF: %s\n", SDL_GetError()); goto error_exit; } initTTF = TRUE; @@ -311,7 +311,7 @@ font = TTF_OpenFont(optFontFile, optFontSize); if (font == NULL) { - dmError("Could not load TTF font '%s' (%d): %s\n", + dmErrorMsg("Could not load TTF font '%s' (%d): %s\n", optFontFile, optFontSize, SDL_GetError()); goto error_exit; } @@ -322,7 +322,7 @@ screen = SDL_CreateRGBSurface(SDL_SWSURFACE, optScrWidth, optScrHeight, optScrDepth, 0, 0, 0, 0); if (screen == NULL) { - dmError("Could not create screen surface.\n"); + dmErrorMsg("Could not create screen surface.\n"); goto error_exit; } @@ -402,7 +402,7 @@ if (!optBenchmark && SDL_MUSTLOCK(screen) != 0 && SDL_LockSurface(screen) != 0) { - dmError("Can't lock surface.\n"); + dmErrorMsg("Can't lock surface.\n"); goto error_exit; }