Only try to run xmessage on Linux
This commit is contained in:
parent
2e43a4d696
commit
faf55c6540
|
@ -43,16 +43,12 @@ void on_assert_failed(const char* message)
|
|||
case IDOK:
|
||||
return;
|
||||
}
|
||||
#else
|
||||
#elif defined(__linux__)
|
||||
auto cmd = "xmessage -buttons 'quit:0,ignore:1' '" + msg + "'";
|
||||
switch (system(cmd.c_str()))
|
||||
{
|
||||
case -1:
|
||||
case 0:
|
||||
throw assert_failed(message);
|
||||
case 1:
|
||||
return;
|
||||
}
|
||||
if (system(cmd.c_str()) != 1)
|
||||
throw assert_failed(msg);
|
||||
#else
|
||||
throw assert_failed(msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user