View Single Post
  #1270  
Old 05-03-2013, 00:09
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,836
Thanks: 20
Thanked 342 Times in 224 Posts
Joe Forster/STA is on a distinguished road
Quote:
Originally Posted by mausschieber View Post
my videocard has 4GB

bsp://================= Videocard =================//
VidRam:=GetVidMemLocal/1000000;
Good question! This function returns an Integer which is, probably, 32 bit unsigned (max. 4GB - 1) or, even more probably, 31 bit signed (min. -2GB, max. 2GB - 1). I think you'd have problems even with a 2 GB vieo card as this function will return 0 (or a negative value?) for them.

Try to print the return value of the GetVidMemLocal function onto the screen. I think you'll get zero. Perhaps, adding this as the first condition:

Code:
if VidRam=0 then vr:=1024
else [...]
would help as all video cards have video RAM (onboard or system shared) anyway so zero is never a valid value.
__________________
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!
The Following User Says Thank You to Joe Forster/STA For This Useful Post:
mausschieber (05-03-2013)