Skip to content

Commit

Permalink
Added possibility to run device in single thread
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Dafarra committed Apr 6, 2024
1 parent d9c9e44 commit 093030e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ The device can be configured using the following parameters. They are all option
- ``window_height``: height of the window in pixels (default: 720)
- ``buttons_per_row``: number of buttons per row in the "Buttons" widget (default: 4)
- ``allow_window_closing``: when specified or set to true, the window can be closed by pressing the "X" button in the title bar. Note: when using this as device, the parent might keep running anyway (default: false)
- ``no_gui_thread``: when specified or set to true, the GUI will run in the same thread as the device. The GUI will be updated when calling ``updateService`` or when getting the values of axis/buttons (default: false, true on macOS)
- ``axes``: definition of the list of axes. The allowed values are "ws", "ad", "up_down" and "left_right". It is possible to select the default sign for an axis prepending a "+" or a "-" to the axis name. For example, "+ws" will set the "ws" axis with the default sign, while "-ws" will set the "ws" axis with the inverted sign. It is also possible to repeat some axis, and use "none" or "" to have dummy axes with always zero value. The order matters. (default: ("ad", "ws", "left_right", "up_down"))
- ``wasd_label``: label for the "WASD" widget (default: "WASD")
- ``arrows_label``: label for the "Arrows" widget (default: "Arrows")
- ``buttons``: definition of the list of buttons. The allowed values are all the letters from A to Z, all the numbers from 0 to 9, "SPACE", "ENTER", "ESCAPE", "BACKSPACE", "DELETE", "LEFT", "RIGHT", "UP", "DOWN". It is possible to repeat some button. It is possible to specify an alias after a ":". For example "A:Some Text" will create a button with the label "Some Text" that can be activated by pressing "A". It is possible to use "none" or "" to indicate a dummy button always zero. It is possible to spcify multiple keys using the "-" delimiter. For example, "A-B:Some Text" creates a button named "Some Text" that can be activated pressing either A or B. It is possible to repeat buttons. The order matters. (default: ())


## Maintainers
* Stefano Dafarra ([@S-Dafarra](https://github.com/S-Dafarra))
2 changes: 1 addition & 1 deletion src/devices/keyboard-joypad/KeyboardJoypad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ struct Settings {
//If macOs, the GUI thread must be the main thread. Hence use no GUI thread
#ifdef __APPLE__
single_threaded = true;
yCWarning(KEYBOARDJOYPAD) << "In MacOs the GUI thread should be the main thread. Hence, we are using true as default for \"no_gui_thread\"";
yCWarning(KEYBOARDJOYPAD) << "In macOS the GUI thread should be the main thread. Hence, we are using true as default for \"no_gui_thread\"";

#endif //__APPLE__

Expand Down

0 comments on commit 093030e

Please sign in to comment.