Skip to content

Commit

Permalink
Don't repeat auto input when selecting an executable from the start menu
Browse files Browse the repository at this point in the history
  • Loading branch information
schellingb committed Jul 24, 2024
1 parent 87691af commit 0c1f92b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dosbox_pure_run.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,17 @@ struct DBP_Run
static struct Autoboot { bool have, use; int skip, hash; } autoboot;
static struct Autoinput { std::string str; const char* ptr; } autoinput;

static void Run(EMode mode, int info, std::string& str, bool write_auto_boot = false)
static void Run(EMode mode, int info, std::string& str, bool from_osd = false)
{
startup.mode = mode;
startup.info = info;
startup.str.swap(str); // remember to set cursor again and for rebooting a different IT_RUN

if (write_auto_boot)
if (from_osd)
{
WriteAutoBoot();
autoinput.str.clear();
}

char mchar;
if (dbp_game_running || (mode == RUN_BOOTIMG && info && info != (mchar = GetDosBoxMachineChar())))
Expand Down Expand Up @@ -431,7 +434,6 @@ struct DBP_Run
{
if (autoboot.have && !autoboot.use)
{
autoinput.str.clear();
autoboot.have = false;
Drives['C'-'A']->FileUnlink((char*)"AUTOBOOT.DBP");
}
Expand Down

0 comments on commit 0c1f92b

Please sign in to comment.