MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / ApplyInputs

Function ApplyInputs

rEFIt_UEFI/refit/menu.cpp:467–1077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465
466
467VOID ApplyInputs(VOID)
468{
469 EFI_STATUS Status = EFI_NOT_FOUND;
470 MACHINE_TYPES Model;
471 BOOLEAN NeedSave = TRUE;
472 INTN i = 0;
473 UINTN j;
474 CHAR8 AString[256];
475
476// DBG("ApplyInputs\n");
477 if (InputItems[i].Valid) {
478 gSettings.BootArgs = InputItems[i].SValue;
479 gSettings.BootArgs.replaceAll('\\', '_');
480 gBootChanged = TRUE;
481 }
482 i++; //1
483 if (InputItems[i].Valid) {
484 gSettings.DsdtName = InputItems[i].SValue;
485 }
486 i++; //2
487 if (InputItems[i].Valid) {
488 snwprintf(gSettings.BlockKexts, sizeof(gSettings.BlockKexts), "%ls", InputItems[i].SValue.wc_str());
489 }
490 i++; //3
491 if (InputItems[i].Valid) {
492 if (OldChosenTheme == 0xFFFF) {
493 GlobalConfig.Theme = L"embedded"_XSW;
494 } else {
495 GlobalConfig.Theme.takeValueFrom(ThemeNameArray[OldChosenTheme]);
496 }
497
498 //will change theme after ESC
499 gThemeChanged = TRUE;
500 }
501 i++; //4
502 if (InputItems[i].Valid) {
503 gSettings.DropSSDT = InputItems[i].BValue;
504 }
505 i++; //5
506 if (InputItems[i].Valid) {
507 gSettings.GeneratePStates = InputItems[i].BValue;
508 }
509 i++; //6
510 if (InputItems[i].Valid) {
511 gSettings.SlpSmiEnable = InputItems[i].BValue;
512 }
513 i++; //7
514 if (InputItems[i].Valid) {
515// DBG("InputItems[i]: %ls\n", InputItems[i].SValue);
516 gSettings.PLimitDict = (UINT8)(StrDecimalToUintn(InputItems[i].SValue.wc_str()) & 0x7F);
517// DBG("Item 7=PLimitDict %d\n", gSettings.PLimitDict);
518 }
519 i++; //8
520 if (InputItems[i].Valid) {
521 gSettings.UnderVoltStep = (UINT8)(StrDecimalToUintn(InputItems[i].SValue.wc_str()) & 0x3F);
522// DBG("Item 8=UnderVoltStep %d\n", gSettings.UnderVoltStep);
523 }
524 i++; //9

Callers 2

OptionsMenuFunction · 0.85
InputDialogMethod · 0.85

Calls 15

StrDecimalToUintnFunction · 0.85
snprintfFunction · 0.85
hex2binFunction · 0.85
GetModelFromStringFunction · 0.85
SetDMISettingsForModelFunction · 0.85
LoadUserSettingsFunction · 0.85
GetUserSettingsFunction · 0.85
FillInputsFunction · 0.85
SetNvramVariableFunction · 0.85
SaveSettingsFunction · 0.85
SWPrintfMethod · 0.80
StrHexToUint64Function · 0.50

Tested by

no test coverage detected