mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
* [Linux] BugFix: Free the mouse cursor when triggering SIGTRAP on Linux to ensure that the cursor is available for debugging.
This commit is contained in:
parent
f6c6a6d66f
commit
070a3a30b6
1 changed files with 11 additions and 0 deletions
|
|
@ -24,6 +24,8 @@
|
||||||
#include "platformX86UNIX/x86UNIXState.h"
|
#include "platformX86UNIX/x86UNIXState.h"
|
||||||
#include "platformX86UNIX/x86UNIXStdConsole.h"
|
#include "platformX86UNIX/x86UNIXStdConsole.h"
|
||||||
#include "platform/platformInput.h"
|
#include "platform/platformInput.h"
|
||||||
|
#include "windowManager/platformWindow.h"
|
||||||
|
#include "windowManager/platformWindowMgr.h"
|
||||||
#include "console/console.h"
|
#include "console/console.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
@ -165,6 +167,15 @@ void Platform::debugBreak()
|
||||||
Con::errorf(ConsoleLogEntry::General,
|
Con::errorf(ConsoleLogEntry::General,
|
||||||
"Platform::debugBreak: triggering SIGSEGV for core dump");
|
"Platform::debugBreak: triggering SIGSEGV for core dump");
|
||||||
//kill(getpid(), SIGSEGV);
|
//kill(getpid(), SIGSEGV);
|
||||||
|
|
||||||
|
// On Linux, the mouse cursor will remain trapped when the SIGTRAP below triggers so we ensure the mouse
|
||||||
|
// locked state is disabled prior to dropping to debug
|
||||||
|
PlatformWindow* firstWindow = WindowManager->getFirstWindow();
|
||||||
|
if (firstWindow)
|
||||||
|
{
|
||||||
|
firstWindow->setMouseLocked(false);
|
||||||
|
}
|
||||||
|
|
||||||
kill(getpid(), SIGTRAP);
|
kill(getpid(), SIGTRAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue