ReactOS  0.4.14-dev-114-gc8cbd56
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 (IN OperatingSystemItem *OperatingSystem)
 
VOID DisplayBootTimeOptions (VOID)
 
VOID AppendBootTimeOptions (PCHAR BootOptions)
 

Function Documentation

◆ AppendBootTimeOptions()

VOID AppendBootTimeOptions ( PCHAR  BootOptions)

Definition at line 252 of file options.c.

253 {
254  switch (BootOptionChoice)
255  {
256  case SAFE_MODE:
257  strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS /NOGUIBOOT");
258  break;
259 
261  strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS /NOGUIBOOT");
262  break;
263 
265  strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS /NOGUIBOOT");
266  break;
267 
269  DbgPrint("Last known good configuration is not supported yet!\n");
270  break;
271 
273  strcat(BootOptions, " /SAFEBOOT:DSREPAIR /SOS");
274  break;
275 
276  default:
277  break;
278  }
279 
280  if (BootLogging)
281  strcat(BootOptions, " /BOOTLOG");
282 
283  if (VgaMode)
284  strcat(BootOptions, " /BASEVIDEO");
285 
286  if (DebuggingMode)
287  strcat(BootOptions, " /DEBUG");
288 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
#define DbgPrint
Definition: loader.c:25
static enum BootOption BootOptionChoice
Definition: options.c:85
static BOOLEAN DebuggingMode
Definition: options.c:88
static BOOLEAN VgaMode
Definition: options.c:87
static BOOLEAN BootLogging
Definition: options.c:86

Referenced by LoadAndBootWindows().

◆ DisplayBootTimeOptions()

VOID DisplayBootTimeOptions ( VOID  )

Definition at line 181 of file options.c.

182 {
183  CHAR BootOptions[260] = "";
184 
185  switch (BootOptionChoice)
186  {
187  case SAFE_MODE:
189  break;
190 
193  break;
194 
197  break;
198 
201  break;
202 
205  break;
206 
207  default:
208  break;
209  }
210 
211  if (BootLogging)
212  {
213  if ( (BootOptionChoice != SAFE_MODE) &&
216  {
218  {
219  strcat(BootOptions, ", ");
220  }
222  }
223  }
224 
225  if (VgaMode)
226  {
227  if ((BootOptionChoice != NO_OPTION) ||
228  BootLogging)
229  {
230  strcat(BootOptions, ", ");
231  }
233  }
234 
235  if (DebuggingMode)
236  {
237  if ((BootOptionChoice != NO_OPTION) ||
238  BootLogging || VgaMode)
239  {
240  strcat(BootOptions, ", ");
241  }
243  }
244 
245  /* Display the chosen boot options */
246  UiDrawText(0,
247  UiScreenHeight - 2,
248  BootOptions,
250 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
#define COLOR_LIGHTBLUE
Definition: ui.h:214
char CHAR
Definition: xmlstorage.h:175
static enum BootOption BootOptionChoice
Definition: options.c:85
ULONG UiScreenHeight
Definition: ui.c:29
static BOOLEAN DebuggingMode
Definition: options.c:88
#define ATTR(cFore, cBack)
Definition: ui.h:192
VOID UiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
Definition: ui.c:234
UCHAR UiMenuBgColor
Definition: ui.c:41
PCSTR OptionsMenuList[]
Definition: options.c:27
static BOOLEAN VgaMode
Definition: options.c:87
static BOOLEAN BootLogging
Definition: options.c:86

Referenced by MiniTuiDrawMenu(), and TuiDrawMenu().

◆ DoOptionsMenu()

VOID DoOptionsMenu ( IN OperatingSystemItem OperatingSystem)

Definition at line 92 of file options.c.

93 {
94  ULONG SelectedMenuItem;
95  CHAR DebugChannelString[100];
96 
97  if (!UiDisplayMenu("Select an option:", NULL,
98  TRUE,
100  sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]),
101  11, // Use "Start ReactOS normally" as default; see the switch below.
102  -1,
103  &SelectedMenuItem,
104  TRUE,
105  NULL, NULL))
106  {
107  /* The user pressed ESC */
108  return;
109  }
110 
111  /* Clear the backdrop */
112  UiDrawBackdrop();
113 
114  switch (SelectedMenuItem)
115  {
116  case 0: // Safe Mode
118  BootLogging = TRUE;
119  break;
120  case 1: // Safe Mode with Networking
122  BootLogging = TRUE;
123  break;
124  case 2: // Safe Mode with Command Prompt
126  BootLogging = TRUE;
127  break;
128  // case 3: // Separator
129  // break;
130  case 4: // Enable Boot Logging
131  BootLogging = TRUE;
132  break;
133  case 5: // Enable VGA Mode
134  VgaMode = TRUE;
135  break;
136  case 6: // Last Known Good Configuration
138  break;
139  case 7: // Directory Services Restore Mode
141  break;
142  case 8: // Debugging Mode
144  break;
145  case 9: // FreeLdr debugging
146  DebugChannelString[0] = 0;
148  DebugChannelString,
149  sizeof(DebugChannelString) / sizeof(DebugChannelString[0])))
150  {
151  DbgParseDebugChannels(DebugChannelString);
152  }
153  break;
154  // case 10: // Separator
155  // break;
156  case 11: // Start ReactOS normally
157  // Reset all the parameters to their default values.
159  BootLogging = FALSE;
160  VgaMode = FALSE;
162  break;
163 #ifdef HAS_OPTION_MENU_EDIT_CMDLINE
164  case 12: // Edit command line
165  EditOperatingSystemEntry(OperatingSystem);
166  break;
167 #endif
168 #ifdef HAS_OPTION_MENU_CUSTOM_BOOT
169  case 13: // Custom Boot
171  break;
172 #endif
173 #ifdef HAS_OPTION_MENU_REBOOT
174  case 14: // Reboot
176  break;
177 #endif
178  }
179 }
VOID EditOperatingSystemEntry(IN OperatingSystemItem *OperatingSystem)
#define TRUE
Definition: types.h:120
VOID OptionMenuCustomBoot(VOID)
#define DbgParseDebugChannels(val)
Definition: debug.h:119
char CHAR
Definition: xmlstorage.h:175
static enum BootOption BootOptionChoice
Definition: options.c:85
BOOLEAN UiDisplayMenu(IN PCSTR MenuHeader, IN PCSTR MenuFooter OPTIONAL, IN BOOLEAN ShowBootOptions, IN PCSTR MenuItemList[], IN ULONG MenuItemCount, IN ULONG DefaultMenuItem, IN LONG MenuTimeOut, OUT PULONG SelectedMenuItem, IN BOOLEAN CanEscape, IN UiMenuKeyPressFilterCallback KeyPressFilter OPTIONAL, IN PVOID Context OPTIONAL)
Definition: ui.c:463
static BOOLEAN DebuggingMode
Definition: options.c:88
smooth NULL
Definition: ftsmooth.c:416
const PCSTR FrldrDbgMsg
Definition: options.c:57
VOID OptionMenuReboot(VOID)
VOID UiDrawBackdrop(VOID)
Definition: ui.c:214
BOOLEAN UiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
Definition: ui.c:492
PCSTR OptionsMenuList[]
Definition: options.c:27
static BOOLEAN VgaMode
Definition: options.c:87
unsigned int ULONG
Definition: retypes.h:1
static BOOLEAN BootLogging
Definition: options.c:86

Referenced by MainBootMenuKeyPressFilter().