mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added code page setting for the console window
This commit is contained in:
@@ -900,3 +900,6 @@ ConsoleWindow=0
|
||||
|
||||
;Console window position and size data. Do not modify
|
||||
ConsoleWindowData=
|
||||
|
||||
;Set the code page for the console window (Default is your system code page)
|
||||
ConsoleCodePage=0
|
||||
|
||||
@@ -133,6 +133,9 @@ void ConsoleWindow::init() {
|
||||
dlog_f("Failed to allocate console: 0x%x\n", DL_MAIN, GetLastError());
|
||||
return;
|
||||
}
|
||||
int cp = IniReader::GetIntDefaultConfig("Debugging", "ConsoleCodePage", 0);
|
||||
if (cp > 0) SetConsoleOutputCP(cp);
|
||||
|
||||
freopen("CONOUT$", "w", stdout); // this allows to print to console via std::cout
|
||||
|
||||
if (_mode & ConsoleSource::GAME) {
|
||||
|
||||
@@ -375,7 +375,6 @@ static void __stdcall NewGame_Before() {
|
||||
}
|
||||
|
||||
static void __stdcall NewGame_After() {
|
||||
dlogr("New Game started.", DL_MAIN);
|
||||
// OnAfterNewGame
|
||||
if (HeroAppearance::appModEnabled) {
|
||||
SetNewCharAppearanceGlobals();
|
||||
@@ -383,6 +382,7 @@ static void __stdcall NewGame_After() {
|
||||
}
|
||||
RunOnAfterGameStarted();
|
||||
gameLoaded = true;
|
||||
dlogr("New Game started.", DL_MAIN);
|
||||
}
|
||||
|
||||
static void __declspec(naked) main_load_new_hook() {
|
||||
|
||||
Reference in New Issue
Block a user