ReactOS  0.4.13-dev-482-ge57f103
options.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

VOID DoOptionsMenu (VOID)
 
VOID DisplayBootTimeOptions (VOID)
 
VOID AppendBootTimeOptions (PCHAR BootOptions)
 

Function Documentation

◆ AppendBootTimeOptions()

VOID AppendBootTimeOptions ( PCHAR  BootOptions)

Definition at line 244 of file options.c.

245 {
246  switch (BootOptionChoice)
247  {
248  case SAFE_MODE:
249  strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS"); // FIXME: NOGUIBOOT should also be specified
250  break;
251 
253  strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS"); // FIXME: NOGUIBOOT should also be specified
254  break;
255 
257  strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS"); // FIXME: NOGUIBOOT should also be specified
258  break;
259 
261  DbgPrint("Last known good configuration is not supported yet!\n");
262  break;
263 
265  strcat(BootOptions, " /SAFEBOOT:DSREPAIR /SOS");
266  break;
267 
268  default:
269  break;
270  }
271 
272  if (BootLogging)
273  strcat(BootOptions, " /BOOTLOG");
274 
275  if (VgaMode)
276  strcat(BootOptions, " /BASEVIDEO");
277 
278  if (DebuggingMode)
279  strcat(BootOptions, " /DEBUG");
280 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
#define DbgPrint
Definition: loader.c:25
static enum BootOption BootOptionChoice
Definition: options.c:82
static BOOLEAN DebuggingMode
Definition: options.c:85
static BOOLEAN VgaMode
Definition: options.c:84
static BOOLEAN BootLogging
Definition: options.c:83

Referenced by LoadAndBootWindows().

◆ DisplayBootTimeOptions()

VOID DisplayBootTimeOptions ( VOID  )

Definition at line 173 of file options.c.

174 {
175  CHAR BootOptions[260] = "";
176 
177  switch (BootOptionChoice)
178  {
179  case SAFE_MODE:
181  break;
182 
185  break;
186 
189  break;
190 
193  break;
194 
197  break;
198 
199  default:
200  break;
201  }
202 
203  if (BootLogging)
204  {
205  if ( (BootOptionChoice != SAFE_MODE) &&
208  {
210  {
211  strcat(BootOptions, ", ");
212  }
214  }
215  }
216 
217  if (VgaMode)
218  {
219  if ((BootOptionChoice != NO_OPTION) ||
220  BootLogging)
221  {
222  strcat(BootOptions, ", ");
223  }
225  }
226 
227  if (DebuggingMode)
228  {
229  if ((BootOptionChoice != NO_OPTION) ||
230  BootLogging || VgaMode)
231  {
232  strcat(BootOptions, ", ");
233  }
235  }
236 
237  /* Display the chosen boot options */
238  UiDrawText(0,
239  UiScreenHeight - 2,
240  BootOptions,
242 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
#define COLOR_LIGHTBLUE
Definition: ui.h:174
char CHAR
Definition: xmlstorage.h:175
static enum BootOption BootOptionChoice
Definition: options.c:82
ULONG UiScreenHeight
Definition: ui.c:29
static BOOLEAN DebuggingMode
Definition: options.c:85
#define ATTR(cFore, cBack)
Definition: ui.h:152
VOID UiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
Definition: ui.c:261
UCHAR UiMenuBgColor
Definition: ui.c:41
PCSTR OptionsMenuList[]
Definition: options.c:27
static BOOLEAN VgaMode
Definition: options.c:84
static BOOLEAN BootLogging
Definition: options.c:83

Referenced by MiniTuiDrawMenu(), and TuiDrawMenu().

◆ DoOptionsMenu()

VOID DoOptionsMenu ( VOID  )

Definition at line 89 of file options.c.

90 {
91  ULONG SelectedMenuItem;
92  CHAR DebugChannelString[100];
93 
94  if (!UiDisplayMenu("Select an option:", "",
95  TRUE,
97  sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]),
98  11, // Use "Start ReactOS normally" as default; see the switch below.
99  -1,
100  &SelectedMenuItem,
101  TRUE,
102  NULL))
103  {
104  /* The user pressed ESC */
105  return;
106  }
107 
108  /* Clear the backdrop */
109  UiDrawBackdrop();
110 
111  switch (SelectedMenuItem)
112  {
113  case 0: // Safe Mode
115  BootLogging = TRUE;
116  break;
117  case 1: // Safe Mode with Networking
119  BootLogging = TRUE;
120  break;
121  case 2: // Safe Mode with Command Prompt
123  BootLogging = TRUE;
124  break;
125  // case 3: // Separator
126  // break;
127  case 4: // Enable Boot Logging
128  BootLogging = TRUE;
129  break;
130  case 5: // Enable VGA Mode
131  VgaMode = TRUE;
132  break;
133  case 6: // Last Known Good Configuration
135  break;
136  case 7: // Directory Services Restore Mode
138  break;
139  case 8: // Debugging Mode
141  break;
142  case 9: // FreeLdr debugging
143  DebugChannelString[0] = 0;
145  DebugChannelString,
146  sizeof(DebugChannelString) / sizeof(DebugChannelString[0])))
147  {
148  DbgParseDebugChannels(DebugChannelString);
149  }
150  break;
151  // case 10: // Separator
152  // break;
153  case 11: // Start ReactOS normally
154  // Reset all the parameters to their default values.
156  BootLogging = FALSE;
157  VgaMode = FALSE;
159  break;
160 #ifdef HAS_OPTION_MENU_CUSTOM_BOOT
161  case 12: // Custom Boot
163  break;
164 #endif
165 #ifdef HAS_OPTION_MENU_REBOOT
166  case 13: // Reboot
168  break;
169 #endif
170  }
171 }
#define TRUE
Definition: types.h:120
#define DbgParseDebugChannels(val)
Definition: debug.h:119
char CHAR
Definition: xmlstorage.h:175
static enum BootOption BootOptionChoice
Definition: options.c:82
VOID OptionMenuReboot(VOID)
Definition: custom.c:386
static BOOLEAN DebuggingMode
Definition: options.c:85
smooth NULL
Definition: ftsmooth.c:416
VOID OptionMenuCustomBoot(VOID)
Definition: custom.c:43
BOOLEAN UiDisplayMenu(PCSTR MenuHeader, PCSTR MenuFooter, BOOLEAN ShowBootOptions, PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG *SelectedMenuItem, BOOLEAN CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
Definition: ui.c:459
const PCSTR FrldrDbgMsg
Definition: options.c:54
VOID UiDrawBackdrop(VOID)
Definition: ui.c:241
BOOLEAN UiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
Definition: ui.c:474
PCSTR OptionsMenuList[]
Definition: options.c:27
static BOOLEAN VgaMode
Definition: options.c:84
unsigned int ULONG
Definition: retypes.h:1
static BOOLEAN BootLogging
Definition: options.c:83

Referenced by MainBootMenuKeyPressFilter().