Skip to content

Commit 895c134

Browse files
committed
Fix keyboard controls not working on popped out window.
1 parent 3bfb48e commit 895c134

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

SerialPrograms/Source/CommonFramework/Globals.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ namespace PokemonAutomation{
2525

2626
const bool IS_BETA_VERSION = true;
2727
const int PROGRAM_VERSION_MAJOR = 0;
28-
const int PROGRAM_VERSION_MINOR = 60;
29-
const int PROGRAM_VERSION_PATCH = 9;
28+
const int PROGRAM_VERSION_MINOR = 61;
29+
const int PROGRAM_VERSION_PATCH = 1;
3030

3131
const std::string PROGRAM_VERSION_BASE =
3232
"v" + std::to_string(PROGRAM_VERSION_MAJOR) +

SerialPrograms/Source/NintendoSwitch/Framework/UI/NintendoSwitch_SwitchSystemWidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,13 @@ void SwitchSystemWidget::update_ui(ProgramState state){
203203

204204
void SwitchSystemWidget::key_press(QKeyEvent* event){
205205
// cout << "press: " << event->nativeVirtualKey() << endl;
206+
global_keyboard_tracker().on_key_press(*event);
206207
m_video_display->on_key_press(event);
207208
}
208209

209210
void SwitchSystemWidget::key_release(QKeyEvent* event){
210211
// cout << "release: " << event->nativeVirtualKey() << endl;
212+
global_keyboard_tracker().on_key_release(*event);
211213
m_video_display->on_key_release(event);
212214
}
213215

@@ -221,13 +223,11 @@ void SwitchSystemWidget::focus_out(QFocusEvent* event){
221223

222224
void SwitchSystemWidget::keyPressEvent(QKeyEvent* event){
223225
// cout << "SwitchSystemWidget::keyPressEvent()" << endl;
224-
global_keyboard_tracker().on_key_press(*event);
225226
key_press(event);
226227
// QWidget::keyPressEvent(event);
227228
}
228229
void SwitchSystemWidget::keyReleaseEvent(QKeyEvent* event){
229230
// cout << "SwitchSystemWidget::keyReleaseEvent()" << endl;
230-
global_keyboard_tracker().on_key_release(*event);
231231
key_release(event);
232232
// QWidget::keyReleaseEvent(event);
233233
}

0 commit comments

Comments
 (0)