Make debug Ctrl+Shift+Q shortcut cross-platform

This commit is contained in:
David Capello 2015-04-07 17:19:22 -03:00
parent 8f56e263f3
commit 6ec33bdcf7

View File

@ -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;
}