action map remap for mac

Mac now automatically remaps keys and modifies the incoming string to reflect it

automatically converts:
Ctrl -> Cmd
Alt -> Option

if you absolutely need a specific set on macos you will still need to check the platform in script and set the required key otherwise this will allow menus to be built with just providing the windows key or the mac key and it will display correclty for the platform.
This commit is contained in:
marauder2k7 2026-03-13 21:59:46 +00:00
parent 8de2458610
commit 496895d60c
3 changed files with 89 additions and 27 deletions

View file

@ -19,6 +19,10 @@ namespace PlatformGL
#ifdef TORQUE_DEBUG
debugFlag |= SDL_GL_CONTEXT_DEBUG_FLAG;
#endif
#if SDL_VERSION_ATLEAST(2, 24, 0)
SDL_SetHint(SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH, "1");
#endif
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, debugFlag);
SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1);