Re: SDL2 Init Problem

new topic     » goto parent     » topic index » view thread      » older message » newer message
Lone_EverGreen_Ranger said...

Hello,

After having got my wrapper to open the DLL correctly, I am now having another issue. It appears SDL is not being initialized for whatever reason. However when I tried another function from the wrapper, it worked correctly. I'll post my code below.

Wrapper code:

public constant SDL_INIT_TIMER = 000000001 
public constant	SDL_INIT_AUDIO = 000000010 
public constant	SDL_INIT_VIDEO = 000000020 
public constant	SDL_INIT_JOYSTICK = 000000200 
public constant	SDL_INIT_HAPTIC = 000001000 
public constant	SDL_INIT_GAMECONTROLLER = 000002000 
public constant SDL_INIT_NOPARACHUTE = 000100000 
public constant	SDL_INIT_EVERYTHING = #0000FFFF 

Most of your flags are wrong. E.g., SDL_INIT_VIDEO isn't 20 but #000000020 or 32 in decimal.

Only SDL_INIT_TIMER (because 1 is the same in decimal or hexadecimal) and SDL_INIT_EVERYTHING (which is specified in hexadecimal format) are correct.

Lone_EverGreen_Ranger said...

Test Program: It is saying SDL is not being initailized, but it shows the correct number of CPUs.

Probably, SDL_GetCpuCount() can be called before SDL's initialization. This function doesn't look like it fits into the categories of VIDEO, AUDIO, JOYSTICK, HAPTIC, TIMER, etc.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu