I am running the following and I get a "Program received signal SIGSEGV, Segmentation fault" error on the ScreenRes function call. I have searched this forum and saw similar topics. My code works if I put this at the top "SetEnviron("fbgfx=gdi"). I haven't tried updating the directX since it works in dxdiag (the tests) and that wouldn't allow me to know what's wrong. The old threads/topics mention that the problem should have been fixed prior to the version of FreeBASIC that I am running (see my version below).
Code: Select all
ScreenRes 1024,768,32
Print "Hello World"
Sleep
#0 0x00407ab3 in directx_exit ()
#1 0x00402eb5 in fb_hWin32Exit ()
#2 0x00401d4a in set_mode ()
#3 0x00402169 in fb_GfxScreenRes@24 ()
#4 0x00401352 in main (__FB_ARGC__=1, __FB_ARGV__=0x8724e8) at test.bas:4
I'm running Windows XP Pro SP3.
dxdiag shows this as the DirectX Version: DirectX 9.0c (4.09.0000.0904)
FreeBASIC Compiler - Version 0.20.0 (08-10-2008) for win32 (target:win32)
Copyright (C) 2004-2008 The FreeBASIC development team.
Configured as standalone
Any ideas?[/code]