mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-13 10:11:02 +00:00
Add string messages to returned result codes to display to user
* Most of the main entry points that can fail with relevant reasons now has a way of specifying a message to return with it. This message can be displayed to the user to give more information or context about an error.
This commit is contained in:
@@ -893,15 +893,15 @@ void CaptureDialog::on_toggleGlobal_clicked()
|
||||
|
||||
QString capturefile = m_Ctx.TempCaptureFilename(QFileInfo(exe).baseName());
|
||||
|
||||
bool success = RENDERDOC_StartGlobalHook(exe, capturefile, Settings().options);
|
||||
ResultDetails success = RENDERDOC_StartGlobalHook(exe, capturefile, Settings().options);
|
||||
|
||||
if(!success)
|
||||
if(!success.OK())
|
||||
{
|
||||
// tidy up and exit
|
||||
RDDialog::critical(
|
||||
this, tr("Couldn't start global hook"),
|
||||
tr("Aborting. Couldn't start global hook. Check diagnostic log in help menu for more "
|
||||
"information"));
|
||||
RDDialog::critical(this, tr("Couldn't start global hook"),
|
||||
tr("Aborting. Couldn't start global hook.\n"
|
||||
"%1")
|
||||
.arg(success.Message()));
|
||||
|
||||
setEnabledMultiple(enableDisableWidgets, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user