Qbasicnews.com

Full Version: Is examples\sdltest3.bas crashing on anyone else?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Compiled with FB 0.07b. I'm using it with the latest version (1.2.7) of SDL.dll

It crashes with an exception, ie Windows XP shows that "the application has encountered a problem and needs to close. [...] Please tell Microsoft about this problem. [...] (Send) (Don't Send)" dialog. Would the exception info be at all useful?
It just terminates for me, no error. Program just closes.

Win98

Compiled with 0.07b

Latest SDL
Yeah, it's cuz it's not checking if the surface actually got locked or not in doRender.

Changing SDL_LockSurface( screen ) to
Code:
    if ( SDL_LockSurface( screen ) = 0 ) then
        exit sub
    end if

Will keep it from crashing, but it won't draw anything cuz the surface isn't getting locked. And i dunno why lock fails.
Ok, v0.06b worked fine, 0.07b fails.

SDL_LockSurface (screen)


My project debug file:
00:33:55 - Program Started
00:33:56 - SDL Init called: 0
00:33:56 - SDL SetVideoMode called: 7735648
00:33:56 - Entering main loop


And the first thing it does in the mainloop is locking the surface.
The program just bailed out cause i added the code you gave Blitz, if I don't have that the screen just remains black, with the mouse on it (SDL fullscreen app)
And everything works fine, except it wont draw anything.
It works for me, i used SDL_HWSURFACE instead of SDL_DOUBLEBUF to test something - can't remember now.

Probably that will create a primary surface that is not lockable on certain cards? Dunno, i know nothing about of SDL.
I was wrong, 0 means that it was locked. -1 means that it failed. The asm output looks correct. Dunno what's wrong.
Found it, pitch is an unsigned short, not an integer..

Code:
Uint16 pitch;                /* Read-only */

So the "pitch" field SDL_Surface at sdl/sdlvideo.bi has to be changed to:

Code:
pitch as ushort


Stop drinking german beer while coding, marzec - see, no smiles.
There's more. The SDL_Rect struct's members should be shorts/ushort instead of integers.
Told ya. ;*)

Marzec, Lessen the beer. :*)
oh just be happy that somebody was so stupid to port the headers anyway. see no smilies... uh and i don't drink german beer, i live in freaking austria stupid brazilian chinchilla bitch
Pages: 1 2