If I start Steam before I launch my program, Steamworks::Initialize() will work fine and return true. But if I start the program, then start Steam, then call Steamworks::Initialize(), it will always return false (even if I keep calling it in a loop). Is this a known limitation?
It would be nice to be able to ask the user to hop on Steam from inside the game as opposed to forcing them to quit the program and restart it after Steam. But maybe I'm doing something wrong.
// If we haven't connected to Steam yet
if(gamestate==0)
{
context->DrawText("Start Steam to continue", 10, 10);
// If we've connected to Steam, go to next phase: having friends connect
if(Steamworks::Initialize()) gamestate=1;
else
{
printf("initialize fail\n");
Sleep(500); // Wait a bit between attempts to initialize Steam
}
}
(The Steam Overlay doesn't come up either.)