From 2b0feefe28bcad716816017e9880d92c36144d30 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 25 Aug 2023 18:13:00 -0500 Subject: [PATCH] don't add to recent issue #1406 --- extern/nfd-modified/src/nfd_win.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/extern/nfd-modified/src/nfd_win.cpp b/extern/nfd-modified/src/nfd_win.cpp index 3bded25c..90e28ec3 100644 --- a/extern/nfd-modified/src/nfd_win.cpp +++ b/extern/nfd-modified/src/nfd_win.cpp @@ -677,6 +677,21 @@ nfdresult_t NFD_SaveDialog( const std::vector& filterList, goto end; } + // Set a flag for no history + DWORD dwFlags; + result = fileSaveDialog->GetOptions(&dwFlags); + if ( !SUCCEEDED(result) ) + { + NFDi_SetError("Could not get options."); + goto end; + } + result = fileSaveDialog->SetOptions(dwFlags | FOS_DONTADDTORECENT); + if ( !SUCCEEDED(result) ) + { + NFDi_SetError("Could not set options."); + goto end; + } + // Show the dialog. result = fileSaveDialog->Show(NULL); if ( SUCCEEDED(result) )