Do you load the DLL dinamycally in your code? Or do you use the
.lib? If the latter is your option, you should recompile with the .lib
matching the new version. Probably the addresses of the functions don’t
match if you’ve changed the DLL. You can use the implib utility (I use the
borland compiler and this utility comes with the bundle). I had similar
problems using the wrong .lib when changing the dll versions.
Let us know if that was the problem.++++++++++++++++++++++++++++++++
ALBERT FERNANDEZ MARSAL
CIRSA INTERACTIVE CORP. SL
Analista senior y programador
++++++++++++++++++++++++++++++++
-----Mensaje original-----
De: sdl-bounces+afmarsal=cirsa.com at libsdl.org
[mailto:sdl-bounces+afmarsal=cirsa.com at libsdl.org] En nombre de SkunkGuru
Enviado el: mi?rcoles, 02 de noviembre de 2005 22:09
Para: sdl at libsdl.org
Asunto: [SDL] Strange SDL_TTF problem (repost)
(I hope that all the list receives this message,
this time… let me know if it’s ok)
I have a small game that uses SDL and SDL_TTF.
With official SDL_TTF DLL v2.0.6 it’s ok.
With official SDL_TTF DLL v2.0.7 I notice
that texts are not very good-looking…
I don’t know how to explain the problem,
so I attach 2 samples (only 6kb)…
bad.png is with SDL_ttf v2.0.7
good.png is with SDL_ttf v2.0.6
I get this by only replacing the DLL file…
(no changes in code, no changes in other DLL)
I tryed with my compiled program (.exe)
- one folder with the .exe and the old DLL
- one folder with the .exe and the new DLL
(and the same sdl.dll and font.tff)
I run the programs, and take the snapshots
My system is WindowsXP.
I’ve also tryed both SDL.dll v1.2.8
and SDL.dll v1.2.9 with the same problem.
(official dll files from devel package)
This is a minimal program…
and I still get the same problem…
I’ve also tryed changing the font file
#include “SDL.h”
#include “SDL_TTF.h”
int main( int argc, char* argv[] )
{
SDL_Init(SDL_INIT_VIDEO);
TTF_Init();
SDL_Surface* screen = SDL_SetVideoMode(640, 480, 0, SDL_SWSURFACE);
TTF_Font* Font = TTF_OpenFont("font.ttf", 16);
TTF_SetFontStyle(Font, TTF_STYLE_NORMAL);
SDL_Color myCol;
myCol.r = 255; myCol.g = 255; myCol.b = 255;
SDL_Surface* Surface2 = TTF_RenderText_Solid(Font, "this is a test
string" , myCol);
SDL_Rect myRect;
myRect.x = 320;
myRect.y = 240;
SDL_BlitSurface(Surface2, NULL, screen, &myRect);
SDL_Flip(screen);
SDL_Delay(2000);
return 0;
}
Any idea ?
Thanks!