mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-15 19:28:29 +12:00
Avoid wxGetKeyState since it asserts on Linux with wayland GTK
Only modifier keys are allowed, but we used it to test for Escape
This commit is contained in:
parent
c440ecdf36
commit
66711529be
3 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
|||
#include "gui/guiWrapper.h"
|
||||
#include "gui/input/panels/InputPanel.h"
|
||||
|
||||
#include <wx/textctrl.h>
|
||||
|
@ -26,7 +27,7 @@ void InputPanel::on_timer(const EmulatedControllerPtr& emulated_controller, cons
|
|||
const auto mapping = reinterpret_cast<uint64>(element->GetClientData());
|
||||
|
||||
// reset mapping
|
||||
if(std::exchange(m_right_down, false) || wxGetKeyState(WXK_ESCAPE))
|
||||
if(std::exchange(m_right_down, false) || gui_isKeyDown(PlatformKeyCodes::ESCAPE))
|
||||
{
|
||||
element->SetBackgroundColour(kKeyColourNormalMode);
|
||||
m_color_backup[element->GetId()] = kKeyColourNormalMode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue