mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-05 21:57:20 +00:00
Make debug Ctrl+Shift+Q shortcut cross-platform
This commit is contained in:
parent
8f56e263f3
commit
6ec33bdcf7
@ -51,10 +51,6 @@
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
namespace app {
|
||||
|
||||
using namespace gfx;
|
||||
@ -446,11 +442,11 @@ bool CustomizedGuiManager::onProcessMessage(Message* msg)
|
||||
case kKeyDownMessage: {
|
||||
Window* toplevel_window = getTopWindow();
|
||||
|
||||
#if defined _WIN32 && defined _DEBUG
|
||||
#ifdef _DEBUG
|
||||
// Left Shift+Ctrl+Q generates a crash (useful to test the anticrash feature)
|
||||
if (GetKeyState(VK_LSHIFT) & 0x8000 &&
|
||||
GetKeyState(VK_LCONTROL) & 0x8000 &&
|
||||
GetKeyState(0x51) & 0x8000) { // Q key
|
||||
if (msg->ctrlPressed() &&
|
||||
msg->shiftPressed() &&
|
||||
static_cast<KeyMessage*>(msg)->scancode() == kKeyQ) {
|
||||
int* p = nullptr;
|
||||
*p = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user