On 30/10/23 03:41, Adrian Wowk wrote:
Previously, when using the SDL2 UI on MacOS, the title bar uses incorrect
key names (such as Ctrl and Alt instead of the standard MacOS key symbols
like ⌃ and ⌥). This commit changes sdl_update_caption in ui/sdl2.c to
use the correct symbols when compiling for MacOS (CONFIG_DARWIN is
defined).

Unfortunately, standard Mac keyboards do not include a "Right-Ctrl" key,
so in the case that the SDL grab mode is set to HOT_KEY_MOD_RCTRL, the
default text is still used.

Signed-off-by: Adrian Wowk <d...@adrianwowk.com>
---
Hi! I created this patch after having to compile QEMU from source with the SDL 
UI enabled to avoid an unrelated bug in the Cocoa UI. I noticed that the title 
of the window was not correct so I added a quick fix. I have tested this change 
on MacOS Sonoma (Version 14.1), and it works as expected. I did my best to 
ensure correctness, but this is my first time contrbuting to QEMU (and also my 
first time sending git patches over email), so if there is anything I can do 
better then please let me know. Thank You!

Tested-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>

And patch queued, thank you for your contribution!


  ui/sdl2.c | 8 ++++++++
  1 file changed, 8 insertions(+)


Reply via email to