Re: sdl2 and ffi

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Greg

running this :

--Show CPU Info Demo 
 
include std/ffi.e 
include sdl.e 
 
puts(1,"1 Means True, 0 Means False\n") 
 
printf(1,"CPU Count: %d\n",{SDL_GetCPUCount() }) 
printf(1,"Cache Line Size: %d\n",{SDL_GetCPUCacheLineSize() }) 
printf(1,"Has RDTSC: %d\n",{SDL_HasRDTSC() }) 
printf(1,"Has AtltiVec: %d\n",{SDL_HasAltiVec() }) 
printf(1,"Has MMX:%d\n",{SDL_HasMMX() }) 
printf(1,"Has 3D Now:%d\n",{SDL_Has3DNow() }) 
printf(1,"Has SSE:%d\n",{SDL_HasSSE() }) 
printf(1,"Has SSE2:%d\n",{SDL_HasSSE2() }) 
printf(1,"Has SSE3:%d\n",{SDL_HasSSE3() }) 
printf(1,"Has SSE41:%d\n",{SDL_HasSSE41() }) 
printf(1,"Has SSE42:%d\n",{SDL_HasSSE42() }) 
printf(1,"Has AVX:%d\n",{SDL_HasAVX() }) 
printf(1,"Has AVX2:%d\n",{SDL_HasAVX2() }) 
printf(1,"Has AVX512F:%d\n",{SDL_HasAVX512F() }) 
printf(1,"Has ARMSIMD:%d\n",{SDL_HasARMSIMD() }) 
printf(1,"Has NEON:%d\n",{SDL_HasNEON() }) 
printf(1,"Has LSX:%d\n",{SDL_HasLSX() }) 
printf(1,"Has LASX:%d\n",{SDL_HasLASX() }) 
printf(1,"RAM: %d\n",{SDL_GetSystemRAM() }) 
 

produces this

C:\EuProgramming\Euphoria4_1\libffi-euphoria\include\std\ffi.e:910 in function c_func()  
attempt to subscript an atom 
(reading from it) - in assignment to 'fn'  
    rid = 1 
 

because, in ffi.e

override function c_func( integer rid, sequence args ) 
 
	if rid > 0 then 
		return eu:c_func( rid, args ) 
	end if 
 
	rid = rid * -1 
 
	atom fn       = m_funcs[rid][1]           --<-- rid was passed as an integer 
	atom cif      = m_funcs[rid][2] 
	sequence name = m_funcs[rid][3] 
 

Cheers, Chris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu