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

Function FillInputs

rEFIt_UEFI/refit/menu.cpp:126–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124
125
126VOID FillInputs(BOOLEAN New)
127{
128 UINTN i,j; //for loops
129 CHAR8 tmp[41];
130// BOOLEAN bit;
131
132 tmp[40] = 0; //make it null-terminated
133
134 UINTN InputItemsCount = 0;
135 if (New) {
136// InputItems = (__typeof__(InputItems))A_llocateZeroPool(130 * sizeof(INPUT_ITEM)); //XXX
137 InputItems = new INPUT_ITEM[130];
138 }
139
140 InputItems[InputItemsCount].ItemType = ASString; //0
141 //even though Ascii we will keep value as Unicode to convert later
142 // no need for extra space here, it is added by ApplyInputs()
143 InputItems[InputItemsCount++].SValue.takeValueFrom(gSettings.BootArgs);
144 InputItems[InputItemsCount].ItemType = UNIString; //1
145 InputItems[InputItemsCount++].SValue.takeValueFrom(gSettings.DsdtName); // 1-> 2
146 InputItems[InputItemsCount].ItemType = UNIString; //2
147 InputItems[InputItemsCount++].SValue.takeValueFrom(gSettings.BlockKexts);
148
149 InputItems[InputItemsCount].ItemType = RadioSwitch; //3 - Themes chooser
150 InputItems[InputItemsCount++].IValue = 3;
151
152 InputItems[InputItemsCount].ItemType = BoolValue; //4
153 InputItems[InputItemsCount++].BValue = gSettings.DropSSDT;
154 InputItems[InputItemsCount].ItemType = BoolValue; //5
155 InputItems[InputItemsCount++].BValue = gSettings.GeneratePStates;
156 InputItems[InputItemsCount].ItemType = BoolValue; //6
157 InputItems[InputItemsCount++].BValue = gSettings.SlpSmiEnable;
158 InputItems[InputItemsCount].ItemType = Decimal; //7
159 InputItems[InputItemsCount++].SValue.SWPrintf("%02d", gSettings.PLimitDict);
160 InputItems[InputItemsCount].ItemType = Decimal; //8
161 InputItems[InputItemsCount++].SValue.SWPrintf("%02d", gSettings.UnderVoltStep);
162 InputItems[InputItemsCount].ItemType = BoolValue; //9
163 InputItems[InputItemsCount++].BValue = gSettings.GenerateCStates;
164 InputItems[InputItemsCount].ItemType = BoolValue; //10
165 InputItems[InputItemsCount++].BValue = gSettings.EnableC2;
166 InputItems[InputItemsCount].ItemType = BoolValue; //11
167 InputItems[InputItemsCount++].BValue = gSettings.EnableC4;
168 InputItems[InputItemsCount].ItemType = BoolValue; //12
169 InputItems[InputItemsCount++].BValue = gSettings.EnableC6;
170 InputItems[InputItemsCount].ItemType = BoolValue; //13
171 InputItems[InputItemsCount++].BValue = gSettings.EnableISS;
172 InputItems[InputItemsCount].ItemType = Decimal; //14
173 InputItems[InputItemsCount++].SValue.SWPrintf("%06d", gSettings.QPI);
174 InputItems[InputItemsCount].ItemType = BoolValue; //15
175 InputItems[InputItemsCount++].BValue = gSettings.PatchNMI;
176 InputItems[InputItemsCount].ItemType = BoolValue; //16
177 InputItems[InputItemsCount++].BValue = gSettings.PatchVBios;
178 InputItems[InputItemsCount].ItemType = Decimal; //17
179 InputItems[InputItemsCount++].SValue.SWPrintf("0x%llX", gPlatformFeature);
180 InputItems[InputItemsCount].ItemType = Hex; //18
181 InputItems[InputItemsCount++].SValue.SWPrintf("0x%hX", gSettings.BacklightLevel);
182 InputItems[InputItemsCount].ItemType = Decimal; //19
183 if (gSettings.BusSpeed > 20000) {

Callers 2

ApplyInputsFunction · 0.85
RefitMainFunction · 0.85

Calls 5

snprintfFunction · 0.85
SWPrintfMethod · 0.80
lengthMethod · 0.45
wc_strMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected