[Ohrrpgce] [ohrrpgce/ohrrpgce] Mac/gfx_sdl2 lacks custom menu bar (#1183)

Ralph Versteegen notifications at github.com
Sat Nov 7 21:33:07 PST 2020


On Mac, gfx_sdl (in SDLMain.m) sets up the menu bar menus and registers hotkeys for the menu items.  In particular the Window menu has "Minimise", "Fullscreen", and "Zoom 1-4x" (hotkeys Cmd-1/2/3/4) options, and a Help menu has a "Help: Press F1 or Cmd-Shift-?" option.

gfx_sdl2 doesn't link to SDLMain.m, so it just has the default menubar provided by SDL2 (including a Window menu with a maximise/zoom option which usually immediately crashes, due to #1181), and IIRC also lacks support for some hotkeys.

SDLMain.m is written for SDL 1.2, and can't just be linked into an SDL2 program. I don't know how you're meant to programmatically set the menu bar and in general access the Cocoa API in SDL2 (without using a .nib menu definition file, which I don't want to do). I have tried using `#ifdefs` to make it compatible but don't have it working yet.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ohrrpgce/ohrrpgce/issues/1183
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20201107/a2313fed/attachment.html>


More information about the Ohrrpgce mailing list