Skip to content
This repository was archived by the owner on Oct 26, 2019. It is now read-only.

Commit d20c6f1

Browse files
committed
Changed ui of console
- Icon now loads correctly for console - Set a Redacted logo header bitmap - Fixed some thread stuff on initialization ( we were missing some initial prints ) - Changed console font
1 parent 7f8349d commit d20c6f1

File tree

7 files changed

+27
-7
lines changed

7 files changed

+27
-7
lines changed

MainWindow.rc

740 Bytes
Binary file not shown.

RedactedLogo.bmp

37.6 KB
Binary file not shown.

Source/Utility/WinConsole/WinConsole.cpp

+13-5
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ static HMODULE GetThisDllHandle()
5858

5959
DWORD _stdcall WinConsole::ConsoleThread(void *lparam)
6060
{
61+
ThreadSafe.lock();
6162
//HMODULE Module = GetModuleHandle(NULL);
6263
//HACKY HACK HACK
6364
HMODULE Module = GetThisDllHandle();
@@ -67,7 +68,7 @@ DWORD _stdcall WinConsole::ConsoleThread(void *lparam)
6768
(DLGPROC)DialogProc);
6869

6970
ShowWindow(aDiag, SW_SHOW);
70-
71+
ThreadSafe.unlock();
7172
MSG msg;
7273
while (GetMessage(&msg, 0, 0, 0)){
7374
TranslateMessage(&msg);
@@ -112,12 +113,13 @@ bool WinConsole::InitializeConsole(const char *Logfilename)
112113
// People using steams BigPicture mode doesn't like consoles.
113114
if (!strstr(GetCommandLineA(), "-nocon"))
114115
{
116+
ThreadSafe.lock();
115117
HANDLE td = CreateThread(NULL, NULL, ConsoleThread, NULL, NULL, NULL);
116-
118+
ThreadSafe.unlock();
117119
//does not work
118120
//HANDLE tout = CreateThread(NULL, NULL, StdOutThread, NULL, NULL, NULL);
119121
}
120-
122+
121123
// Check if we should use a logfile.
122124
if (Logfilename != nullptr)
123125
{
@@ -140,7 +142,7 @@ bool WinConsole::InitializeConsole(const char *Logfilename)
140142
return true;
141143
}
142144
}
143-
145+
144146
return !LogToFile;
145147
}
146148

@@ -306,9 +308,15 @@ BOOL WinConsole::OnDlgInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
306308
HWND hSta = GetDlgItem(hwnd, IDC_EDIT2);
307309
oldEditProc = (WNDPROC)SetWindowLongPtr(hSta, GWLP_WNDPROC, (LONG_PTR)subEditProc);
308310

309-
HICON t = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON2));
311+
HICON t = LoadIcon(GetThisDllHandle(), MAKEINTRESOURCE(IDI_ICON2));
310312
SendMessageA(hwnd, WM_SETICON, ICON_BIG, (LPARAM)t);
311313

314+
HWND headerLogoHWND = GetDlgItem(hwnd, IDC_STATIC2);
315+
316+
/*LONG lStyle = GetWindowLong(hwnd, GWL_STYLE);
317+
lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
318+
SetWindowLong(hwnd, GWL_STYLE, lStyle);*/
319+
312320
return TRUE;
313321
}
314322

SteamBase.vcxproj

+3
Original file line numberDiff line numberDiff line change
@@ -514,14 +514,17 @@
514514
<ClCompile Include="Source\Utility\WinConsole\WinConsole.cpp" />
515515
</ItemGroup>
516516
<ItemGroup>
517+
<None Include="resource.hm" />
517518
<None Include="Source\JSON\json_valueiterator.inl" />
518519
<None Include="Source\JSON\version.h.in" />
519520
</ItemGroup>
520521
<ItemGroup>
521522
<ResourceCompile Include="MainWindow.rc" />
522523
</ItemGroup>
523524
<ItemGroup>
525+
<Image Include="bitmap1.bmp" />
524526
<Image Include="redacted.ico" />
527+
<Image Include="RedactedLogo.bmp" />
525528
</ItemGroup>
526529
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
527530
<ImportGroup Label="ExtensionTargets">

SteamBase.vcxproj.filters

+11-2
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@
900900
<ClInclude Include="Source\Steam\ConsoleCommandHandler.h">
901901
<Filter>Header Files</Filter>
902902
</ClInclude>
903-
<ClInclude Include="Source\Plugin\Handler\HandlerManager.h">
903+
<ClInclude Include="Source\Plugin\Handler\HandlerManager.h">
904904
<Filter>Header Files</Filter>
905905
</ClInclude>
906906
</ItemGroup>
@@ -1010,7 +1010,7 @@
10101010
<ClCompile Include="Source\Steam\ConsoleCommandHandler.cpp">
10111011
<Filter>Source Files</Filter>
10121012
</ClCompile>
1013-
<ClCompile Include="Source\Plugin\Handler\HandlerManager.cpp">
1013+
<ClCompile Include="Source\Plugin\Handler\HandlerManager.cpp">
10141014
<Filter>Source Files</Filter>
10151015
</ClCompile>
10161016
</ItemGroup>
@@ -1021,6 +1021,9 @@
10211021
<None Include="Source\JSON\version.h.in">
10221022
<Filter>Header Files\JSON</Filter>
10231023
</None>
1024+
<None Include="resource.hm">
1025+
<Filter>Header Files</Filter>
1026+
</None>
10241027
</ItemGroup>
10251028
<ItemGroup>
10261029
<ResourceCompile Include="MainWindow.rc">
@@ -1031,5 +1034,11 @@
10311034
<Image Include="redacted.ico">
10321035
<Filter>Resource Files</Filter>
10331036
</Image>
1037+
<Image Include="bitmap1.bmp">
1038+
<Filter>Resource Files</Filter>
1039+
</Image>
1040+
<Image Include="RedactedLogo.bmp">
1041+
<Filter>Resource Files</Filter>
1042+
</Image>
10341043
</ItemGroup>
10351044
</Project>

resource.h

152 Bytes
Binary file not shown.

resource.hm

314 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)