[core] add a cheat mode (Alt-P) to toggle GPT ESP to Basic Data

* Windows 10 or later *ONLY*
* Also don't report a GPT partition name if it's empty
This commit is contained in:
Pete Batard 2020-06-06 16:34:17 +01:00
parent 22fb8febc5
commit 23057f6124
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
6 changed files with 205 additions and 16 deletions

View file

@ -3286,7 +3286,7 @@ relaunch:
while(GetMessage(&msg, NULL, 0, 0)) {
static BOOL ctrl_without_focus = FALSE;
BOOL no_focus = (msg.message == WM_SYSKEYDOWN) && !(msg.lParam & 0x20000000);
// ** ****** **** ** **********
// ** ****** **** *************
// .,ABCDEFGHIJKLMNOPQRSTUVWXYZ
// Sigh... The things one need to do to detect standalone use of the 'Alt' key.
@ -3452,6 +3452,14 @@ relaunch:
SaveISO();
continue;
}
// Alt-P => Toggle GPT ESP to and from Basic Data type (Windows 10 or later)
if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'P')) {
int index = ComboBox_GetCurSel(hDeviceList);
DWORD DeviceNum = (DWORD)ComboBox_GetItemData(hDeviceList, index);
if (ToggleEsp(DeviceNum))
CyclePort(index);
continue;
}
// Alt-Q => Enable file indexing (for file systems that support it)
// For multiple reasons, file indexing is disabled by default
if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'Q')) {