Hi,
Has anybody used threads with PocketFrog?
I'm trying to kick off a thread to read data out of files and blit information to a surface that the game loop is blitting to the display.
I've tried this:
where the update() function is defined as:
I get a compiler error, "error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__cdecl *)(void *)'
None of the functions with this name in scope match the target type"
This is my first time to try any threaded programming, so I'm sure I'm doing something wrong. Anybody have any suggestions? I'm missing something in my definition of update?
Thanks,
Pam
Has anybody used threads with PocketFrog?
I'm trying to kick off a thread to read data out of files and blit information to a surface that the game loop is blitting to the display.
I've tried this:
- Code:
m_thread = CreateThread(NULL, 0, update, 0, &m_threadId);
where the update() function is defined as:
- Code:
DWORD update(LPVOID lpvoid)
I get a compiler error, "error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__cdecl *)(void *)'
None of the functions with this name in scope match the target type"
This is my first time to try any threaded programming, so I'm sure I'm doing something wrong. Anybody have any suggestions? I'm missing something in my definition of update?
Thanks,
Pam