You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reasoning behind this is that you can launch the game from the CLI and the Console Data will be sent to the Console who started the game (if any) instead of making a new console on launch.
You can attach to the parent process by calling AttachConsole(ATTACH_PARENT_PROCESS);
The function returns true on success, and false if there's no parent console (eg. the user double-clicked the program and launched it)
The proposed change can be made like this:
voidModLoader::OpenTerminal()
{
if (AttachConsole(ATTACH_PARENT_PROCESS) || AllocConsole())
{
freopen_s((FILE**)stdout, "CONOUT$", "w", stdout);
SetWindowText(GetConsoleWindow(), "Elden Mod Loader");
}
}
The text was updated successfully, but these errors were encountered:
Hi, in ModLoader.cpp#L135
BOOL
AllocConsole is called.An alternate proposal is to call
BOOL
AttachConsole first, then if that fails call AllocConsole.The reasoning behind this is that you can launch the game from the CLI and the Console Data will be sent to the Console who started the game (if any) instead of making a new console on launch.
You can attach to the parent process by calling
AttachConsole(ATTACH_PARENT_PROCESS);
The function returns
true
on success, andfalse
if there's no parent console (eg. the user double-clicked the program and launched it)The proposed change can be made like this:
The text was updated successfully, but these errors were encountered: