diff options
Diffstat (limited to 'UCore.pas')
| -rw-r--r-- | UCore.pas | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2677,7 +2677,7 @@ begin end; (********************************************************************************************************************************) -procedure vfs_ask_question_callback(const AMessage: PChar; const Choices: PPChar; choice: PInteger; user_data: Pointer); cdecl; +procedure vfs_ask_question_callback(const AMessage: PChar; const Choices: PPChar; choice: PInteger; cancel_choice: Integer; user_data: Pointer); cdecl; var Thread: TOpenDirThread; begin Thread := user_data; @@ -2685,7 +2685,7 @@ begin if pthread_self = Application.ThreadID then begin DebugMsg(['!! (WARNING): vfs_ask_question_callback called from the main thread, expected spawn from a OpenDirThread']); HandleVFSAskQuestionCallback(FMain.FWidget, AMessage, Choices, choice); - if (choice <> nil) and (Thread <> nil) and (Thread is TOpenDirThread) then Thread.VFSCallbackCancelled := choice^ < 0; + if (choice <> nil) and (Thread <> nil) and (Thread is TOpenDirThread) then Thread.VFSCallbackCancelled := (choice^ < 0) or (choice^ = cancel_choice); Exit; end; @@ -2697,7 +2697,7 @@ begin Thread.VFSAskQuestion_Display := True; Thread.VFSCallbackEvent.WaitFor(INFINITE); DebugMsg(['******* thread: resuming...']); - if (choice <> nil) then Thread.VFSCallbackCancelled := choice^ < 0; + if (choice <> nil) then Thread.VFSCallbackCancelled := (choice^ < 0) or (choice^ = cancel_choice); Exit; end; |
