Created
May 29, 2018 20:18
-
-
Save andymasteroffish/8dd5c1370b6f8de490cc49679717e191 to your computer and use it in GitHub Desktop.
openFrameworks function to launch an exe used for Dream BoxXx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ofApp::launchExe(string path) { | |
if (isFullScreened()) { | |
ofToggleFullscreen(); | |
} | |
std::wstring pathTemp = std::wstring(path.begin(), path.end()); | |
LPCWSTR pathLPC = pathTemp.c_str(); | |
string command = "open"; | |
std::wstring commandTemp = std::wstring(command.begin(), command.end()); | |
LPCWSTR commandLPC = commandTemp.c_str(); | |
ShellExecute(NULL, commandLPC, pathLPC, NULL, NULL, SW_SHOWDEFAULT); | |
canSelectGame = false; | |
if (closeAfterLaunchingGame) { | |
ofExit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment