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:
@@ -20,7 +20,6 @@ NEARDATA struct instance_flags iflags; /* provide linkage */
|
||||
#endif
|
||||
|
||||
#define BACKWARD_COMPAT
|
||||
#define WINTYPELEN 16
|
||||
|
||||
#ifdef DEFAULT_WC_TILED_MAP
|
||||
#define PREFER_TILED TRUE
|
||||
@@ -3519,10 +3518,14 @@ boolean tinitial, tfrom_file;
|
||||
bad_negation(fullname, FALSE);
|
||||
return FALSE;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
char buf[WINTYPELEN];
|
||||
if (!iflags.windowtype_deferred) {
|
||||
char buf[WINTYPELEN];
|
||||
|
||||
nmcpy(buf, op, WINTYPELEN);
|
||||
choose_windows(buf);
|
||||
nmcpy(buf, op, WINTYPELEN);
|
||||
choose_windows(buf);
|
||||
} else {
|
||||
nmcpy(chosen_windowtype, op, WINTYPELEN);
|
||||
}
|
||||
} else
|
||||
return FALSE;
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user