mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Made ctrl+c detection in a mex file work more reliably in newer versions of
matlab.
This commit is contained in:
parent
26524fe7a1
commit
917dcad316
@ -3050,12 +3050,12 @@ namespace mex_binding
|
||||
int num = static_cast<int>(pptr()-pbase());
|
||||
if (num != 0)
|
||||
{
|
||||
check_for_matlab_ctrl_c();
|
||||
|
||||
buf[num] = 0; // null terminate the string
|
||||
mexPrintf("%s",&buf[0]);
|
||||
mexEvalString("drawnow"); // flush print to screen
|
||||
pbump(-num);
|
||||
|
||||
check_for_matlab_ctrl_c();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -3108,12 +3108,12 @@ namespace mex_binding
|
||||
int num = static_cast<int>(pptr()-pbase());
|
||||
if (num != 0)
|
||||
{
|
||||
check_for_matlab_ctrl_c();
|
||||
|
||||
buf[num] = 0; // null terminate the string
|
||||
mexWarnMsgTxt(&buf[0]);
|
||||
mexEvalString("drawnow"); // flush print to screen
|
||||
pbump(-num);
|
||||
|
||||
check_for_matlab_ctrl_c();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user