Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NativeMenu layout direction on macOS, add extra check for Windows menu. #89506

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Mar 15, 2024

@akien-mga akien-mga merged commit 70bcf21 into godotengine:master Mar 15, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

akien-mga commented Mar 15, 2024

I'm getting this build error with mingw:

platform/windows/native_menu_windows.cpp: In member function 'virtual int NativeMenuWindows::add_item(const RID&, const String&, const Callable&, const Callable&, const Variant&, Key, int)':
platform/windows/native_menu_windows.cpp:292:40: error: invalid conversion from 'const WCHAR*' {aka 'const wchar_t*'} to 'LPWSTR' {aka 'wchar_t*'} [-fpermissive]
  292 |         item.dwTypeData = label.ptrw() ? (LPWSTR)label.ptrw() : L"";
      |                           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                        |
      |                                        const WCHAR* {aka const wchar_t*}

It's not in the log but there's also the same pattern further down:

952:            item.dwTypeData = label.ptrw() ? (LPWSTR)label.ptrw() : L"";

We really need to add a mingw build to CI :)

@bruvzg
Copy link
Member Author

bruvzg commented Mar 15, 2024

#89513 should fix it (also more readable).

@bruvzg bruvzg deleted the menu_fix1 branch March 15, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global menu items on macOS are mirrored after PR 89273
2 participants