From a624278fca9053d1b8ece2a0c51cda739673b380 Mon Sep 17 00:00:00 2001 From: Matthew Budd Date: Tue, 25 Aug 2020 18:41:58 -0400 Subject: [PATCH] Added native menu option to hex editor. --- src/drivers/Qt/ConsoleWindow.cpp | 2 +- src/drivers/Qt/HexEditor.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/drivers/Qt/ConsoleWindow.cpp b/src/drivers/Qt/ConsoleWindow.cpp index e81e57ed..5e16845b 100644 --- a/src/drivers/Qt/ConsoleWindow.cpp +++ b/src/drivers/Qt/ConsoleWindow.cpp @@ -1036,7 +1036,7 @@ void consoleWin_t::openHexEditor(void) delete hexEditWin; - //printf("GUI Cheat Window Destroyed\n"); + //printf("GUI Hex Editor Window Destroyed\n"); } void consoleWin_t::toggleAutoResume(void) diff --git a/src/drivers/Qt/HexEditor.cpp b/src/drivers/Qt/HexEditor.cpp index 88d21506..9ecec382 100644 --- a/src/drivers/Qt/HexEditor.cpp +++ b/src/drivers/Qt/HexEditor.cpp @@ -290,6 +290,7 @@ HexEditorDialog_t::HexEditorDialog_t(QWidget *parent) QAction *viewRAM, *viewPPU, *viewOAM, *viewROM; QAction *actHlgt, *actHlgtRV, *actColorFG, *actColorBG; QActionGroup *group; + int useNativeMenuBar; setWindowTitle("Hex Editor"); @@ -297,6 +298,10 @@ HexEditorDialog_t::HexEditorDialog_t(QWidget *parent) menuBar = new QMenuBar(this); + // This is needed for menu bar to show up on MacOS + g_config->getOption( "SDL.UseNativeMenuBar", &useNativeMenuBar ); + + menuBar->setNativeMenuBar( useNativeMenuBar ? true : false ); //----------------------------------------------------------------------- // Menu //-----------------------------------------------------------------------