From 9d10bcb3ef07519116e7a3c2bd33c02f0746ae24 Mon Sep 17 00:00:00 2001 From: penfold42 Date: Thu, 19 Jul 2018 18:28:56 +1000 Subject: [PATCH] Scratch and New now refresh the browser view Using the keyboard to exit emulation no longer CD / --- src/iec_commands.cpp | 3 +++ src/main.cpp | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/iec_commands.cpp b/src/iec_commands.cpp index ae86f0b..a9b5ce7 100644 --- a/src/iec_commands.cpp +++ b/src/iec_commands.cpp @@ -1107,6 +1107,8 @@ void IEC_Commands::New(void) if (ret==0) { + updateAction = REFRESH; + // Mount the new disk? Shoud we do this or let them do it manually? if (f_stat(filenameNew, &filInfo) == FR_OK) { @@ -1187,6 +1189,7 @@ void IEC_Commands::Scratch(void) f_unlink(filInfo.fname); } res = f_findnext(&dir, &filInfo); + updateAction = REFRESH; } text = ParseNextName(text, filename, true); } diff --git a/src/main.cpp b/src/main.cpp index 529aee5..3978f98 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -697,8 +697,10 @@ void emulator() fileBrowser->ClearSelections(); // Go back to the root folder so you can load fb* again? - if ((resetWhileEmulating && options.GetOnResetChangeToStartingFolder()) || selectedViaIECCommands) fileBrowser->DisplayRoot(); // Go back to the root folder and display it. - else fileBrowser->RefeshDisplay(); // Just redisplay the current folder. +// if ((resetWhileEmulating && options.GetOnResetChangeToStartingFolder()) || selectedViaIECCommands) +// fileBrowser->DisplayRoot(); // Go back to the root folder and display it. +// else + fileBrowser->RefeshDisplay(); // Just redisplay the current folder. resetWhileEmulating = false; selectedViaIECCommands = false; @@ -979,12 +981,14 @@ void emulator() IEC_Bus::WaitUntilReset(); //DEBUG_LOG("6502 resetting\r\n"); - if (options.GetOnResetChangeToStartingFolder() || selectedViaIECCommands) - fileBrowser->DisplayRoot();//m_IEC_Commands.ChangeToRoot(); // TO CHECK emulating = false; resetWhileEmulating = true; if (reset) + { exitReason = EXIT_RESET; + if (options.GetOnResetChangeToStartingFolder() || selectedViaIECCommands) + fileBrowser->DisplayRoot(); // TO CHECK + } if (exitEmulation) exitReason = EXIT_KEYBOARD; break;