Mercurial > hg > dmlib
changeset 739:8bf67daf4030
Fix more tests.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 21 Apr 2013 20:40:54 +0300 |
parents | 485bbb2e7deb |
children | 48c48e94d87f |
files | tests/efu.c tests/evaltest.c |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/efu.c Sun Apr 21 20:39:14 2013 +0300 +++ b/tests/efu.c Sun Apr 21 20:40:54 2013 +0300 @@ -280,8 +280,9 @@ TTF_Font *font = NULL; SDL_Color fontcol={255,155,155,0}; SDL_Event event; - int mouseX, mouseY; + int mouseX, mouseY, res; BOOL initSDL = FALSE, initTTF = FALSE, exitFlag, showMap = FALSE; + DMResource *file; if (!dmArgsProcess(argc, argv, optList, optListN, argHandleOpt, NULL, FALSE)) @@ -312,14 +313,13 @@ TTF_SetFontStyle(font, TTF_STYLE_NORMAL); - DMResource *res = dmf_create_stdio(optBitmapFilename, "rb"); - if (res == NULL) + if ((res = dmf_create_stdio(optBitmapFilename, "rb", &file)) != DMERR_OK) { dmError("Could not open resource file '%s'.\n", optBitmapFilename); goto error_exit; } - logo = dmLoadImage(res); - dmf_close(res); + logo = dmLoadImage(file); + dmf_close(file); if (logo == NULL) { dmError("Could not load image file '%s'.\n", optBitmapFilename);