I'm new to SDL programming, the only programs I have made before are console based apllications that only use the standard c/c++ libarays, I'm adding the finishing touches to my chip8 emu that I completed everthing but the display and input of ( simply because I didn't know how ). Anyway I have finished the display, but I'm having trouble with the input, I can poll an event of input from the main function where I have a loop that polls events and is also where the cpu function is called, but if I declare an event in anouther function or use the one declared in main (through pointers), for some reson when I poll it a keypress is not detected, in this function as it is in the main loop. I need this poll in the main loop to detect the esc key for exit.
ADDED: I've found if I put a delay in the function it can be deected but it slows my emu to much, I'm guessing the input is missed by the function and captured by the main loop poll, is there someway this can be avoided.
Can someone please refure my to some guides/tutorials or simply give me some advice.
Thanks in advance TJA.
ADDED: I've found if I put a delay in the function it can be deected but it slows my emu to much, I'm guessing the input is missed by the function and captured by the main loop poll, is there someway this can be avoided.
Can someone please refure my to some guides/tutorials or simply give me some advice.
Thanks in advance TJA.
Last edited: