Quote Originally Posted by GordonShumway
I would like to know though why I had to create an AnsiString only to cast it back to PChar, shouldn't I just have been able to type in the name? Which by default would have been a wide char anyway. Maybe I just don't understand the differences between the Unicode and Ansi encoding. (It sucks being a noob )
I previously used Delphi 6 and now I'm using Lazarus. With both I could directly pass a string argument to SDL_LoadBMP

[pascal]
surface := SDL_LoadBMP('bitmap.bmp');
[/pascal]

But doing it with a string variable requires you to make it a pointer:

[pascal]
var
sFilename: String;
...

surface := SDL_LoadBMP(PChar(sFilename));
[/pascal]

Thats where I made most of my mistakes... lol .