1
0
Fork 0

Change first_shell to be DOS_Shell instead of Program. Makes future manipulations easier.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4211
This commit is contained in:
Peter Veenstra 2019-04-20 13:48:55 +00:00
parent 8a156f17d8
commit eb26b9a58e
4 changed files with 18 additions and 14 deletions

View file

@ -38,7 +38,6 @@
#include <assert.h>
extern Bit8u int10_font_14[256 * 14];
extern Program * first_shell;
extern bool MSG_Write(const char *);
extern void GFX_SetTitle(Bit32s cycles, Bits frameskip, bool paused);
@ -454,10 +453,9 @@ public:
if (arg == "OK") section->data = *(std::string*)content->getText();
if (arg == "OK" || arg == "Cancel") close();
else if (arg == "Append Shell Commands") {
DOS_Shell *s = static_cast<DOS_Shell *>(first_shell);
std::list<std::string>::reverse_iterator i = s->l_history.rbegin();
std::list<std::string>::reverse_iterator i = first_shell->l_history.rbegin();
std::string lines = *(std::string*)content->getText();
while (i != s->l_history.rend()) {
while (i != first_shell->l_history.rend()) {
lines += "\n";
lines += *i;
++i;