-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'openconsole/inbox' into main
- Loading branch information
Showing
68 changed files
with
628 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BUILD_PASS1_CONSUMES= \ | ||
onecore\windows\vcpkg|PASS1 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BUILD_PASS1_CONSUMES= \ | ||
onecore\windows\vcpkg|PASS1 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BUILD_PASS1_CONSUMES= \ | ||
onecore\windows\vcpkg|PASS1 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BUILD_PASS1_CONSUMES= \ | ||
onecore\windows\vcpkg|PASS1 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
BUILD_PASS1_CONSUMES= \ | ||
onecore\windows\vcpkg|PASS1 \ | ||
|
||
BUILD_PASS2_CONSUMES= \ | ||
onecore\windows\core\console\open\src\tools\nihilist|PASS2 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BUILD_PASS1_CONSUMES= \ | ||
onecore\windows\vcpkg|PASS1 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BUILD_PASS1_CONSUMES= \ | ||
onecore\windows\vcpkg|PASS1 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BUILD_PASS1_CONSUMES= \ | ||
onecore\windows\vcpkg|PASS1 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// Copyright (c) Microsoft Corporation | ||
// Licensed under the MIT license. | ||
|
||
#include "precomp.h" | ||
#include "../inc/VtApiRedirection.hpp" | ||
#include "../onecore/ConIoSrvComm.hpp" | ||
#pragma hdrstop | ||
|
||
// The project include file defines these to be invalid symbols | ||
// to clue in developers across the project not to use them. | ||
// | ||
// We have to use them here. | ||
#undef VkKeyScanW | ||
#undef MapVirtualKeyW | ||
#undef GetKeyState | ||
|
||
UINT OneCoreSafeMapVirtualKeyW(_In_ UINT uCode, _In_ UINT uMapType) | ||
{ | ||
auto ret{ MapVirtualKeyW(uCode, uMapType) }; | ||
#ifdef BUILD_ONECORE_INTERACTIVITY | ||
if (ret == 0) | ||
{ | ||
const auto lastError{ GetLastError() }; | ||
if (lastError == ERROR_PROC_NOT_FOUND || lastError == ERROR_DELAY_LOAD_FAILED) | ||
{ | ||
if (auto conIoSrvComm{ Microsoft::Console::Interactivity::OneCore::ConIoSrvComm::GetConIoSrvComm() }) | ||
{ | ||
SetLastError(0); | ||
ret = conIoSrvComm->ConIoMapVirtualKeyW(uCode, uMapType); | ||
} | ||
} | ||
} | ||
#endif | ||
return ret; | ||
} | ||
|
||
SHORT OneCoreSafeVkKeyScanW(_In_ WCHAR ch) | ||
{ | ||
auto ret{ VkKeyScanW(ch) }; | ||
#ifdef BUILD_ONECORE_INTERACTIVITY | ||
if (ret == -1) | ||
{ | ||
const auto lastError{ GetLastError() }; | ||
if (lastError == ERROR_PROC_NOT_FOUND || lastError == ERROR_DELAY_LOAD_FAILED) | ||
{ | ||
if (auto conIoSrvComm{ Microsoft::Console::Interactivity::OneCore::ConIoSrvComm::GetConIoSrvComm() }) | ||
{ | ||
SetLastError(0); | ||
ret = conIoSrvComm->ConIoVkKeyScanW(ch); | ||
} | ||
} | ||
} | ||
#endif | ||
return ret; | ||
} | ||
|
||
SHORT OneCoreSafeGetKeyState(_In_ int nVirtKey) | ||
{ | ||
auto ret{ GetKeyState(nVirtKey) }; | ||
#ifdef BUILD_ONECORE_INTERACTIVITY | ||
if (ret == 0) | ||
{ | ||
const auto lastError{ GetLastError() }; | ||
if (lastError == ERROR_PROC_NOT_FOUND || lastError == ERROR_DELAY_LOAD_FAILED) | ||
{ | ||
if (auto conIoSrvComm{ Microsoft::Console::Interactivity::OneCore::ConIoSrvComm::GetConIoSrvComm() }) | ||
{ | ||
SetLastError(0); | ||
ret = conIoSrvComm->ConIoGetKeyState(nVirtKey); | ||
} | ||
} | ||
} | ||
#endif | ||
return ret; | ||
} |
Oops, something went wrong.