Hi,
I am trying to create an App Launcher with SFML for launching my games. I am using CreateProcess to launch a game. So far I've discovered that when my app has sf::Style::Default, game launched by CreateProcess (namely FTL) will go to fullscreen and play just fine. Unfortunately, when my app has sf::Style::Fullscreen, FTL will run in fullscreen, in foreground, has focus, will apply alternate style to mouse cursor, but nothing draws on the screen. Music plays, I can even click buttons (and exit FTL), but I can't see anything. I've tried to unset visibility of sfml window with setVisibility(false), but it didn't helped. Also I didn't find function to disable and reenable fullscreen.
Can you please help? Thanks in advance. App launching code:
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi));
if (!CreateProcess("FTLGame.exe", NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
printf("CreateProcess failed (%d).\n", GetLastError());
}
else {
printf("Prcess Creation Success");
}
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);