Cast UINT to WORD to appease warning
* Additional minor cleanups
This commit is contained in:
parent
f52a769761
commit
3e0af6ca36
11
src/Root.cpp
11
src/Root.cpp
@ -101,9 +101,8 @@ void cRoot::InputThread(cRoot & a_Params)
|
|||||||
void cRoot::Start(std::unique_ptr<cSettingsRepositoryInterface> a_OverridesRepo)
|
void cRoot::Start(std::unique_ptr<cSettingsRepositoryInterface> a_OverridesRepo)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HWND hwnd = GetConsoleWindow();
|
HMENU ConsoleMenu = GetSystemMenu(GetConsoleWindow(), FALSE);
|
||||||
HMENU hmenu = GetSystemMenu(hwnd, FALSE);
|
EnableMenuItem(ConsoleMenu, SC_CLOSE, MF_GRAYED); // Disable close button when starting up; it causes problems with our CTRL-CLOSE handling
|
||||||
EnableMenuItem(hmenu, SC_CLOSE, MF_GRAYED); // Disable close button when starting up; it causes problems with our CTRL-CLOSE handling
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cLogger::cListener * consoleLogListener = MakeConsoleListener(m_RunAsService);
|
cLogger::cListener * consoleLogListener = MakeConsoleListener(m_RunAsService);
|
||||||
@ -212,7 +211,7 @@ void cRoot::Start(std::unique_ptr<cSettingsRepositoryInterface> a_OverridesRepo)
|
|||||||
m_StartTime = std::chrono::steady_clock::now();
|
m_StartTime = std::chrono::steady_clock::now();
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
EnableMenuItem(hmenu, SC_CLOSE, MF_ENABLED); // Re-enable close button
|
EnableMenuItem(ConsoleMenu, SC_CLOSE, MF_ENABLED); // Re-enable close button
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
@ -272,13 +271,13 @@ void cRoot::Start(std::unique_ptr<cSettingsRepositoryInterface> a_OverridesRepo)
|
|||||||
DWORD Length;
|
DWORD Length;
|
||||||
INPUT_RECORD Record
|
INPUT_RECORD Record
|
||||||
{
|
{
|
||||||
static_cast<WORD>(KEY_EVENT),
|
KEY_EVENT,
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
TRUE,
|
TRUE,
|
||||||
1,
|
1,
|
||||||
VK_RETURN,
|
VK_RETURN,
|
||||||
MapVirtualKey(VK_RETURN, MAPVK_VK_TO_VSC),
|
static_cast<WORD>(MapVirtualKey(VK_RETURN, MAPVK_VK_TO_VSC)),
|
||||||
{ { VK_RETURN } },
|
{ { VK_RETURN } },
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user