allow a deferred windowport init during options processing
When options processing encountered OPTIONS=windowtype:X, the code would immediately attempt to switch over to that windowtype right in the midst of options processing. This stores the chosen option into chosen_window[WINTYPELEN] thus allowing the startup code to choose it after options processing has been completed.
This commit is contained in:
@@ -221,6 +221,10 @@ enum getloc_filters {
|
||||
NUM_GFILTER
|
||||
};
|
||||
|
||||
/* max size of a windowtype option */
|
||||
#define WINTYPELEN 16
|
||||
char chosen_windowtype[WINTYPELEN];
|
||||
|
||||
struct debug_flags {
|
||||
boolean test;
|
||||
#ifdef TTY_GRAPHICS
|
||||
@@ -445,6 +449,9 @@ struct instance_flags {
|
||||
short soko_prize_type2; /* amulet of reflection */
|
||||
struct debug_flags debug;
|
||||
boolean windowtype_locked; /* windowtype can't change from configfile */
|
||||
boolean windowtype_deferred; /* pick a windowport and store it in
|
||||
chosen_windowport[], but do not switch to
|
||||
it in the midst of options processing */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user